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: Initialize the new version of the Map. #10280

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

kmer2016
Copy link
Contributor

@kmer2016 kmer2016 commented Jan 8, 2025

closes #9776
This commit initializes the refacto of the Map component. The Map is now decoupled from the store. Specifically:

  • The zoom button callbacks no longer depend on the store.
  • Other buttons have been temporarily hidden.

This change allows multiple Map instances to be rendered on the same page without conflicts.

@kmer2016 kmer2016 requested review from a team as code owners January 8, 2025 08:15
@github-actions github-actions bot added the area:front Work on Standard OSRD Interface modules label Jan 8, 2025
@codecov-commenter
Copy link

codecov-commenter commented Jan 8, 2025

⚠️ 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 ✅

Project coverage is 81.59%. Comparing base (9109fb7) to head (b225664).

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

Additional details and impacted files
@@            Coverage Diff             @@
##              dev   #10280      +/-   ##
==========================================
+ Coverage   81.53%   81.59%   +0.06%     
==========================================
  Files        1059     1060       +1     
  Lines      104459   104928     +469     
  Branches      722      722              
==========================================
+ Hits        85166    85612     +446     
- Misses      19252    19275      +23     
  Partials       41       41              
Flag Coverage Δ
editoast 73.67% <ø> (-0.08%) ⬇️
front 89.31% <100.00%> (+0.07%) ⬆️
gateway 2.18% <ø> (ø)
osrdyne 3.28% <ø> (ø)
railjson_generator 87.50% <ø> (ø)
tests 87.05% <ø> (ø)

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.

@kmer2016 kmer2016 force-pushed the cnh/enable_interactivity_stdcm_result_map branch from 89dff49 to fbc8a55 Compare January 8, 2025 11:58
@@ -162,7 +162,7 @@ class STDCMPage {
this.notificationHeader = page.locator('#notification');
this.debugButton = page.getByTestId('stdcm-debug-button');
this.helpButton = page.getByTestId('stdcm-help-button');
this.mapContainer = page.locator('#map-container');
this.mapContainer = page.locator('stdcm-map-config');
Copy link
Contributor

Choose a reason for hiding this comment

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

page.locator('#stdcm-map-config');

@Yohh
Copy link
Contributor

Yohh commented Jan 8, 2025

just to be sure, is the name NewMap going to change when the refacto will be done or is it it's real and definitive name?

@kmer2016
Copy link
Contributor Author

kmer2016 commented Jan 8, 2025

just to be sure, is the name NewMap going to change when the refacto will be done or is it it's real and definitive name?

Oh no, the name will also change once the refactor is complete

Comment on lines +39 to +40
withSearchButton?: boolean;
withToggleLayersButton?: boolean;
Copy link
Contributor

Choose a reason for hiding this comment

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

with is usually used for HOC components I guess, it can be a little bit confusing, should'nt we use is instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just followed the naming convention used by other props that were already present like withMapKeyButton or withInfraButton. Would you be okay if we address this in the next step of the refactor?

@kmer2016 kmer2016 force-pushed the cnh/enable_interactivity_stdcm_result_map branch from cd17d0a to 343322d Compare January 8, 2025 16:36
This commit initializes the new version of the Map component. The Map is now decoupled from the store. Specifically, the zoom button callbacks are detached from the store, while the other buttons are temporarily hidden.

Signed-off-by: nncluzu <[email protected]>
@kmer2016 kmer2016 force-pushed the cnh/enable_interactivity_stdcm_result_map branch from 343322d to b225664 Compare January 8, 2025 16: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.

stdcm: front: make the result map great again
4 participants