nextcloud-libraries / nextcloud-vue

🍱 Vue.js components for Nextcloud app development ✌ https://npmjs.org/@nextcloud/vue
https://nextcloud-vue-components.netlify.app/
Other
217 stars 89 forks source link

[Bug] NcAppSidebarTabs Component Missing Despite Being Documented #6252

Closed RalkeyOfficial closed 3 days ago

RalkeyOfficial commented 1 week ago

According to the Nextcloud Vue Components documentation, the NcAppSidebarTabs component is available for use

However, after examining both my local package and the GitHub repository, I found that NcAppSidebarTabs is not exported or available for import. It appears to be referenced within NcAppSidebar but isn't accessible as a standalone component.

image image

If NcAppSidebarTabs is not intended for external use, the documentation should be updated to reflect this and avoid confusion. Preferably, make NcAppSidebarTabs available for import, as it would be beneficial for developers who need its functionality.

I am currently working on a project that requires access to NcAppSidebarTabs. Having this component available would be a great deal of help.

ShGKme commented 1 week ago

Preferably, make NcAppSidebarTabs available for import, as it would be beneficial for developers who need its functionality.

I am currently working on a project that requires access to NcAppSidebarTabs. Having this component available would be a great deal of help.

This component is for internal (NcAppSidebar's) use and much couped on NcAppSidebar.

Could you describe what functionality you need? Do you need a component with tabs, or this one specifically?

RalkeyOfficial commented 1 week ago

Could you describe what functionality you need? Do you need a component with tabs, or this one specifically?

I have a little bit of an odd scenario.

The client I work for wishes for extra information above the tabs in a sidebar. But when testing I found out that other elements (eg. <div>, <p>) were being removed due to this image (Also if you are going to be removing NcAppSidebarTabs from the docs, you might also want to add this to NcAppSidebar)

So after further testing, I found out that wrapping another NcAppSidebarTabs around the tabs allows me to have other components above the tabs.

eg:

<NcAppSidebar>
    <div> extra stuff here </div>
    <NcAppSidebarTabs>
        <NcAppSidebarTab>
        <NcAppSidebarTab>
    </NcAppSidebarTabs>
</NcAppSidebar>
RalkeyOfficial commented 1 week ago

I have not tested this, but I believe this will also have the unintended (but positive) side effect of allowing multiple tab groups in one sidebar, which some people (not me in this case) could benefit from.

Antreesy commented 4 days ago

Hi!

unintended (but positive) side effect of allowing multiple tab groups

At least due to the fact <NcAppSidebarTabs/> relies on active param from <NcAppSidebar/>, second set of tabs would be really unintended. Though that is in theory possible to re-implement all needed logic for that... Not sure it worths efforts to maintain that additional case.

Have you tried using <template #description> in <NcAppSidebar/>. It sounds like what you need in your case

RalkeyOfficial commented 3 days ago

Hello.

Have you tried using <template #description> in . It sounds like what you need in your case

No, I have not tried the description slot yet. As this was missing documentation I naturally ignored it without a second thought. If this slot works as you say, then it would indeed help me.

However, I still stand by my opinion that tab groups should be accessible to developers. So I hope this could somehow be implemented in the future.