OpenRailAssociation / OpenRailAssociation/osrd

META : front: refacto rollingstock module to adapt it to new front architecture rules

Open
#5,083 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.