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

front: remove unused store variables #6025

Closed
19 of 23 tasks
nicolaswurtz opened this issue Dec 6, 2023 · 1 comment · Fixed by #10695
Closed
19 of 23 tasks

front: remove unused store variables #6025

nicolaswurtz opened this issue Dec 6, 2023 · 1 comment · Fixed by #10695
Assignees
Labels
area:front Work on Standard OSRD Interface modules kind:refacto-task Task related to Refactorization Epic

Comments

@nicolaswurtz
Copy link
Contributor

nicolaswurtz commented Dec 6, 2023

Description

Some store variable are unused, they should be removed or moved to another reducer.

  • harmonize the sub-reducers (remove the types in PowerRestrictionsReducer...)
  • move all the types in the types file (especially OperationalStudiesConfState)
  • export the specific selectors or actions of each part of the store to avoid casting useOsrdConfActions() as StdcmConfSliceActions or useOsrdConfSelectors() as StdcmConfSelectors

Variables to remove:

  • osrdsimulation
    • redirectToGraph
    • mustRedraw
    • signalBase

Variables to move to another reducer:

  • osrdConfCommon -> operationalStudiesConf
    • labels
    • allowances
    • trainCount
    • trainDelta
    • trainStep
    • usingElectricalProfiles
    • powerRestrictionRanges
    • initialSpeed
  • osrdConfCommon -> stdcmConf
    • gridMarginBefore
    • gridMarginAfter
    • originUpperBoundDate
    • originUpperBoundTime
    • originLinkedBounds
    • destinationDate
    • destinationTime

AC & Implementation plan

  • the store is smaller and cleaner
@nicolaswurtz nicolaswurtz added the area:front Work on Standard OSRD Interface modules label Dec 6, 2023
@clarani clarani added the kind:refacto-task Task related to Refactorization Epic label Sep 17, 2024
@clarani clarani self-assigned this Jan 2, 2025
@clarani
Copy link
Contributor

clarani commented Jan 2, 2025

I also add some new tasks related to this refacto:

  • harmonize the sub-reducers (remove the types in PowerRestrictionsReducer...)
  • move all the types in the types file (especially OperationalStudiesConfState)
  • export the specific selectors or actions of each part of the store to avoid casting useOsrdConfActions() as StdcmConfSliceActions or useOsrdConfSelectors() as StdcmConfSelectors

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:refacto-task Task related to Refactorization Epic
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants