-
Notifications
You must be signed in to change notification settings - Fork 324
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
Redesign nav bar, GlobalSearch, and dropdowns #3155
base: master
Are you sure you want to change the base?
Conversation
This pull request is being automatically deployed with Vercel (learn more). nusmods-website – ./website🔍 Inspect: https://vercel.com/nusmodifications/nusmods-website/2a280s2q6 nusmods-export – ./export🔍 Inspect: https://vercel.com/nusmodifications/nusmods-export/6m3yujq77 |
White background allows more colors to be used in the nav bar. Feels like there are too many horizontal lines in the app, but just playing around for now. We can try fixing this later.
15966c2
to
eaaaa29
Compare
I like the idea of this! Could possibly be a fresh new change with some tweaks! How many buttons are you expecting for the mobile version of this. Might be a little cramped (espc for 320px viewports). |
bottomBar was position:relative, which caused it to float above the page regardless of where its parent nav bar was. This causes the tabs to stick to the top of the screen when you rubberband-scroll on iOS. To fix this, this commit brings the tabs inline, laying out the nav bar using flex magic instead. This also allows us to easily prevent the search box or other nav bar components from overlapping with the tabs. Global search is now much less buggy than before.
Deployment failed with the following error:
|
Deployment failed with the following error:
|
Hey @chrisgzf! Sorry I didn't notice that you commented on this haha.
Yeah we're definitely not gonna do a 1-row nav on mobile. I'm doing something similar to the current 2-row nav. |
I quite like the look of the new components, and the removal of the sidebar, but one area that bugged me was the centered links in the navbar, especially on larger viewports. I think there's a distinct feeling of the navbar being unbalanced, when the links are in the center and the large-ish search field on the right. I think a good solution would simply be to shift the navigation links to the left, next to the NUSMods logo. Will send a PR with screenshots later for reference/comparison. |
Summary
This PR redesigns our nav bar, global search, and all dropdowns throughout the app.
The design is inspired by FB5 (the recent facebook.com redesign) and @jiholim's NUSMods V4 mockups from 2018.
Because a huge number of things have been changed, it'll probably be easier to review this PR without looking at the existing code or behavior.
Fixes #3060 and resolves #1646 (no sidebar => no problem)
Thanks to @eugenood, @williamhutech, @chrisgzf, and @chuabingquan for the valuable input!
Redesigned nav bar
Why
We need space to put a lot more buttons in the future, including user account/info, and possibly an MPE button and planner button. The tab bar is full on mobile, and the top bar is full on desktop, leaving no good place to put auth info. This PR unifies both the mobile and desktop nav experience, and provides space on the right for logged-in user info + a dropdown menu for extra pages e.g. Contribute, Settings, MPE, etc.
Design Inspiration
FB5:
@jiholim's mockup:
GitHub:
What Changed
sm
-width and above are moved to the nav bar.xs
)sm
)xl
)Nav dropdown on xs
Redesigned dropdown
Why
The existing dropdown did not look particularly good, and would have been weird as a nav dropdown. As I had designed a new one for the nav dropdown based on FB5's design (but it's also pretty common elsewhere), I just moved that into our global styles for consistency throughout the whole app.
The new dropdown styles also include CSS classes for items with icons and right contents.
Design Inspiration
FB5
Screenshots
ExportMenu
DropdownListFilters
AddModuleDropdown
Redesigned global search
Why
Our
GlobalSearch
design was a little inconsistent with the rest of NUSMods, and was extremely awkward when used with the new nav bar design, and felt dated and out of place when placed beside the new dropdown.Design Inspiration
@jiholim's mockup:
What Changed
dropdown-menu
styles instead of its own custom stuff.sm
viewport