-
Notifications
You must be signed in to change notification settings - Fork 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
Nav unification: add flyout menu to sidebar #46046
Conversation
This PR does not affect the size of JS and CSS bundles shipped to the user's browser. Generated by performance advisor bot at iscalypsofastyet.com. |
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.
Thanks @frontdevde for working on this! Generally it works as expected. We just need to address the following issues:
- Let's check that hovering on an element in the flyout is in par with
wp-admin
Calypso Now | wp-admin |
---|---|
Agreed, it should definitely be the same in Calypso and wp-admin. I removed the bold font weight. As for the color I'm not certain which side we need to adjust though. In the i2 design, the hovered state of the sidebar is white (see comparison below). Based on that maybe we should change wp-admin to be white instead of Calypso to be blue? @sfougnier Could you please advise us which color to pick here? Thank you!
|
Based on the consensus to stick to wp-admin as much as possible, I think we should keep the blue for now. I have updated this in the designs. |
OK, perfect! Will change it to the blue used in wp-admin right now. Thank you! |
I can verify that
is now showing the desired effects (colors , bg color, font-weight) |
Just merged this PR which will no doubt effect this one |
11008ce
to
aa40ac9
Compare
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.
Loving the top level flyouts!
I'd say overall we still have UX issues to resolve. I would usually say let's merge and iterate but some regressions have occurred following your rebase.
Issues
Possible to have multiple items in "selected" visual state
This has been reintroduced since my PR #46050 fixed this.
Cannot toggle menu sections open/closed
We can't toggle the sections open/closed. I think this is due to the top-level items now having a dual function of:
- Navigating to a route.
- Toggling the menu section.
Clicking some sections appears to close other sections
This seems fairly random but watching the capture below you can see clicking on some sections closes another section whereas for others it doesn't.
Definitely, fixed that just now: Unrelated to the changes here: I have to say it feels a bit weird that a section can be open but not selected. AFAIR we did that so the menu doesn't jump when opening a different section (which less of an issue in wp-admin because of the full reload). That said, maybe we should consider closing sections when clicking a different section. IIRC @getdave suggested that previously.
I definitely agree those should be addressed! That said, they seem to be unrelated to this PR? |
That's much better now @frontdevde - thanks for fixing that.
We decided against this because otherwise if you have a section open and then you click another section you get a double whammy "jump" of
This felt like a worse experience but I'm happy to be told I'm wrong. Either way we should address in a followup. Let's raise an Issue.
Let's tackle in followups. I raised the following Issues: #46089 #46091 |
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's not related to this PR but I adjusted the hover color anyway. Reader has a different markup and css class structure and will need additional attention. We should do this in a seperate PR, we're already doing more than we should in this one imo. |
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.
Thanks for being so diligent on this and putting up with having to rebase in my PR and all my changes.
On last test this look much better than it is in master
and so I say merge and followup.
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.
WordPress Desktop CI Failure for job "wp-desktop-mac".
@frontdevde please inspect this job's build steps for breaking changes at this link. For temporal failures, you may try to "Rerun Workflow from Failed".
Please also ensure this branch is rebased off latest Calypso.
^ Just noting that tests passed prior to deploying. |
Changes proposed in this Pull Request
This PR adds a flyout menu that appears on hover to the Calypso sidebar.
For details and design see issue #45676
Known issues
This is an initial prototype implementation for the flyout. It's meant to give us an initial feel for how the flyout in Calypso.
There are two known issues, that we'll have to address next:
Right now in Calypso the sidebar container is
position:fixed
and it's content is scrollable. Theoverflow:auto
on the sidebar prevents the flyout from being visible. We're deactivating it here but this has two side effects: a) the sidebar container isn't scrollable anymore and b) when using the site switcher, the overflow is visible when selecting a site. wp-admin gets around the first issue by not having a scrollable sidebar container but instead adjusting the sidebar positioning via JS based on scroll state. The second issue is not present in wp-admin as there's no in-page site switcher.On nav elements towards the bottom of the page flyouts get cut off. In wp-admin the flyouts are positioned higher via JS if the content doesn’t fit the screen.
Flyout menus with a lot of items also get cut off. This is an issue with the reader in particular. In wp-admin the same can happen if there are too many items in a menu.
Testing instructions
yarn && yarn start
or use the calypso.live link?flags=nav-unification
to the URL