-
Notifications
You must be signed in to change notification settings - Fork 5
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
ui-manchette/fix waypoint menu closing #761
Conversation
… the click outside logic Signed-off-by: SharglutDev <[email protected]>
ui-manchette-with-spacetimechart/src/stories/base-with-waypoint-menu.stories.tsx
Outdated
Show resolved
Hide resolved
Hm, not a fan of these "clicked outside" event handlers with ad-hoc checks. Would prefer a transparent div covering the whole document (with a portal). |
We need to discuss with @thibautsailly if having the waypoint menu displayed should block any first click interaction with the whole page (if yes we could maybe just use a modal ?) or just the manchette/spacetimechart area. |
Added the |
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 :)
As some of the manchette action buttons can be disabled when the waypoint menu is displayed, the click event when clicking on them wasn't fired and the menu would'nt close. Update the style of the buttons to be able to click on the span inside the buttons which isn't disabled and update the story to listen to these click events in order to properly close the menu. Signed-off-by: SharglutDev <[email protected]>
Signed-off-by: SharglutDev <[email protected]>
1e620a5
to
257a3c7
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
See commits
close OpenRailAssociation/osrd#8629 (see last comments for the issue)