-
Notifications
You must be signed in to change notification settings - Fork 45
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: update btn map in scenario page and convert rem to px in css map file #9798
Conversation
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## dev #9798 +/- ##
=======================================
Coverage 38.20% 38.20%
=======================================
Files 997 992 -5
Lines 92198 92158 -40
Branches 1191 1186 -5
=======================================
- Hits 35221 35210 -11
+ Misses 56521 56497 -24
+ Partials 456 451 -5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As you are re-writting these buttons, I think it would be better to do a bit of refacto :)
All these buttons are almost the same, the only things that change are the function onClick, the text in the span + its translation, the icon and the data-test-id.
You can create a generic component MapButton
which will take only these 4-5 props, and in MapButtons, render this new component with the correct props if we are using the newButtons.
If you do this, you won't need to modify all the existing Buttons
You're right, I just proposed a refacto in my fixups :) |
1fe7855
to
f37ed91
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
9fef6a1
to
0564826
Compare
It doesn't yet have “hover” and “active” behavior. |
8bfa3a7
to
d81de37
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM ✅ Only left 2 small comments, you can close them once you have fixed them and merge without a new approval 👍 :)
Signed-off-by: theocrsb <[email protected]>
Signed-off-by: theocrsb <[email protected]>
211da1d
to
5235fd8
Compare
closes https://github.com/osrd-project/osrd-confidential/issues/670
buttons list mockup: https://www.sketch.com/s/2fb064cd-c483-46ac-bd30-72705fd63e75/p/9559F6FC-69EE-4DB8-BE1A-77F60F10C97F/canvas#Inspect
button mockup: https://www.sketch.com/s/7b92c9be-3fa6-4af7-b8c6-66b63fec08fa/p/AB9D17BF-0EBF-4C30-A75D-0D6BB5C0BA68/canvas#Inspect