Skip to content

Conversation

@julien-nc
Copy link
Member

closes #354

OCA.Files.Sidebar was removed in Nextcloud 33.

  • Adjust and use the new registerSidebarTab from @nextcloud/files
  • Add an eslint ignore rule because the build was failing with this eslint error: error registerSidebarTab not found in '@nextcloud/files' import/named
  • I didn't find how to set mixins to a component defined with defineAsyncComponent so I had to import the translation functions in all sub components of the sidebar tab.

Copy link

@susnux susnux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good, putting the t method into data is a bit weird, would rather put it into methods or setup.
But otherwise 👍

data() {
return {
t,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will make the method reactive, probably better to move this to setup()

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want to stick with the options API so it's been moved in methods.

It seems like there is no way to inject those functions in a mixin of a component defined with defineAsyncComponent. Do you confirm?
It would be much more convenient to inject the translation functions this way like we usually do.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want to stick with the options API so it's been moved in methods.

There is no conflict between options and composition API both can exist in parallel :)

It seems like there is no way to inject those functions in a mixin of a component defined with defineAsyncComponent. Do you confirm?

I guess you mean like the global mixin for the vue instance? No that is not possible (but not because of async component but because of the web component).
What you could do it put it into a legacy mixin but I would strongly discourage using that as mixins in general already deprecated in Vue in favor of composables.

}
*/
// setup tab
setupTab()
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can also do this globally outside of enable as with Vue 3 the async component works fine. but does not harm.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like this for example? 5f0d3b1

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes :)

@julien-nc julien-nc merged commit afc831a into main Jan 7, 2026
34 checks passed
@julien-nc julien-nc deleted the enh/noid/sidebar-tab-33 branch January 7, 2026 09:38
@julien-nc julien-nc mentioned this pull request Jan 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OCA.Files.Sidebar API was removed in Nextcloud 33

3 participants