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-trackoccupancydiagram: select zone on click #792

Merged
merged 1 commit into from
Jan 8, 2025

Conversation

Uriel-Sautron
Copy link
Contributor

@Uriel-Sautron Uriel-Sautron commented Dec 31, 2024

  • setup mouseContext from spacetimechart
  • isolate TrackOccupancyDiagram to import it in a new story component
  • use selectedTrainId and setSelectedTrainId as props
  • add train selection on click in drawOccupationZone based on mouse position

As precised in the main feature ticket the selected train is set by clicking on an occupation zone, we could add an enhancement in future for setting the selecting by clicking on the train name either, not done yet because of the complexity it brings.

The TrackOccupancyDiagram has been isolated to be called in a new story component, which will allow us to easily move it in ui-trackoccupancyDiagram if needed in another PR.

close #787

@Yohh Yohh force-pushed the usn/ui-trackoccupancydiagram-select-zone-onclick branch from 61310e5 to 54226f4 Compare January 7, 2025 14:29
- setup mouseContext from spacetimechart
- isolate TrackOccupancyDiagram to import it in a new story component
- use selectedTrainId and setSelectedTrainId as props
- add train selection on click in drawOccupationZone based on mouse position

Co-authored-by: Yohh <[email protected]>
Signed-off-by: Uriel-Sautron <[email protected]>
@Yohh Yohh force-pushed the usn/ui-trackoccupancydiagram-select-zone-onclick branch from 54226f4 to 49a9e79 Compare January 7, 2025 14:35
@Yohh Yohh self-assigned this Jan 7, 2025
@Yohh Yohh marked this pull request as ready for review January 7, 2025 15:30
@Yohh Yohh requested a review from a team as a code owner January 7, 2025 15:30
Copy link
Contributor

@Caracol3 Caracol3 left a comment

Choose a reason for hiding this comment

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

Good job !
I just left one comment

Copy link
Contributor

@kmer2016 kmer2016 left a comment

Choose a reason for hiding this comment

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

LGTM

@Yohh Yohh added this pull request to the merge queue Jan 8, 2025
Merged via the queue into dev with commit 012452c Jan 8, 2025
6 checks passed
@Yohh Yohh deleted the usn/ui-trackoccupancydiagram-select-zone-onclick branch January 8, 2025 18:18
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.

trackoccupancydiagram: select zone on click
4 participants