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

ui-manchette/fix waypoint menu closing #761

Merged
merged 3 commits into from
Dec 16, 2024

Conversation

SharglutDev
Copy link
Contributor

See commits

close OpenRailAssociation/osrd#8629 (see last comments for the issue)

@SharglutDev SharglutDev requested a review from a team as a code owner December 13, 2024 09:51
@SharglutDev SharglutDev changed the title UI manchette/fix waypoint menu closing ui-manchette/fix waypoint menu closing Dec 13, 2024
@emersion
Copy link
Member

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).

@SharglutDev
Copy link
Contributor Author

SharglutDev commented Dec 13, 2024

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.

@SharglutDev SharglutDev requested a review from emersion December 13, 2024 16:13
@SharglutDev
Copy link
Contributor Author

Added the createPortal logic :)

Copy link
Member

@emersion emersion left a 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]>
@SharglutDev SharglutDev force-pushed the ui-manchette/fix-waypoint-menu-closing branch from 1e620a5 to 257a3c7 Compare December 13, 2024 16:42
Copy link
Contributor

@theocrsb theocrsb 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

@SharglutDev SharglutDev added this pull request to the merge queue Dec 16, 2024
Merged via the queue into dev with commit a811b75 Dec 16, 2024
6 checks passed
@SharglutDev SharglutDev deleted the ui-manchette/fix-waypoint-menu-closing branch December 16, 2024 14:55
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.

Manchette : hide a waypoint by clicking on it
3 participants