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

Use new speed limit tags endpoint #8266

Merged
merged 1 commit into from
Aug 2, 2024

Conversation

Uriel-Sautron
Copy link
Contributor

Use the new endpoint /speed_limit_tags in front:

  • Operational Studies
  • STDCM
  • Map
  • Infra Editor

Close #7975

@Uriel-Sautron Uriel-Sautron requested a review from a team as a code owner July 31, 2024 12:37
@Uriel-Sautron Uriel-Sautron requested review from theocrsb, SharglutDev and Yohh and removed request for theocrsb July 31, 2024 12:37
@bougue-pe
Copy link
Contributor

bougue-pe commented Jul 31, 2024

The previous list of speed-limit tag values from infra/RS has to be kept, but enriched (merged/deduplicated) with the new one.
Some values may be present only in the infra and we want to offer them (case of foreign infra, or exotic use).

@Uriel-Sautron Uriel-Sautron force-pushed the usn/use-speedLimitTags-endpoint branch from b8c9db2 to df16db2 Compare July 31, 2024 14:56
@codecov-commenter
Copy link

codecov-commenter commented Jul 31, 2024

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

Codecov Report

Attention: Patch coverage is 0% with 52 lines in your changes missing coverage. Please review.

Project coverage is 36.71%. Comparing base (9d45d8c) to head (65c51ef).

Files Patch % Lines
...src/applications/editor/components/LayersModal.tsx 0.00% 22 Missing ⚠️
...Selector/useStoreDataForSpeedLimitByTagSelector.ts 0.00% 11 Missing and 1 partial ⚠️
.../rangeEdition/components/RangeEditionLeftPanel.tsx 0.00% 8 Missing and 1 partial ⚠️
...src/common/Map/Settings/MapSettingsSpeedLimits.tsx 0.00% 8 Missing ⚠️
...peedLimitByTagSelector/SpeedLimitByTagSelector.tsx 0.00% 1 Missing ⚠️

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

Additional details and impacted files
@@             Coverage Diff              @@
##                dev    #8266      +/-   ##
============================================
- Coverage     36.73%   36.71%   -0.03%     
  Complexity     2163     2163              
============================================
  Files          1282     1282              
  Lines        119626   119659      +33     
  Branches       3218     3218              
============================================
- Hits          43943    43928      -15     
- Misses        73752    73800      +48     
  Partials       1931     1931              
Flag Coverage Δ
core 75.59% <ø> (ø)
editoast 66.83% <ø> (-0.06%) ⬇️
front 15.68% <0.00%> (-0.01%) ⬇️
gateway 2.03% <ø> (ø)
railjson_generator 87.49% <ø> (ø)
tests 72.98% <ø> (ø)

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.

@bougue-pe bougue-pe self-requested a review July 31, 2024 15:35
Copy link
Contributor

@bougue-pe bougue-pe left a comment

Choose a reason for hiding this comment

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

Thanks for the changes 🙏


There are some duplicate bugs on a local test on a small_infra copy (unlocked), docker, Firefox, WSL:

  • edit infra, select existing speed-limit
  • add an Additional speed_limit by tag E30C

Then in operational studies (or STDCM) use that infra and create a train

  • in the composition code list, E30C appears twice.
  • if using the search on that list it looks like when typing E30C, then backspace the list of E30C gets longer and longer (maybe a previously existing bug).
  • the list gets back to 2 duplicates only when stopping edit on the train then back to edit

The same goes for the selector in infra speed-limit editor, actually

@Uriel-Sautron Uriel-Sautron force-pushed the usn/use-speedLimitTags-endpoint branch 2 times, most recently from 5a46c00 to 6c80b75 Compare August 1, 2024 11:59
Copy link
Contributor

@Yohh Yohh left a comment

Choose a reason for hiding this comment

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

Nice, one comment

@Uriel-Sautron Uriel-Sautron force-pushed the usn/use-speedLimitTags-endpoint branch from 6c80b75 to 3cff3f4 Compare August 1, 2024 13:22
Copy link
Contributor

@Yohh Yohh left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@bougue-pe bougue-pe left a comment

Choose a reason for hiding this comment

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

Retested on the same cases, works fine, thank you for this 🙂

I didn't think of the speed-limit tag picker when displaying the infra: I don't know if it's better with all the values (including absent ones) or only the present ones... But both are OK IMO, so it's not a blocker for me.

EDIT: after discussion, let's use the same (extended) list for map layers, so current choices are good ✅

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 this PR, left some comments.

Also it's strange that we don't use the SpeedLimitByTagSelector everywhere we need to select a speedlimit tag. I understand that it's not related to your PR but maybe you could create an enhancement to harmonize that ?

  - add new endpoint in useStoreDataForSpeedLimitByTagSelector and merge speed limit tags

  - use new speed limit tags endpoint in LayersModal, RangeEditionLeftPanel and MapSettingsSpeedLimits

  - add default speed limit tag in hook

  - ordered speed limit tags
@Uriel-Sautron Uriel-Sautron force-pushed the usn/use-speedLimitTags-endpoint branch from 454947f to 65c51ef Compare August 2, 2024 12:03
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.

Lgtm and tested, good job !

@Uriel-Sautron Uriel-Sautron added this pull request to the merge queue Aug 2, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 2, 2024
@Uriel-Sautron Uriel-Sautron added this pull request to the merge queue Aug 2, 2024
Merged via the queue into dev with commit 9c54287 Aug 2, 2024
20 checks passed
@Uriel-Sautron Uriel-Sautron deleted the usn/use-speedLimitTags-endpoint branch August 2, 2024 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Front: add speedLimitTags from description file to propositions (simulation & infra edition)
5 participants