-
Notifications
You must be signed in to change notification settings - Fork 394
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
Update Nav design #2514
Update Nav design #2514
Conversation
Looks like I'll need to do some refactoring with the nav and the header popup JSX to correct the code climate errors. I'll get on it as soon as I can! |
@media (--sm-scr) { | ||
margin-left: 4px; | ||
|
||
&:nth-child(5), |
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.
I used CSS to take off the nav items, but we could also use JS to check for screen overflow and take off the items with JS.
Should we close the popups if a user clicks on one of the popup links? 🤔 |
* add SocialIcons component * reduce popup code
* place nav popup handler code in Nav/Popup hook, useNavPopups
* increase popup font sizes * take off letter-spacing in all elements
Good question. For example, in the case when a user opened a popup and with Cmd/Ctrl + clicking on links to open them in the separate tabs it would be useful to keep the popup opened after every click. But in the case of single clicks, we should close the popup, especially when we open a new page in the current tab. |
On top of that, the Community menu is all links to different headers within the same page. I think we'll want to dismiss the menu on click there as well, since I don't see users wanting to go through multiple headers in one opening of the menu. |
Is it only me, or it looks too heavy with this font size/weight and so many items? (it take almost of all my screen and fonts size is close to some headers on the page?) |
Agreed, this is particularly noticeable at >1000px width, but even the breakpoint below seems a tad heavy. |
Also agreed! What if we made another drop-down that held some of the other nav links on smaller screen sizes?🤔 |
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.
Also, the links Community
and Meet the community
are similar I guess, they lead to the sections which very close to each other on the top of the same page. What do you think if we hide the second one and rename the first to Meet the community
?
* increase line-height in .description * edit community links
* move nav list into separate component
* move useNavPopups hook to Popup/util.tsx * split useNavPopups into multiple functions
* move Popup event listeners to LinkItems, lowering code complexity
* Take external link icon off popup link if link is not external
Ok, I completed all of @arcticbear's comments and update the nav popups to close on link click! |
I'd say the font sizes could be a little smaller as well, and I'm not too big a fan of having different sets of items available at different breakpoints- the current dvc.org displays either all items on the header or all items in the burger menu, which I think is a better way to handle display sizes. Now that I look at it, we'll also need to add "Other Tools" to the burger menu. Alternatively, we could have a burger menu that handles all items not displayed on the header, likely by always having all items and only displaying the menu when any item is hidden. If we decrease the font size, we can and should keep the tap targets 48px with |
@arcticbear could you please find some time to review this? :) |
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.
Looks good enough to me as a first iteration!
Fixes Setup Universal Header/Footers #2440