-
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: add waypoint menu in manchette #9398
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 #9398 +/- ##
========================================
Coverage 80.03% 80.04%
========================================
Files 1049 1050 +1
Lines 105293 105423 +130
Branches 757 757
========================================
+ Hits 84276 84390 +114
- Misses 20976 20992 +16
Partials 41 41
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
accef67
to
589c8f7
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.
Overall I'm not a huge fan of having the menu outside of ui-manchette. IMHO the positioning and styling of the menu belongs to osrd-ui.
I'm especially concerned about the positioning logic which is quite fragile: it hardcodes a lot of assumptions about the manchette, and desynchronizes when elements move around. Example bug: zoom in the manchette, open the menu, and then scroll. This is just one example, other interactions may break the menu alike.
...ules/simulationResult/components/ManchetteWithSpaceTimeChart/ManchetteWithSpaceTimeChart.tsx
Outdated
Show resolved
Hide resolved
...ules/simulationResult/components/ManchetteWithSpaceTimeChart/ManchetteWithSpaceTimeChart.tsx
Outdated
Show resolved
Hide resolved
...ules/simulationResult/components/ManchetteWithSpaceTimeChart/ManchetteWithSpaceTimeChart.tsx
Outdated
Show resolved
Hide resolved
front/src/modules/simulationResult/components/SpaceTimeChart/useWaypointMenu.tsx
Outdated
Show resolved
Hide resolved
front/src/modules/simulationResult/components/SpaceTimeChart/useWaypointMenu.tsx
Outdated
Show resolved
Hide resolved
front/src/modules/simulationResult/components/SpaceTimeChart/useWaypointMenu.tsx
Outdated
Show resolved
Hide resolved
Actually, maybe this coule be used instead? https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_anchor_positioning/Using |
You're totally right, I will check for solutions |
bd08fca
to
93ccaa9
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 beyond the positioning issue pointed out by emersion. But it is my understanding that https://github.com/OpenRailAssociation/osrd-ui/pull/668/files should solve this issue?
Yes exactly it's on wip :) |
93ccaa9
to
f2325dd
Compare
Nothing new, just rebased with dev to be not too far behind with conflicts :) |
8cdbe23
to
bdc093f
Compare
fba2b87
to
19967ca
Compare
- Change the listener to be on the document to be able to catch all events even if the focus was elsewhere - Add a parameter to set the focus on the first element of the modal/div if provided - Fix the focusTrap on the manchette menu Signed-off-by: SharglutDev <[email protected]>
19967ca
to
4f87f08
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 and tested ! I just posted a little comment
front/src/styles/scss/common/components/_manchetteWithSpaceTimeChart.scss
Outdated
Show resolved
Hide resolved
...ules/simulationResult/components/ManchetteWithSpaceTimeChart/ManchetteWithSpaceTimeChart.tsx
Outdated
Show resolved
Hide resolved
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 ✅
Signed-off-by: SharglutDev <[email protected]>
- When clicking on a waypoint in the manchette, display a menu with some actions - Only action for now is to hide the waypoint in the manchette Signed-off-by: SharglutDev <[email protected]>
344170d
to
3704e82
Compare
close #8629
Mockup :
https://www.sketch.com/s/a26d84be-5fb2-41e4-9e84-96d90f46a997/a/OeJV9yG