OpenRailAssociation / OpenRailAssociation/osrd
META : front: refacto rollingstock module to adapt it to new front architecture rules
Open
Nobody has claimed this yet.
area:front
component:rollingstock
kind:refacto-task
module:rollingstocks-editor
- Dominant language
- TypeScript
- Stars
- 660
- Forks
- 87
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 269
Description
Description and goal
RollingStock module need to be adapted to the new front architecture rules
Acceptance criteria
- rollingStockEditor folder should have an index.ts for easier imports like the selector one
- RollingStockSelector HOC should be removed ?
- harmonize props structure and naming (no "Props" but "ComponentProps") in all components by using types (?)
- all selector calls (and dispatch ?) should be moved to the view (RollingStockEditor.tsx) and passes down with props drilling
- RollingStockEditorCurves.tsx should be refacto to be less huge
- helpers/utilities functions in RollingStockEditorCurves.tsx should be moved in the helper folder
- helpers/utiliers functions in SearchRollingStock.tsx should be moved in the helper folder
- All complex components or functions should have a description for easier maintainability
- units tests for the editor ? or e2e only ?
- rsEditorHelpers should be splited in 2 components (parameter / Metadata) ?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by mapping the rollingStockEditor structure, especially RollingStockEditor.tsx, RollingStockEditorCurves.tsx, SearchRollingStock.tsx, and rsEditorHelpers. Check how the RollingStockSelector HOC, selectors, dispatches, helpers, and component props are currently organized. Done means the listed architecture, helper extraction, naming, documentation, and testing decisions are resolved consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100