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: add track column to timestops table #9614

Merged
merged 4 commits into from
Nov 28, 2024

Conversation

Synar
Copy link
Contributor

@Synar Synar commented Nov 7, 2024

Close #9526

@Synar Synar requested a review from a team as a code owner November 7, 2024 09:18
@codecov-commenter
Copy link

codecov-commenter commented Nov 7, 2024

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

Codecov Report

Attention: Patch coverage is 7.36196% with 151 lines in your changes missing coverage. Please review.

Project coverage is 38.14%. Comparing base (a9e4a9b) to head (2e4b902).
Report is 7 commits behind head on dev.

Files with missing lines Patch % Lines
...src/modules/timesStops/hooks/useOutputTableData.ts 0.00% 40 Missing and 1 partial ⚠️
...operationalStudies/hooks/useCachedTrackSections.ts 12.50% 28 Missing ⚠️
front/src/modules/timesStops/TimesStopsInput.tsx 0.00% 21 Missing ⚠️
...ns/operationalStudies/hooks/useScenarioContext.tsx 22.72% 17 Missing ⚠️
...c/modules/timesStops/hooks/useTimeStopsColumns.tsx 0.00% 12 Missing ⚠️
...ationResult/hooks/useFormattedOperationalPoints.ts 0.00% 8 Missing ⚠️
front/src/modules/pathfinding/utils.ts 0.00% 7 Missing ⚠️
front/src/modules/timesStops/TimesStops.tsx 0.00% 7 Missing ⚠️
...s/simulationResult/SimulationResultExport/utils.ts 0.00% 3 Missing ⚠️
...applications/operationalStudies/views/Scenario.tsx 0.00% 2 Missing ⚠️
... and 4 more

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

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #9614      +/-   ##
==========================================
- Coverage   38.18%   38.14%   -0.04%     
==========================================
  Files         996      998       +2     
  Lines       92033    92118      +85     
  Branches     1192     1192              
==========================================
  Hits        35143    35143              
- Misses      56434    56519      +85     
  Partials      456      456              
Flag Coverage Δ
editoast 73.31% <ø> (-0.03%) ⬇️
front 20.16% <7.36%> (-0.02%) ⬇️
gateway 2.18% <ø> (ø)
osrdyne 3.28% <ø> (ø)
railjson_generator 87.49% <ø> (ø)
tests 87.00% <ø> (ø)

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Synar Synar force-pushed the ali/add-track-col-to-timestops-table branch from 03a3ecd to 29742bf Compare November 7, 2024 09:39
@Synar Synar marked this pull request as draft November 7, 2024 11:03
@Synar Synar marked this pull request as ready for review November 7, 2024 15:35
@Synar
Copy link
Contributor Author

Synar commented Nov 7, 2024

(Update to the tests coming soon ^^)

@Synar Synar requested a review from Yohh November 8, 2024 08:41
@Synar
Copy link
Contributor Author

Synar commented Nov 8, 2024

@Yohh je t'ajoute en review juste pour le mini changement de test

@clarani clarani self-requested a review November 8, 2024 08:56
Copy link
Contributor

@Akctarus Akctarus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested, perhaps we could add a little padding-right for long track names to match the padding-left:

Capture d’écran 2024-11-08 à 11 25 24

Apart from that, LGTM!

@Synar
Copy link
Contributor Author

Synar commented Nov 8, 2024

Thanks! I extended the width a bit.

@Synar Synar force-pushed the ali/add-track-col-to-timestops-table branch from 151b7bc to 85937c8 Compare November 8, 2024 19:00
@Synar
Copy link
Contributor Author

Synar commented Nov 13, 2024

2 notes : - conflict with incoming #9642 to fix, probably by replacing the formatSuggestedOperationalPoints call by a formatSuggestedOperationalPointsWithTrackName call in use output table data

  • we should probably cache the tracks information, possibly as a context in the scenario page

@Synar
Copy link
Contributor Author

Synar commented Nov 16, 2024

Todo :

  • add tracksectionsLoading state to hook and context

@Synar Synar force-pushed the ali/add-track-col-to-timestops-table branch from 10d1424 to 91155f7 Compare November 17, 2024 11:12
Copy link
Contributor

@SharglutDev SharglutDev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the last changes ! Left some comments, they are totally debatable

@Synar
Copy link
Contributor Author

Synar commented Nov 20, 2024

2 new fixup, the second one is the change from usestate to useref for the content of the cache, to avoid dependency loops and useless renders

@Synar
Copy link
Contributor Author

Synar commented Nov 20, 2024

Clara asked me to ping all maintainers about adding context to the scenario, so here : @kmer2016 @emersion @SharglutDev @clarani @Math-R . Sorry for the inconvenience, hope I didn't forget anyone ^^

@Synar Synar force-pushed the ali/add-track-col-to-timestops-table branch from 69c64e5 to cd1d70b Compare November 20, 2024 17:33
@SharglutDev
Copy link
Contributor

Lgtm and tested for me. Waiting for at least a 2nd maintainer approval for the context subject :) (@clarani)

@Synar Synar force-pushed the ali/add-track-col-to-timestops-table branch from cd1d70b to 23c2391 Compare November 22, 2024 16:02
@github-actions github-actions bot added the area:front Work on Standard OSRD Interface modules label Nov 22, 2024
Copy link
Contributor

@kmer2016 kmer2016 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job ! Just a small suggestion

@emersion
Copy link
Member

Overall the context approach sounds good to me :)

@Synar Synar force-pushed the ali/add-track-col-to-timestops-table branch from b61d8d2 to 6c0bcc4 Compare November 27, 2024 12:05
@Synar Synar requested a review from a team as a code owner November 27, 2024 12:05
@Synar Synar force-pushed the ali/add-track-col-to-timestops-table branch from 6c0bcc4 to 8248abe Compare November 27, 2024 14:01
@Synar Synar requested review from Maymanaf and clarani November 27, 2024 15:26
@Yohh Yohh removed their request for review November 27, 2024 19:36
Copy link
Contributor

@Maymanaf Maymanaf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice PR! The changes look good for the minor update in the e2e test.

If possible, could you expand the scope to include a check for the track values? If adding it now isn't feasible, please create an issue and assign it to me for follow-up later.

Thanks! 😊

@Synar Synar force-pushed the ali/add-track-col-to-timestops-table branch from 720327f to f6ddeae Compare November 28, 2024 10:55
@Synar
Copy link
Contributor Author

Synar commented Nov 28, 2024

Nice PR! The changes look good for the minor update in the e2e test.

If possible, could you expand the scope to include a check for the track values? If adding it now isn't feasible, please create an issue and assign it to me for follow-up later.

Thanks! 😊

Done!

@Synar Synar requested review from Maymanaf and clarani November 28, 2024 10:56
@Synar Synar force-pushed the ali/add-track-col-to-timestops-table branch from f6ddeae to fab965a Compare November 28, 2024 10:57
Copy link
Contributor

@clarani clarani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ✅

@Synar Synar force-pushed the ali/add-track-col-to-timestops-table branch from fab965a to 2e4b902 Compare November 28, 2024 12:13
Copy link
Contributor

@Maymanaf Maymanaf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM for e2e tests ✅

@Synar Synar added this pull request to the merge queue Nov 28, 2024
Merged via the queue into dev with commit 9e66625 Nov 28, 2024
27 checks passed
@Synar Synar deleted the ali/add-track-col-to-timestops-table branch November 28, 2024 12:57
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a "Track" column to schedule tables
8 participants