Closed jitu5 closed 2 weeks ago
Resolves https://github.com/kedro-org/kedro-viz/issues/2048
This pull request includes changes to improve URL handling and routing in the application. The most important changes involve, switching from BrowserRouter to HashRouter and updating the pathname generation logic.
BrowserRouter
HashRouter
To fix the demo site issue, We need to move to hashRouter so now new url looks like this https://jitu5.github.io/#/?types=nodes,datasets&pid=__default__&expandAllPipelines=false&sid=1e3cc50a
hashRouter
Accessing the experiment tracking page directly via the URL https://jitu5.github.io/#/experiment-tracking is working as expected.
The old URL without a # will work as expected, as a check has been added for redirection. https://jitu5.github.io/?types=nodes,datasets&pid=__default__&expandAllPipelines=false&sid=1e3cc50a
#
Improvements to URL handling:
src/components/app/app.js
Routing changes:
src/components/wrapper/wrapper.js
Pathname generation logic:
src/utils/hooks/use-generate-pathname.js
useGeneratePathname
I have deployed the changes to Github pages https://jitu5.github.io to test.
RELEASE.md
Description
Resolves https://github.com/kedro-org/kedro-viz/issues/2048
This pull request includes changes to improve URL handling and routing in the application. The most important changes involve, switching from
BrowserRouter
toHashRouter
and updating the pathname generation logic.To fix the demo site issue, We need to move to
hashRouter
so now new url looks like this https://jitu5.github.io/#/?types=nodes,datasets&pid=__default__&expandAllPipelines=false&sid=1e3cc50aAccessing the experiment tracking page directly via the URL https://jitu5.github.io/#/experiment-tracking is working as expected.
The old URL without a
#
will work as expected, as a check has been added for redirection. https://jitu5.github.io/?types=nodes,datasets&pid=__default__&expandAllPipelines=false&sid=1e3cc50aDevelopment notes
Improvements to URL handling:
src/components/app/app.js
: Added logic to ensure the URL hash is correctly set when the component mounts.Routing changes:
src/components/wrapper/wrapper.js
: Switched fromBrowserRouter
toHashRouter
to handle routing with URL hashes.Pathname generation logic:
src/utils/hooks/use-generate-pathname.js
: Updated theuseGeneratePathname
hook to push the new URL only if it differs from the current URL.QA notes
I have deployed the changes to Github pages https://jitu5.github.io to test.Checklist
RELEASE.md
file