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

Navigation Component: Improve the Back Navigation #25247

Closed
Copons opened this issue Sep 11, 2020 · 0 comments · Fixed by #25364
Closed

Navigation Component: Improve the Back Navigation #25247

Copons opened this issue Sep 11, 2020 · 0 comments · Fixed by #25364
Assignees
Labels
[Feature] Navigation Component A navigational waterfall component for hierarchy of items. [Status] In Progress Tracking issues with work in progress

Comments

@Copons
Copy link
Contributor

Copons commented Sep 11, 2020

  • Explore if it's possible to automatize the back button label for nested menus.
    Right now consumers have to provide the label manually (or it defaults to "Back").

{ parentMenu && (
<MenuBackButtonUI
className="components-navigation__back-button"
isTertiary
onClick={ () => setActiveMenu( parentMenu, 'right' ) }
>
<Icon icon={ chevronLeft } />
{ backButtonLabel || __( 'Back' ) }
</MenuBackButtonUI>
) }

By traversing the Navigation children we should be able to infer the parent menu's title and automatically use it as back button label for its children menus.

Depends on #25246 exploration.


  • Add an onBackButtonClick handler.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Navigation Component A navigational waterfall component for hierarchy of items. [Status] In Progress Tracking issues with work in progress
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants