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: add main layers #715

Merged
merged 6 commits into from
Dec 16, 2024

Conversation

Yohh
Copy link
Contributor

@Yohh Yohh commented Nov 20, 2024

Storybook

We add the new trackoccupancydiagram story in /storybook/stories, in a close future all stories for all modules will be moved in this folder.

Components

Two main components are exported from ui-trackoccupancydiagram, TrackOccupancyManchette and TrackOccupancyCanvas, as they will be imported in the manchette and the space time chart separatly for the no-standalone version.

In the story, we recreate a SpaceTimeChart friendly environnement with the contexts we need, and import the conts and utils we need directly from the spacetimechart module.

Helpers and draw functions are created conveniently with the SpaceTimeChart methods, again to anticipate the future integration.

Data

Interactivity layer

  • Pointer caption => we use the contexts
  • Dynamic time position => same

Tracks layer

  • TrackOccupancyManchette :
    • Track ID
    • Line ID
    • rails

Trains layer

  • TrackOccupancyCanvas :
    • Train occupation
    • Train name
    • Origin and destination trigram
    • Arrival time and departure time

Time captions layer

  • we use the TimeCaptions component from ui-speedspacechart

Next

sketch: https://www.sketch.com/s/50744654-4631-4fae-8e7c-7eb22dfadc1a

close #704

@Yohh Yohh force-pushed the yoh/ui-trackoccupancydiagram-add-main-layers branch 8 times, most recently from 7cd34e0 to 2c1f5c6 Compare November 27, 2024 15:12
@Yohh Yohh force-pushed the yoh/ui-trackoccupancydiagram-add-main-layers branch 4 times, most recently from 6274c7e to c6fe372 Compare December 4, 2024 09:04
@Yohh Yohh marked this pull request as ready for review December 4, 2024 09:09
@Yohh Yohh requested a review from a team as a code owner December 4, 2024 09:09
Math-R
Math-R previously approved these changes Dec 9, 2024
@Math-R Math-R dismissed their stale review December 9, 2024 18:36

fail click

Copy link
Contributor

@Akctarus Akctarus left a comment

Choose a reason for hiding this comment

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

Ty for this PR, tested, but when I change the zoom level, the last line shifts downwards and never returns to its original position

see :
Capture d’écran 2024-12-10 à 01 04 56

@Yohh
Copy link
Contributor Author

Yohh commented Dec 10, 2024

Ty for this PR, tested, but when I change the zoom level, the last line shifts downwards and never returns to its original position

the zoom isn't part of the feature, also if you still want to try it, after changing the param you have to click on "update the story"

@Yohh Yohh requested review from Akctarus and Math-R December 10, 2024 11:49
Copy link
Contributor

@Akctarus Akctarus left a comment

Choose a reason for hiding this comment

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

Tested, ty for the fix ! Just left 2 comments

Copy link
Contributor

@Akctarus Akctarus left a comment

Choose a reason for hiding this comment

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

LGTM !

Copy link
Contributor

@Math-R Math-R 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 force-pushed the yoh/ui-trackoccupancydiagram-add-main-layers branch from aab8379 to 70bd20c Compare December 16, 2024 13:39
Yohh and others added 4 commits December 16, 2024 14:45
- import TimeCaption.tsx from ui-spacetimechart
- import and set contexts from ui-spacetimechart

Co-authored-by: Uriel-Sautron <[email protected]>
Signed-off-by: Yohh <[email protected]>
  - create drawTrack
  - create drawTracks
  - create drawTick
  - add track background
  - use Space time context

Co-authored-by: Yohh <[email protected]>
Signed-off-by: Uriel Sautron <[email protected]>
@Yohh Yohh force-pushed the yoh/ui-trackoccupancydiagram-add-main-layers branch from 70bd20c to 6e35e3c Compare December 16, 2024 13:45
@Yohh Yohh added this pull request to the merge queue Dec 16, 2024
Merged via the queue into dev with commit 5053663 Dec 16, 2024
6 checks passed
@Yohh Yohh deleted the yoh/ui-trackoccupancydiagram-add-main-layers branch December 16, 2024 13:59
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: main layers (3: main/interactivity, tracks, trains)
4 participants