-
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
Split AppNavigationItem into small components #470
Comments
Hello everyone, Marco here! I'll be helping out for the next few months :) I see 2 possible approaches in terms of organising the code. These two can also be mixed together, but I'm gonna describe here the two edge cases just to be clear:
<AppNavigationItem>
This is the main entry
<Avatar #avatar user="admin" display-name="Administrator" />
<AppNavigationCounter #counter>123</AppNavigationCounter>
<template #actions>
<ActionButton />
<ActionButton />
<ActionButton />
<template>
</AppNavigationItem>
In this case the only components nested into My personal preference is |
Other examples: <AppNavigationItem class="icon-xxx">This is the main entry</AppNavigationItem> <!-- https://docs.nextcloud.com/server/16/developer_manual/design/navigation.html#entry-bullet -->
<AppNavigationItem bullet="0082c9">This is the main entry with a bullet</AppNavigationItem> <AppNavigationItem class="icon-xxx">
This is the main entry
<AppNavigationCounter #counter :highlighted="true">123</AppNavigationCounter>
</AppNavigationItem> <AppNavigationItem class="icon-xxx">
This is the main entry
<AppNavigationCounter #counter :highlighted="true">123</AppNavigationCounter>
<AppNavigationItem>This is a sub-entry</AppNavigationItem>
<AppNavigationItem>This is a sub-entry</AppNavigationItem>
<AppNavigationItem>This is a sub-entry</AppNavigationItem>
</AppNavigationItem> <AppNavigationItem class="icon-xxx" :collapsible="true">
This is the main entry
<AppNavigationItem>This is a sub-entry</AppNavigationItem>
<AppNavigationItem>This is a sub-entry</AppNavigationItem>
<AppNavigationItem>This is a sub-entry</AppNavigationItem>
<template #actions>
<ActionButton />
<ActionButton />
<ActionButton />
<template>
</AppNavigationItem> We still need to figure out the |
When looking at the discussion in #447, I suggest to use a separate template slot for children items. Otherwise it will be hard to distinct between children and main elements. Regarding undo, I prefer a prop toggle. |
Any specific reasons? :)
What elements do yuo have in mind? |
I agree with @korelstar about the undo, I think that anything that would allow to change |
It's because I think that the component should provide a semantic for undo. The design functionality should be capsulated in the component. This would make design changes (e.g. animations) easier and streamlined through different apps.
Nothing concrete, but in the context of #420, #445 and #447 I learned, that it is better to make things explicit. You can't check for a child component by name, because someone could use it's own component which is based on |
Well, if you have to use your own custom component, it means our current one is not good enough and needs to be perfected :) |
This doesn't apply in my case. While In other languages, I would use inheritance for that ( |
Ah yes! |
@skjnldsv what should I do with the CSS? I was starting to move it from the server to the Vue components, but in the classes there are many references to mixins and variables that live on the server. I'm not able to compile the code because the compiler looks for those references in the nextcloud-vue folder and doesn't find them. |
Same as #358 and after #25
#195
Refs: https://docs.nextcloud.com/server/16/developer_manual/design/navigation.html#app-navigation-menu
The text was updated successfully, but these errors were encountered: