kedro-org / kedro-viz

Visualise your Kedro data and machine-learning pipelines and track your experiments.
https://demo.kedro.org
Apache License 2.0
682 stars 113 forks source link

Introduce HashRouter #2172

Closed jitu5 closed 2 weeks ago

jitu5 commented 3 weeks ago

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 to HashRouter 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=1e3cc50a

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

Development notes

Improvements to URL handling:

Routing changes:

Pathname generation logic:

QA notes

I have deployed the changes to Github pages https://jitu5.github.io to test.

Checklist