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

Editor: Store management of the infraID #5377

Closed
sim51 opened this issue Oct 18, 2023 · 0 comments
Closed

Editor: Store management of the infraID #5377

sim51 opened this issue Oct 18, 2023 · 0 comments
Labels
area:front Work on Standard OSRD Interface modules kind:bug Something isn't working module:infra-editor Infra Edition severity:major Major severity bug

Comments

@sim51
Copy link
Contributor

sim51 commented Oct 18, 2023

What happened?

In the code editor we use the infraID that is saved in the stored.

But the selector for the infraID is based on the mode (ie. stdmc or simulation) of the application, which is never set in editor.
Moreover, on the save function (here : https://github.com/osrd-project/osrd/blob/dev/front/src/reducers/editor.ts#L141 ) we take the infraID from simulationConf (ie. statically, without using a selector or the mode).

This can lead to some weird behavior.

What did you expect to happen?

Solutions => propagate the infraID to the save function

Shall we create a new mode called 'editor' ?

How can we reproduce it (as minimally and precisely as possible)?

NA

What operating system, browser and environment are you using?

NA

OSRD version (top right corner Account button > Informations)

a6b9322

@sim51 sim51 added kind:bug Something isn't working area:front Work on Standard OSRD Interface modules severity:major Major severity bug module:infra-editor Infra Edition labels Oct 18, 2023
sim51 added a commit that referenced this issue Oct 18, 2023
infraID was read from the store with selectors that used the `mode`
property to know where to read it, but the save function read it directly from the simulation.
Yo avoid bad beahvior, I propagate the infraID to the save function.
sim51 added a commit that referenced this issue Oct 19, 2023
infraID was read from the store with selectors that used the `mode`
property to know where to read it, but the save function read it directly from the simulation.
Yo avoid bad beahvior, I propagate the infraID to the save function.
github-merge-queue bot pushed a commit that referenced this issue Oct 19, 2023
infraID was read from the store with selectors that used the `mode`
property to know where to read it, but the save function read it directly from the simulation.
Yo avoid bad beahvior, I propagate the infraID to the save function.
@sim51 sim51 closed this as completed Oct 24, 2023
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:bug Something isn't working module:infra-editor Infra Edition severity:major Major severity bug
Projects
None yet
Development

No branches or pull requests

1 participant