Skip to content
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

feat: Streamline navbar #1550

Merged
merged 22 commits into from
Jul 29, 2020
Merged

feat: Streamline navbar #1550

merged 22 commits into from
Jul 29, 2020

Conversation

jessicaschilling
Copy link
Contributor

@jessicaschilling jessicaschilling commented Jul 21, 2020

This PR streamlines the navbar at both mobile/tablet and desktop widths and prepares for improving "welcome" screen content (ref #1463):

  • Removes navbar expand/collapse logic to streamline UI and gain space at desktop width
  • Moves navbar titles underneath icons to save horizontal space at desktop and reduce horizontal scrolling at mobile/tablet widths
  • Increase max-height for hiding navbar footer to account for height added by moving titles under icons
  • Tidies navbar footer to display better at newer narrower width
  • Ensures navbar width at desktop has enough room for longest translation string (Portuguese)
  • Navbar cube logo toggles between vertical and horizontal versions depending on width
  • Navbar cube logo goes to welcome page on click
  • At sub-desktop widths, active highlight border moves from left to bottom
  • Also replaces tab title dashes with | characters for consistency with other sites in our ecosystem

Screenshots ...

Mobile 320px wide:
image

Desktop:
image

@jessicaschilling
Copy link
Contributor Author

@lidel and/or @rafaelramalho19, would you mind taking a look? Haven't touched the welcome page yet; plan to do that under a separate PR for division of labor.

Unfortunately the build workflow in CircleCI is currently failing ... am a bit stuck as to why, would appreciate any guidance!

Thanks 😊

Copy link
Member

@lidel lidel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, (subjectively) looks and reads better.

Remaining work is to make E2E tests pass:

ps.

Also replaces tab title dashes with | characters for consistency with other sites in our ecosystem

This could be a separate PR, but fair enough ;))

src/navigation/NavBar.js Outdated Show resolved Hide resolved
src/navigation/NavBar.js Outdated Show resolved Hide resolved
src/navigation/NavBar.js Outdated Show resolved Hide resolved
src/navigation/NavBar.css Show resolved Hide resolved
src/navigation/NavBar.js Show resolved Hide resolved
@jessicaschilling
Copy link
Contributor Author

Thanks @lidel and @rafaelramalho19 -- have re-requested reviews. All comments should be taken care of removing position:fixed from navbar container -- @rafaelramalho19, I can't find a way to do this while also preserving scrolling behavior and keeping the footer at the bottom of the screen.

Is this something you might have time to talk through at some point -- and would it be better to do that as a separate PR? AFAIK these changes aren't making things worse than current-state for Safari users.

Copy link
Contributor

@rafaelramalho19 rafaelramalho19 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🎉

@jessicaschilling
Copy link
Contributor Author

@lidel -- please feel free to merge if you're good. Thanks!

<span className={`dib dtc-l v-mid ${open ? 'pl3 pl5-l' : 'ph3'}`} style={{ width: 50 }}>
<a href={disabled ? null : href} className={anchorClass} role='menuitem' title={children}>
<div className='db ph2 pv1'>
<div className='db'>
<Svg width='50' className={svgClass} />
Copy link
Contributor

@rafaelramalho19 rafaelramalho19 Jul 28, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forgot about this, we should do role="img" aria-labelledby={children}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better yet, role="presentation"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Added role='presentation' to divs surrounding icons: see lines 40 and 60. Is this what you're thinking?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rafaelramalho19 - per our chat moved these directly into the img tags. Look good to you?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's perfect, thank you 😄

Copy link
Member

@lidel lidel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

  • cube interaction makes more sense and follows what we recently did in IPFS Companion
  • it looks more "natural" than the old version, I suspect most of users may not even notice anything changed (which is a good thing!)

@rafaelramalho19 you the boss here, merge when you want ;)

@lidel lidel requested a review from rafaelramalho19 July 29, 2020 13:24
@jessicaschilling jessicaschilling merged commit 231c68e into master Jul 29, 2020
@jessicaschilling jessicaschilling deleted the feat/navbar-remove-expand branch July 29, 2020 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants