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

[meta] front: manage TODOs in front/src #7861

Open
Yohh opened this issue Jun 27, 2024 · 0 comments
Open

[meta] front: manage TODOs in front/src #7861

Yohh opened this issue Jun 27, 2024 · 0 comments
Assignees
Labels
area:front Work on Standard OSRD Interface modules kind:enhancement Improvement of existing features

Comments

@Yohh
Copy link
Contributor

Yohh commented Jun 27, 2024

Description and goal

we have a hundred TODO comments in front/src
half are tagged TS2 or DROP V1 and will be managed during the PI11
half are sometimes 15 months old
we have to managed those old TODOs

Acceptance criteria


DROP V1

  • common/Map/WarpedMap/SimulationWarpedMap.tsx:276: // TODO DROP V1: remove this condition
  • modules/simulationResult/components/SpeedSpaceChart/types.ts:70:// TODO DROP V1: remove this
  • modules/simulationResult/components/SpeedSpaceChart/types.ts:99:// TODO DROP V1: remove this
  • modules/simulationResult/components/SpeedSpaceChart/SpeedSpaceSettings.tsx:23: electrificationRanges: ElectrificationRange[] | PathPropertiesFormatted['electrifications']; // TODO DROP V1 : remove ElectrificationRange type
  • modules/simulationResult/components/SpeedSpaceChart/SpeedSpaceSettings.tsx:58: electricRanges: (ElectrificationRange | ElectrificationRangeV2)[] // TODO DROP V1 : remove ElectrificationRange type
  • modules/simulationResult/components/SpeedSpaceChart/utils.ts:33: curves: RadiusPosition[] | PositionData<'radius'>[], // TODO DROPV1 : remove RadiusPosition type
  • modules/simulationResult/components/SpeedSpaceChart/d3Helpers.ts:45:// TODO DROP V1 : remove this
  • modules/simulationResult/components/SpeedSpaceChart/d3Helpers.ts:207: trainSimulation: GevPreparedDataV2 | GevPreparedData, // TODO DROP V1 : remove GevPreparedData type
  • modules/simulationResult/components/SpeedSpaceChart/prepareData.ts:11:// TODO DROP V1 : remove PositionSpeedTime type
  • modules/simulationResult/components/SpeedSpaceChart/prepareData.ts:21: slopesHistogram: GradientPosition[] | PositionData<'gradient'>[], // TODO DROP V1 : remove GradientPosition type
  • modules/simulationResult/components/SpeedSpaceChart/prepareData.ts:31:// TODO DROP V1 : remove this
  • modules/simulationResult/components/ChartHelpers/drawCurve.ts:12: | ArrayElement<GevPreparedData[keyof GevPreparedData]> // TODO DROP V1: remove this line
  • modules/simulationResult/components/ChartHelpers/ChartHelpers.ts:109:// TODO DROP V1 : remove this
  • modules/simulationResult/components/ChartHelpers/ChartHelpers.ts:230:// TODO DROP V1 : remove this
  • modules/simulationResult/components/ChartHelpers/ChartHelpers.ts:284: dataSimulation: { speed: PositionSpeedTime[] | ReportTrainData[] }, // TODO DROP V1 : remove PositionSpeedTime type
  • modules/simulationResult/components/ChartHelpers/ChartHelpers.ts:302: dataSimulation: { speed: PositionSpeedTime[] | ReportTrainData[] }, // TODO DROP V1 : remove PositionSpeedTime type
  • modules/simulationResult/components/ChartHelpers/drawElectricalProfile.ts:17:// TODO DROP V1 : remove this
  • modules/simulationResult/components/ChartHelpers/drawHelpers.ts:13: segment: ElectricalConditionSegment | ElectricalConditionSegmentV2 | PowerRestrictionSegment, // TODO DROP V1: remove ElectricalConditionSegment
  • modules/simulationResult/components/SpaceTimeChart/createTrain.ts:59:// TODO DROP V1: remove this
  • modules/simulationResult/components/SpaceTimeChart/useStoreDataForSpaceTimeChart.ts:18:// TODO DROP V1 : remove this
  • modules/simulationResult/components/SpaceTimeChart/drawTrain.ts:11:// TODO DROP V1: readapt this function for v2 by removing everything related to base, eco
  • modules/simulationResult/components/SpaceTimeChart/d3Helpers.ts:16:// TODO DROP V1: remove this
  • modules/simulationResult/components/SpaceTimeChart/d3Helpers.ts:88:// TODO DROP V1: remove this
  • applications/operationalStudies/consts.ts:140:// TODO DROP V1: remove this
  • applications/operationalStudies/consts.ts:161:// TODO DROP V1: remove this
  • applications/operationalStudies/consts.ts:181:// TODO DROP V1: remove this
  • applications/operationalStudies/consts.ts:207:// TODO DROP V1: remove this

TS2

  • modules/rollingStock/components/RollingStockCard/RollingStockCardButtons.tsx:47: // TODO TS2 : when dropping v1, change comfort type to TrainScheduleBase['comfort']
  • modules/simulationResult/components/SpeedSpaceChart/utils.ts:186: // TODO TS2 : what to do with handled ?
  • [ ]
  • modules/pathfinding/components/Itinerary/DisplayItinerary/v2/OriginV2.tsx:41: // TODO TS2 : update stdcm store for trainschedule V2 ?
  • modules/pathfinding/components/Pathfinding/PathfindingV2.tsx:165: // TODO TS2 : update this parts in margins and powerrestriction issues
  • modules/pathfinding/components/Pathfinding/PathfindingV2.tsx:338: // TODO TS2 : adapt this in margins and powerrestrictions issues
  • modules/pathfinding/components/Pathfinding/TypeAndPathV2.tsx:245: // TODO TS2 : test errors display after core / editoast connexion for pathProperties
  • modules/trainschedule/components/ManageTrainSchedule/AddTrainScheduleV2Button.tsx:40: // TODO TS2 : remove this when rollingStockName will replace rollingStockId in the store
  • modules/trainschedule/components/ManageTrainSchedule/types.ts:56: // TODO TS2 : adapt this for times and stops / power restrictions issues
  • modules/trainschedule/components/ManageTrainSchedule/ManageTrainScheduleMap/RenderPopup.tsx:96: // TODO TS2: if !pathProperties, return null
  • modules/trainschedule/components/ManageTrainSchedule/helpers/checkCurrentConfig.ts:17: // TODO TS2 : remove this when rollingStockName will replace rollingStockId in the store
  • modules/trainschedule/components/ManageTrainSchedule/helpers/checkCurrentConfig.ts:157: // TODO TS2 : adapt this for power restrictions issue
  • modules/trainschedule/components/ManageTrainSchedule/helpers/formatTrainSchedulePayload.ts:33: // TODO TS2 : handle power restrictions
  • modules/trainschedule/components/ManageTrainSchedule/helpers/formatTrainSchedulePayload.ts:36: // TODO TS2 : handle handle margins
  • modules/trainschedule/components/ManageTrainSchedule/helpers/adjustConfWithTrainToModify.ts:159: // TODO TS2 : check that this format is still the one we need
  • modules/trainschedule/components/ManageTrainSchedule/TrainSettings.tsx:33: // TODO TS2 : remove departureTime when drop v1
  • reducers/osrdconf/types.ts:36: // TODO TS2 : remove this property from store when drop v1
  • applications/operationalStudies/hooks.ts:70: // TODO TS2 : Next part might not be needed (except to updePathSteps), we need inly trainSchedulePath and
  • applications/operationalStudies/hooks.ts:136: // TODO TS2 : test errors display after core / editoast connexion for pathProperties
  • applications/operationalStudies/hooks.ts:250: // TODO GET v2 : probably remove this conversion as trains will travel on several days
  • applications/operationalStudies/views/v2/ManageTrainScheduleV2.tsx:57: // TODO TS2 : test this hook in simulation results issue
  • applications/stdcm/views/StdcmResultsV2.tsx:25:// TODO TS2 : Adapt StdcmResult to trainSchedule v2 (SpaceTimeChart and SpeedSpaceChart)
  • applications/stdcm/views/StdcmViewV1.tsx:6:// TODO TS2: rename ManageTrainSchedulePathProperties and move it to /modules/pathfinding
  • utils/geometry.ts:141: // TODO TS2 : when adapting train update check that this computation works properly

OTHERS

  • styles/scss/applications/stdcmV2/_home.scss:23: /TODO Waiting to fix the button in ui-core.../
  • styles/scss/applications/stdcmV2/_card.scss:39: // TODO: remove this style after ui-core component is implemented
  • common/IntervalsDataViz/data.ts:359: * TODO: cases on extremities
  • common/IntervalsDataViz/data.ts:385: // TODO: an impovment can be to take the one in the middle if there are many
  • common/IntervalsDataViz/data.ts:663: * TODO: need to be check and tested (specially the underlying update function)
  • common/IntervalsDataViz/IntervalItem.tsx:128: // TODO use the frag tool context here
  • common/IntervalsEditor/IntervalsEditor.tsx:284: // TODO: should we display it ?
  • common/Map/WarpedMap/SimulationWarpedMap.tsx:212: // TODO: remove the cast to Train
  • modules/rollingStock/hooks/useFilterRollingStock.tsx:112: // TODO: investigate if the main condition does not have bad side effects
  • modules/rollingStock/types.ts:9: // TODO: remove this line in the type
  • modules/rollingStock/types.ts:48: // TODO: remove this line in the type
  • modules/rollingStock/components/RollingStockEditor/RollingStockEditorFormHelpers.tsx:107:// TODO: make the conditional return clearer
  • modules/simulationResult/components/TrainDetailsV2.tsx:18: * @todo do not work with colors as string as soon as possible
  • modules/simulationResult/components/TrainDetailsV2.tsx:24: // TODO GET v2 : probably remove this conversion as trains will travel on several days
  • modules/simulationResult/components/TrainDetails.tsx:18: * @todo do not work with colors as string as soon as possible
  • modules/simulationResult/components/SimulationResultsMap.tsx:211: // TODO: delete this cast when we have chosen the appropriate type for the simulation
  • modules/simulationResult/components/SimulationResultsMap.tsx:384: train={selectedTrain as Train} // TODO: remove Train interface
  • modules/simulationResult/components/SpaceCurvesSlopes.tsx:200: // TODO : figure out a more precise name for future refacto
  • modules/simulationResult/components/SimulationResultsMapV2.tsx:365: train={selectedTrain as Train} // TODO: remove Train interface
  • modules/simulationResult/components/SpaceCurvesSlopes/SpaceCurvesSlopesV2.tsx:189: // TODO : figure out a more precise name for future refacto
  • modules/trainschedule/components/ManageTrainSchedule/helpers/adjustConfWithTrainToModify.ts:102: // TODO: refacto this when using the new train_schedule endpoints
  • reducers/osrdsimulation/index.ts:12:// TODO: Dependency cycle will be removed during the refactoring of store
  • reducers/osrdsimulation/index.ts:93: draft.simulation.present.trains as Train[] // TODO: remove Train interface
  • reducers/osrdsimulation/selectors.ts:25: // TODO: delete this cast when we have chosen the appropriate type for the simulation
  • reducers/osrdsimulation/simulation.ts:55: // TODO: add the other information of the trainSchedule (allowances...)
  • reducers/main/index.ts:23: // TODO rename setLoading, setSucess with more meaningful names like pushLoadingNotification, pushSucessNotification, ...
  • reducers/map/index.ts:152:// TODO Need this with routing ?
  • reducers/osrdconf/types.ts:32: // TODO: update the call to the api, to rename the fields begin & end -> begin_position & end_position
  • applications/operationalStudies/views/SimulationResults.tsx:243: selectedTrain={selectedTrain as Train} // TODO: remove Train interface
  • applications/operationalStudies/views/SimulationResults.tsx:256: train={selectedTrain as Train} // TODO: remove Train interface
  • applications/editor/tools/rangeEdition/speedSection/SpeedSectionEditionLayers.tsx:352:// /* TODO */
  • applications/editor/tools/pointEdition/tests/utils.spec.ts:142:// TODO - add TVM300 and TVM430 tests
  • applications/editor/tools/switchEdition/types.ts:15:// TODO : Would be better and safer if editoast was sending this type in the getSwitchTypes endpoint so we can remove all related types #7872
  • applications/editor/tools/switchEdition/useSwitch.ts:19:// TODO : Rename all switch by tracknode when back renaming PR merged
  • applications/editor/components/LayersModal.tsx:83: // TODO: ATM we don't know if a selected speed section should be considered as SpeedSection or PSL,
  • applications/editor/components/LinearMetadata/FormComponent.tsx:203: // TODO: should we display it ?
  • applications/editor/components/LinearMetadata/FormComponent.tsx:392: // TODO: Should we display the resize error ?
  • applications/stdcm/hooks/useStdcm.tsx:96: trains as Train[] // TODO: remove Train interface
  • applications/stdcm/views/StdcmConfig.tsx:157: {/* TODO: use RTK request status */}
  • applications/stdcm/utils.ts:7:// TODO: The number must be calculated from a hash of stdcm inputs (to have a stable number). It is currently generated randomly, so there could be duplicates.
  • applications/stdcm/utils.ts:17:// TODO: This function is only used for V1, so it must be deleted when V1 is abandoned.
  • applications/stdcm/components/SimulationReportSheetV2.tsx:29: // TODO: Add RC information when it becomes avalaible, until that, we use fake ones
  • applications/stdcm/components/SimulationReportSheetV2.tsx:128: {/* TODO: Add path number and date from reference path when it becomes avalaible */}
  • applications/stdcm/components/SimulationReportSheetV2.tsx:201: {/* TODO: Add path number and date from reference path when it becomes avalaible */}
  • applications/stdcm/components/SimulationReportSheet.tsx:36: // TODO: Add RC information when it becomes avalaible, until that, we use fake ones
  • applications/stdcm/components/SimulationReportSheet.tsx:123: {/* TODO: Add path number and date from reference path when it becomes avalaible */}
  • applications/stdcm/components/SimulationReportSheet.tsx:196: {/* TODO: Add path number and date from reference path when it becomes avalaible */}
  • applications/stdcmV2/views/StdcmViewV2.tsx:57: {/* //TODO: rename StdcmDefaultCard */}
  • applications/stdcmV2/components/StdcmSuggestions.tsx:47: // TODO: find a better way to do this when ui-core suggestion component is implemented
  • applications/stdcmV2/components/StdcmDestination.tsx:25: {/* TODO: enable this select when the feature is implemented in the backend */}
  • utils/date.ts:77:// TODO: This function is only used for V1, so it must be deleted when V1 is abandoned. Also we must rename formatDayV2.
@Yohh Yohh changed the title front: manages TODOs in front/src [meta] front: manages TODOs in front/src Jun 27, 2024
@Yohh Yohh added kind:enhancement Improvement of existing features area:front Work on Standard OSRD Interface modules labels Jun 27, 2024
@Yohh Yohh changed the title [meta] front: manages TODOs in front/src [meta] front: manage TODOs in front/src Jun 27, 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
Projects
None yet
Development

No branches or pull requests

2 participants