-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Design guidelines #565
Design guidelines #565
Conversation
Signed-off-by: John Molakvoæ (skjnldsv) <[email protected]>
Signed-off-by: John Molakvoæ (skjnldsv) <[email protected]>
Signed-off-by: John Molakvoæ (skjnldsv) <[email protected]>
Signed-off-by: John Molakvoæ (skjnldsv) <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AWESOME! :) You rock @skjnldsv!
See the comments inline. I’d also like us to resolve the Mail app indent (as seen in navigation-menu.png) and maybe we should also add icons to the contacts app sidebar so the navigation-counter.png looks proper too.
Introduction | ||
============= | ||
|
||
The main navigation menu represent the most important part of your app. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
represents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But also, I wouldn’t say »most important part of your app« since really the most important part is the content. ;) Maybe more something like »It is the main navigation of your app, so it needs to be simple, organized and responsive.«?
* Simple | ||
* Responsive | ||
|
||
Nextcloud provide a very organized way of building menus. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
provies
Utils | ||
====== | ||
|
||
Each entry is allowed to have a counter and/or a button for user interraction. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
interaction with one r
Menu | ||
^^^^^ | ||
|
||
If you need to add a few interractions for your entry, you can put everything in a popover menu. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
interactions again, one r ;)
What is a popover menu | ||
======================= | ||
|
||
This is a quick menu that open on click. We're usually using the three dots icons on nextcloud. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
opens
»For menus, we use the three-dot-icon.« (also »Nextcloud needs to have a capital N ;)
* 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) like the example above | ||
* You need to put the entire menu just after the three dot icon ``<div><span class="icon-more"></span><div class="popovermenu">...</div></div>`` | ||
* You do not need js, css only is ok for positioning. Js is **still** required to handle the hide/show. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let’s always capitalize JS and CSS as it is done, also so it stands out in the text.
* Only **one** ul is allowed. | ||
* Only **one level** of menu is allowed. | ||
* Every entry **needs** to have its own icon. This greatly improves the UX. | ||
* 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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should do that automatically though, right? We shouldn’t need to manually mention any px values here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is done automatically. This information is for the menu button. Not everyone will use a standard button. For example again, the federationscope menu, the button is not 44px width. :)
|
||
Alignment | ||
========== | ||
If you want to align your menu, you can add the class to the main popovermenu div. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we want to make this customizable? It seems to be unnecessary, will make apps work differently, and also will be a problem on mobile if the menu is too far right outside of the viewport.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jancborchardt this has been implemented and used for the last 8 months... The federationscope menus uses the center class for example.
And the issue of overlapping outside the browser is the same about the height of the menu. It can also overlap on the bottom. :)
Signed-off-by: John Molakvoæ (skjnldsv) <[email protected]>
@jancborchardt What do you think of floating figures to illustrate the different parts? |
@skjnldsv maybe it's even better to put it to the right of the code it corresponds to, so a bit lower down? :) But both is fine, yep. |
Oh and an additional comment where you say icons in the menus are important for better UX, let's be more specific and say "Icons are important for quick recognition and to support the text." |
* The ``app-navigation-entry-utils`` snippet need to be placed right next to the main link of your entry. | ||
* Maximum **two** items are allowed into the utils section. You can have: | ||
* Two buttons | ||
* One button and one counter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you like counter
with the Counter section?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes! Thx! There is still a lot to do :)
Signed-off-by: John Molakvoæ (skjnldsv) <[email protected]>
Signed-off-by: John Molakvoæ (skjnldsv) <[email protected]>
f0dcc1e
to
00bd690
Compare
@skjnldsv that works, yes! If it's possible the code section could be narrower and the image right next to it (without grey container), that would look even better. |
+ collapsible animation Signed-off-by: John Molakvoæ (skjnldsv) <[email protected]>
Signed-off-by: Morris Jobke <[email protected]>
I tried something - let's see. |
dd2ea26
to
6bbd878
Compare
Signed-off-by: John Molakvoæ (skjnldsv) <[email protected]>
6bbd878
to
2f09d5c
Compare
I added a fix too! Seems to work on local! :) finger crossed 🤞 EDIT: DANG IT! It is working on my local setup! :(
|
Drone: I'll check on this... |
a1f382b
to
3068abb
Compare
|
Signed-off-by: John Molakvoæ (skjnldsv) <[email protected]>
3068abb
to
d01b2f1
Compare
Success! 🎉 🎉 🎉 |
Signed-off-by: John Molakvoæ (skjnldsv) <[email protected]>
@skjnldsv Is this ready to merge? |
I still need some stuff to make! |
What's left to add:
Do anyone see something else? |
You mean app-content-list (not app-navigation-list) and app-content-detail? Yes that would be good to document. :) From the Contacts app and Mail app ideally. Breadcrumbs I'm not sure as we don't really use/encourage them anywhere except Files. Would leave out for now tbh. Explanation of basic rules yes. Includes min click target size 44*44px. And yes, how to include avatars would be great. The rest we can do in further pull requests and step by step. :) |
I could use some help on the rules 😄 In which categorie should we put the avatar code stuff? |
Yeah, let's best work on it during the hackweek? Avatars might need a separate section, also cause we have guidelines that every username should have an avatar next to it, and that clicking avatar/name should invoke the person's menu. |
I would say, that we should do this in a followup PR. |
Yep, absolutely. Imo we can do everything additional in a follow-up - I asked long ago if we can merge this already. ;) |
Let's merge this and then we can continue in a separate PR. I also will also backport this to stable12 already and we then can also backport the followups. ;) |
stable12 d564822 (+29 commits before it) |
Hum, I need to create my patch for stable 12 compatibility then!! :) Thanks for merging, this is a big step forward!! |
Aaaaaawesome! @skjnldsv such a magnificent job! :) |
By the way @skjnldsv, if you like you can also announce the new doc pages in our forum in the dev category: https://help.nextcloud.com/c/dev Or maybe even a design blog post is in order? :) cc @jospoortvliet @NinaNC |
@jancborchardt Let's see this irl when we meet ;) |
@nextcloud/designers
Fix #333