-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Revert "AppSidebar: fix tab validation: tabs are optional" #447
Conversation
Hey @korelstar |
Could you open again a fix so we can have a better look at it? :) |
What exactly didn't work and why should it work? It is intended, that non-AppSidebarTab's are not shown as tabs but as normal content. |
Issue is that you can use other components as tabs, as long as you're providing the appropriate icon and name and id. Now if you check the tab component only, it will forbid it :) (sorry about the late answer) You can see the current pending pr that broke after your patch : nextcloud/server#15719 |
Okay, then I suggest to make the check as you wrote: a children is treated as tab if it has icon, id and name, otherwise it is treated as non-tab content. However, then your detailed warnings are not possible anymore. The only other solution I see is to revert #420, since that enforces tabs, which is not intended. |
I'll adapt your pr and 420 :) PS: are you coming at the conference this year? 🚀 |
What about using different template slots for tabs and for non-tab-content? Then, it would be easy to check if and warn if not only one of them is used. I think that would provide a much clearer distinction between these two use cases. Unfortunately, this would be a breaking change (slot has to be used for tabs). What do you think, @skjnldsv ? |
@skjnldsv Any news on this? There is still an error message when using no tabs in AppSidebar. Are you fine with slitting tabs and non-tab content in two different template slots? Then I could provide a PR. |
Reverts #445