-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Navigation Block: sub-menu items design #18310
Comments
Can I clarify the intent here: Are we saying we want the Editor and Theme (front of site) to utilise a common set of "opt in" styles for the Nav Block whichL
Questions:
|
is it defined by the list-style? |
No, it is not. |
Noting the bit 'to do' on this is reflecting in the editor itself. |
A few points on this. Right now there is some very opinionated styling as default, I am not sure if we reflect that but having a way to avoid this, for example, would be great: More in: #18830 I wonder could we have something like this: I think directly having the arrow might be too much as in: A suggested middle ground would be a white background: |
Related: #18830 |
@karmatosed @shaunandrews Just noting that there might be some overlap between this and #18830. Do we need to take account of that and/or update the designs? |
I mean matching the new design of the menus in the editor as well as the front end. So that there is greater visual separation between inserters and avoiding the bunching of inserters we currently see. |
by your leave, I'm going to start to work on this. :-D |
@karmatosed Could you confirm whether the design you shared here #18310 (comment) is ready for implementation? I'm asking as the issue is still labeled |
I did intend it to be wireframey as the idea was that we came up with a basic style which would work across as many themes as possible, including dark and light modes. For that reason, I want to avoid things like shadows and too much in-depth styling. It doesn't mean we can't get a tiny bit more opinionated though and I have done some iterations to show states. Back hover darkThis is a bit heavy but would swap light / dark for a hover. Back focus darkThis brings in the dark only on focus menu Back minimalThis brings in link styling from the theme, so that we bring in for example blue in Twenty Nineteen. Hover is simply underline. Important to note in above the appender only appears when 'in' sub menu and only one shows. Let's move onto the front now and explore beyond 2 levels deep. I started to explore how this could adapt for multiple. It's worth noting the back end will also have same sub menu styling. Front all way acrossFront second level drop downFront second level drop down and minimal stylingThere are benefits in the last one as more economical on space and also it can be easily styled, with a dark variation easily done. |
Looking at these mockups, here's a few thoughts.
|
Regarding the arrow indication, we can merge #18396 maybe into this which is set to bring that in with this iteration - 2 issues with one! |
@karmatosed @shaunandrews @mapk Would it be possible to distil the design explorations above into one representational design that we can then implement? Mainly thinking about this in terms of efficiency as it can potentially be quite an effort to rework in code if we walk down the wrong direction. Thank you! |
I think of the GIFs I posted yesterday as a distillation of the previous explorations, and would be what I prefer we implement. |
Thank you for providing us with a clear design decision here. 👍 Just linking to the GIFs we'll implement here again for anyone that didn't follow the thread: #18310 (comment) |
I think if the top level link color changes the submenu colors as well, you’re going to get clashes because the user does not have control over the background color of the submenus at this point. It’s better to do light/dark and deal with colors when we can provide full control to users. Otherwise a situation where background color on the top level is light grey, the text color black, and they select the dark style means links in submenus are going to be unreadable. |
Just to be clear about technical implementations. We can propagate the colors of text and background to the sub-items and completely ignore the light/dark styles here, as the primary menu (items in level 0) already does. |
To be clear, although subjectively I don't think the above looks good, if there is control over the submenu colors I think this is a fine outcome. |
As a user, I would expect the colors to propagate to the submenu. But, I'd probably also expect to be able to change the colors for the submenu independently. However, the current UI gets pretty overwhelming if we add two more color options: But we could move the submenu color options to the toolbar when a top-level item with children is selected: -- For now, I think we should just keep the colors tied to the top-level items and look at adding color options for submenus in another PR. |
I think this is the ideal setup, and what we should be aiming for. The light/dark styles were a stop-gap until we could support color changing. By the sounds of it this is causing implementation confusion. Here's a suggestion building from Shaun's above, please chime in with thoughts:
|
Sounds like a nice plan. Going to add these points in the PR #19681 |
I like the plan apart from removing light / dark styles beyond a temporary removal. If we bring those back later I would be ok with it as we create the new style. |
We haven't talked about how to apply the border-color for sub-menus. What we did, as an experiment, was applying the same color that the text if it's defined. If not, it will apply the Light/Dark color. |
Could border color just balance off from the base of background? Looping @ItsJonQ in here as know this is something we are exploring in global styles where one style generates other options using CSS variables. |
Do you mean for instance applying a kind of filter or rgba()?
No IE11 support, then ;-) An aside note related to this: Using CSS vars would make all these implementations soooooooooo easy |
@retrofox personally I think for 'additional styling' the support isn't an issue and in #19611 along with other places this has been discussed. It's a case of having a decent baseline so it looks good across all browsers, then extras come if can support. I do think if we don't go that route them filter or some method of rgba (even opacity) could work. I just think we have to be careful about at least for now not having so many color options it is a confusing interface. If I set a background I would want things to just work out, as a baseline. |
The design of the sub-menu should correspond to what is shown on the front-end (right now it's a dropdown on hover/focus). The editor is showing just an indented list:
This is a block that should have opinionated styles (assigned to
theme.scss
) that themes can opt into.The text was updated successfully, but these errors were encountered: