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(left-nav): refactor into left-nav-sections and include animations #6393

Merged

Conversation

annawen1
Copy link
Member

@annawen1 annawen1 commented Jun 16, 2021

Related Ticket(s)

Web Component: Change Mega Menu to include animation (back button & forward motion) #4831
[Left Nav: Web Components]: L1 items are visible when on L2 menu items #6209
Web component: Masthead-With custom data - Hybrid cloud options are missing from the menu options. #5135

Description

Refactor left-nav so all menu panels/sections are on the same level instead of nested.

Align animations for forward and backward movement.

Jun-16-2021 17-42-51

Changelog

New

  • left-nav-menu-section component that handles all the focus of first element, back button functionality
  • add L1 platform name to the left-nav

Changed

  • set tabindex to -1 for left-nav-menu and left-nav-menu-item
  • reduced logic of left-nav-menu to only render menu items that have a menu
  • move cloud profile and cta menu items to within a menu section in cloud-masthead-composite
  • add conditional to focuswrap utility when focus doesn't hit start or end sentinel which allows the first menu item to focus when left-nav is expanded

Removed

  • styles that are no longer needed

@annawen1 annawen1 added the package: web components Work necessary for the IBM.com Library web components package label Jun 16, 2021
@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented Jun 16, 2021

@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented Jun 16, 2021

@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented Jun 16, 2021

Deploy preview created for package Web Components:
https://ibmdotcom-webcomponents.s3.us-east.cloud-object-storage.appdomain.cloud/deploy-previews/6393/index.html

Built with commit: 63743fdc6ca7770cc04eb3df0041e73ac764c125

@annawen1 annawen1 added the Needs design approval PRs on feature requests and new components have to get design approval before merge. label Jun 24, 2021
@shixiedesign
Copy link
Contributor

shixiedesign commented Jun 24, 2021

Thank you so much for taking this one!

  1. Focus state of Back button should keep the blue color. Currently it becomes black on focus
    Jun-24-2021 13-10-56

  2. When I tab through all the options in the panel, the focus state disappears and next panel appears, however I cannot get the focus state back, and left and right arrow keys slide the panels back and forth. I imagine the disappearing focus state is important to fix. In react, the focus state returns to menu's top item.
    Jun-24-2021 14-23-56

  3. In both web comp & react: how do I navigate to x button with keyboard? Tab never gets there it seems.

  4. In both web comp & react, md breakpoint: clicking outside the menu on page with an overlay should close the menu. Currently it doesn't do anything.

  5. At the bottom of the menu, there should always be 48px spacing. Currently missing bottom spacing at the end of the menu:
    Jun-24-2021 14-33-15
    Spec:
    image

  6. Panels allow me the scroll left-and-right:
    Jun-24-2021 14-30-49

@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented Jun 24, 2021

@shixiedesign shixiedesign self-assigned this Jun 24, 2021
@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented Jun 24, 2021

@annawen1 annawen1 marked this pull request as ready for review June 25, 2021 14:31
@annawen1
Copy link
Member Author

annawen1 commented Jun 25, 2021

Thank you so much for taking this one!

  1. Focus state of Back button should keep the blue color. Currently it becomes black on focus

Done

  1. When I tab through all the options in the panel, the focus state disappears and next panel appears, however I cannot get the focus state back, and left and right arrow keys slide the panels back and forth. I imagine the disappearing focus state is important to fix. In react, the focus state returns to menu's top item.

It should now focus on the back button when on the next panel. Also the left and right arrow keys should not allow for the panels to slide back and forth anymore.

  1. In both web comp & react: how do I navigate to x button with keyboard? Tab never gets there it seems.

In web components, you should be able to get to the x button when tabbing through the menu items now, it should jump to the x button when tabbing past the last menu item.

For React, it's coded a bit differently and user has to go back to the initial menu panel to access the x.

  1. In both web comp & react, md breakpoint: clicking outside the menu on page with an overlay should close the menu. Currently it doesn't do anything.

hmm yeah that's been like that since we created the left nav I believe. We can address this in another ticket.

  1. At the bottom of the menu, there should always be 48px spacing. Currently missing bottom spacing at the end of the menu:

Done

  1. Panels allow me the scroll left-and-right:

Addressed!

@shixiedesign
Copy link
Contributor

  1. shift+Tab allows users to access the Profile and Search buttons. Expecting keyboard access to not reach there just like mouse is unable to interact with those:
    Jun-25-2021 13-20-46

  2. Both react & web components: the background overlay should fade out over time with the menu moving out. Currently the background overlay just disappears.
    Jun-25-2021 13-22-32

Copy link
Member

@kennylam kennylam left a comment

Choose a reason for hiding this comment

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

Nice one @annawen1! Just some really small fixes.

@annawen1
Copy link
Member Author

annawen1 commented Jun 30, 2021

@shixiedesign The first issue is now addressed. The second one we can open a new ticket for.

  1. shift+Tab allows users to access the Profile and Search buttons. Expecting keyboard access to not reach there just like mouse is unable to interact with those:
  1. Both react & web components: the background overlay should fade out over time with the menu moving out. Currently the background overlay just disappears.

Copy link
Member

@jeffchew jeffchew left a comment

Choose a reason for hiding this comment

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

LGTM!

@shixiedesign shixiedesign removed the Needs design approval PRs on feature requests and new components have to get design approval before merge. label Jul 1, 2021
Copy link
Contributor

@shixiedesign shixiedesign left a comment

Choose a reason for hiding this comment

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

🌶️ 🌶️ 🌶️

@jeffchew jeffchew added the Ready to merge Label for the pull requests that are ready to merge label Jul 1, 2021
@kodiakhq kodiakhq bot merged commit 17a70e4 into carbon-design-system:master Jul 1, 2021
@annawen1 annawen1 deleted the feat/wc-left-nav-animations branch July 1, 2021 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature flag package: web components Work necessary for the IBM.com Library web components package Ready to merge Label for the pull requests that are ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants