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(JumpLinks): Add replaceNavHistory option #11473

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jeff-phillips-18
Copy link
Member

What:
Closes #11471

@patternfly-build
Copy link
Contributor

patternfly-build commented Jan 23, 2025

@mfrances17 mfrances17 requested review from mfrances17, a team and tlabaj and removed request for a team January 23, 2025 21:28
@@ -46,6 +46,8 @@ export interface JumpLinksProps extends Omit<React.HTMLProps<HTMLElement>, 'labe
toggleAriaLabel?: string;
/** Class for nav */
className?: string;
/** Whether the navigation history should be replaced rather than pushed */
replaceNavHistory?: boolean;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
replaceNavHistory?: boolean;
shouldReplaceNavHistory?: boolean;

@@ -46,6 +46,8 @@ export interface JumpLinksProps extends Omit<React.HTMLProps<HTMLElement>, 'labe
toggleAriaLabel?: string;
/** Class for nav */
className?: string;
/** Whether the navigation history should be replaced rather than pushed */
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
/** Whether the navigation history should be replaced rather than pushed */
/** Whether the current entry in the navigation history should be replaced when a JumpLinksItem is clicked. By default a new entry will be pushed to the navigation history. */

Maybe something like this for the description? Just to make it clear that only the current history item would be replaced rather than the entire history being replaced.

Copy link
Contributor

@mfrances17 mfrances17 left a comment

Choose a reason for hiding this comment

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

LGTM w/ Eric's suggestions 👍

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.

JumpLinks - Add ability to replace the current location rather than adding to the history
4 participants