osrd icon indicating copy to clipboard operation
osrd copied to clipboard

front: fix trad no item in timetabletoolbar

Open Uriel-Sautron opened this issue 10 months ago • 7 comments

When our timetable is empty, we must display No item and not No train. During development of PacedTrainItem, we forgot to delete part of the code

Uriel-Sautron avatar Mar 04 '25 17:03 Uriel-Sautron

:warning: Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 80.70%. Comparing base (8afd60f) to head (8ec2543). Report is 8 commits behind head on dev.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev   #11033   +/-   ##
=======================================
  Coverage   80.69%   80.70%           
=======================================
  Files        1098     1098           
  Lines      111888   111907   +19     
  Branches      745      745           
=======================================
+ Hits        90289    90315   +26     
+ Misses      21556    21549    -7     
  Partials       43       43           
Flag Coverage Δ
editoast 72.41% <ø> (+0.03%) :arrow_up:
front 89.93% <100.00%> (-0.01%) :arrow_down:
gateway 2.18% <ø> (ø)
osrdyne 2.53% <ø> (ø)
railjson_generator 87.58% <ø> (ø)
tests 87.90% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Mar 04 '25 17:03 codecov-commenter

While paced train is in dev mode, should we keep the No train when switch is off ?

SharglutDev avatar Mar 04 '25 17:03 SharglutDev

Even if the switch is off in the timetable, a train can be considered as an item. But I understand your questioning.

Uriel-Sautron avatar Mar 04 '25 19:03 Uriel-Sautron

I think we should keep "Aucun train" in the classic mode, if it is not too long to implement, in order not to disturb users

maelysLeratRosso avatar Mar 05 '25 10:03 maelysLeratRosso

Ok we can leave this PR for the end of the paced train development.

Uriel-Sautron avatar Mar 05 '25 10:03 Uriel-Sautron

Ok we can leave this PR for the end of the paced train development.

I think we are there. What should we do with this PR?

flomonster avatar Jul 24 '25 10:07 flomonster

Probably the only needed change should now be :

label={computedItemLabel()}

in the checkbox label in TimetableToolbar.tsx. This way we will have the "No item".

SharglutDev avatar Jul 24 '25 11:07 SharglutDev