This is a continuation/remake of this PR.
Also addresses issue #36
Description
Introduced the preserveQuery prop to the Wizard component to allow for maintaining search parameters in the URL during navigation. This addition ensures users can maintain state in the URL, enabling deep-linking scenarios and improving user experience.
Motivation and Context
The preserveQuery prop addresses a common use-case where developers want to maintain URL parameters for various reasons, such as sharing links or retaining user settings across navigation.
Addresses issue #36 .
How Has This Been Tested?
Wrote tests cases using the enzyme testing library. Tests handle scenarios listed below.
(Only when the preserveQuery prop is passed).
Ensure that it handles initial path with query
Ensure that it preserves initial query when navigating to the next step
Ensure that it preserves initial query when using replace
Ensure that it works with search params
Ensure that it does not add params if there were none
Let me know if there's a specific test scenario that I should add.
Types of Changes
[ ] Bug fix (non-breaking change which fixes an issue)
[X] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Documentation (adding or updating documentation)
[ ] Dependency update
Checklist:
[X] My change requires a change to the documentation and I have updated the documentation accordingly.
[X] My changes are in sync with the code style of this project.
[X] There aren't any other open Pull Requests for the same issue/update.
[X] These changes should be applied to a maintenance branch.
[X] This change requires cross browser checks.
[ ] This change adds additional environment variable requirements for react-albus users.
[ ] I have added the Apache 2.0 license header to any new files created.
What is the Impact to Developers Using react-albus?
Developers now have the option to maintain URL parameters using the preserveQuery prop. This enhancement will provide flexibility to developers, ensuring a better user experience in scenarios where URL state needs to be retained.
P.S - I can add an example under examples/preserve-query later on.
This is a continuation/remake of this PR. Also addresses issue #36
Description
Introduced the
preserveQuery
prop to theWizard
component to allow for maintaining search parameters in the URL during navigation. This addition ensures users can maintain state in the URL, enabling deep-linking scenarios and improving user experience.Motivation and Context
The
preserveQuery
prop addresses a common use-case where developers want to maintain URL parameters for various reasons, such as sharing links or retaining user settings across navigation.Addresses issue #36 .
How Has This Been Tested?
Wrote tests cases using the
enzyme
testing library. Tests handle scenarios listed below.(Only when the
preserveQuery
prop is passed).Let me know if there's a specific test scenario that I should add.
Types of Changes
Checklist:
What is the Impact to Developers Using react-albus?
Developers now have the option to maintain URL parameters using the
preserveQuery
prop. This enhancement will provide flexibility to developers, ensuring a better user experience in scenarios where URL state needs to be retained.P.S - I can add an example under
examples/preserve-query
later on.