-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Labels
Description
This is a styleguide post. We will discuss the proper way to integrate a specific design part of nextcloud and then integrate it in the documentations.
@jancborchardt @nextcloud/designers
What is a popover menu
This is a quick menu that open on click. We're usually using the three dots icons on nextcloud.
This menu currently differs from the navigation menu on the app-navigation section on the left. We should definitely merge those two and make one single way to create a popover menu on nextcloud (see app-navigation-entry-menu class on css files)
Summary
- In nextcloud we only want icons or icons+text
- Two orientation:
- Horizontal: for icons only
- Vertical: for icon+text
- The menu is aligned on the three-dot icons it refers to
Proposition
Html structure
<div class="popovermenu">
<ul>
<li>
<a href="#" class="icon-details">
<span>Details</span>
</a>
</li>
<li>
<button class="icon-details">
<span>Details</span>
</button>
</li>
<li>
<button>
<span class="icon-details"></span><span>Details</span>
</button>
</li>
<li>
<a>
<span class="icon-details"></span><span>Details</span>
</a>
</li>
<ul>
</div>Technical details
- The only allowed menu items elements are a and button
- You can mix between a and button on the same menu (in case of form or direct link)
- If you want your menu to be horizontal, you need to set the icon class to your a/button and not use span inside.
- You need to put the entire menu just after the three dot icon (refs Fix popover width #2545 (comment))
<div><span class="icon-more"></span><div class="popovermenu">...</div></div>- With this, we don't need js, css only is ok for positioning.
- The required right distance to the border (or padding, whatever you want to use) of the three-dot icon should be 14px (5 for menu margin and 6 for arrow position)
- Don't put ul next to each other like the mail app, this is a wrong way to do.
Suggestions
- Should we add the possibility to display the popover towards the top? Right now it is only set as "to the bottom"
- Should we add the option to select the arrow alignement? Right now this is only aligned on the right of the popup.
- You can now have fun with
menu-centerandmenu-leftfor alignment.
- You can now have fun with