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

Add the selected train and the projection to the scenario URL #9018

Closed
2 tasks done
axrolld opened this issue Sep 26, 2024 · 0 comments · Fixed by #9429
Closed
2 tasks done

Add the selected train and the projection to the scenario URL #9018

axrolld opened this issue Sep 26, 2024 · 0 comments · Fixed by #9429
Assignees
Labels
area:front Work on Standard OSRD Interface modules kind:enhancement Improvement of existing features module:operational-studies Multi-train simulation with structured studies management

Comments

@axrolld
Copy link
Contributor

axrolld commented Sep 26, 2024

Description and goal

It would be very nice if the train I have selected and the projection I'm using on my GET are not reset after a refresh. #9011 exist.

We should encode the selected train and projection in the URL doing so will allow sharing a specific view to others.

Technical design

The URL could look like this:

https://..../operational-studies/projects/64/studies/312/scenarios/592?selected_train=4242&projection=8484

Both selected_train and projection are train schedule ids.

Note

If this query parameter is not provided / invalid (deleted train). These parameters should be replaced by the first valid train.

Tip

Bonus: The selected train/projection could also be saved in the local storage. So the next time a user opens its scenario, he has the same page as before.

  • Query params have priority
  • These parameters must be associated with the scenario (each scenario has it's last selected train/projection)

Acceptance criteria

  • When refreshing a scenario page, the previously selected train and train used for the projection are kept
  • When sharing the URL we should retrieve the same selected train/projection
@axrolld axrolld added kind:enhancement Improvement of existing features module:operational-studies Multi-train simulation with structured studies management labels Sep 26, 2024
@flomonster flomonster added the area:front Work on Standard OSRD Interface modules label Sep 26, 2024
@flomonster flomonster changed the title Memorize the selected train and the projection when refreshing a scenario Add the selected train and the projection to the scenario URL Sep 26, 2024
@Synar Synar self-assigned this Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:front Work on Standard OSRD Interface modules kind:enhancement Improvement of existing features module:operational-studies Multi-train simulation with structured studies management
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants