-
Notifications
You must be signed in to change notification settings - Fork 12
refactor: Jim/grwt 5290/update crosshair UI based on design refactor #386
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
Draft
jim-deriv
wants to merge
49
commits into
deriv-com:master
Choose a base branch
from
jim-deriv:jim/grwt-5290/update-crosshair-ui-based-on-design-refactor
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
refactor: Jim/grwt 5290/update crosshair UI based on design refactor #386
jim-deriv
wants to merge
49
commits into
deriv-com:master
from
jim-deriv:jim/grwt-5290/update-crosshair-ui-based-on-design-refactor
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…grwt-5290/update-crosshair-ui-based-on-design
…grwt-5290/update-crosshair-ui-based-on-design
…grwt-5290/update-crosshair-ui-based-on-design
Reviewer's GuideThis PR refactors and extends the chart’s interactive layer and series rendering to support a new crosshair UI architecture—introducing controllers, behaviours, and variants (small/large), integrating them into gesture handling and chart widgets, removing legacy crosshair code, and updating example screens and theme definitions to expose crosshair toggles. Sequence Diagram: Crosshair Interaction via Long PresssequenceDiagram
actor User
participant ILGH as _InteractiveLayerGestureHandler
participant CC as CrosshairController
participant XAM as XAxisModel
User->>ILGH: Long press starts (details)
ILGH->>CC: onLongPressStart(details)
CC->>CC: Update state (show crosshair)
CC->>ILGH: Callback onCrosshairAppeared()
CC->>XAM: disableAutoPan()
User->>ILGH: Long press moves (details)
ILGH->>CC: onLongPressUpdate(details)
CC->>CC: Update crosshair position
alt Cursor near edge
CC->>XAM: pan(speed)
end
User->>ILGH: Long press ends (details)
ILGH->>CC: onLongPressEnd(details)
CC->>CC: Update state (hide crosshair)
CC->>ILGH: Callback onCrosshairDisappeared()
CC->>XAM: pan(0)
CC->>XAM: enableAutoPan()
Sequence Diagram: Crosshair Interaction via Hover (Large Screen)sequenceDiagram
actor User
participant ILGH as _InteractiveLayerGestureHandler
participant CC as CrosshairController
User->>ILGH: Mouse hovers (event)
ILGH->>ILGH: _handleHover(event, xAxis)
alt CrosshairVariant is largeScreen AND not drawingTool mode
ILGH->>CC: onHover(event)
CC->>CC: Update state (show crosshair)
CC->>ILGH: Callback onCrosshairAppeared() (if not already visible)
end
User->>ILGH: Mouse exits (event)
ILGH->>ILGH: _handleExit(event)
alt Not drawingTool mode
ILGH->>CC: onExit(event)
CC->>CC: Update state (hide crosshair)
CC->>ILGH: Callback onCrosshairDisappeared() (if was visible)
end
Sequence Diagram: Drawing Tool Pan InteractionsequenceDiagram
actor User
participant RGD as RawGestureDetector
participant DTGR as DrawingToolGestureRecognizer
participant ILGH as _InteractiveLayerGestureHandler
participant IS as _InteractiveState
participant CC as CrosshairController
User->>RGD: Pan starts on a drawing tool
RGD->>DTGR: Gesture event
DTGR->>ILGH: onDrawingToolPanStart(details) callback
ILGH->>IS: onPanStart(details)
ILGH->>ILGH: _updateInteractionMode(drawingTool)
ILGH->>CC: onExit() (to hide crosshair)
User->>RGD: Pan updates
RGD->>DTGR: Gesture event
DTGR->>ILGH: onDrawingToolPanUpdate(details) callback
ILGH->>IS: onPanUpdate(details)
opt Affecting Drawing AND Crosshair Visible
ILGH->>CC: onExit() (ensure crosshair hidden)
end
User->>RGD: Pan ends
RGD->>DTGR: Gesture event
DTGR->>ILGH: onDrawingToolPanEnd(details) callback
ILGH->>IS: onPanEnd(details)
ILGH->>ILGH: _updateInteractionMode(none)
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Clickup link:
Fixes issue: #
This PR contains the following changes:
Developers Note (Optional)
Pre-launch Checklist (For PR creator)
As a creator of this PR:
Reviewers
Pre-launch Checklist (For Reviewers)
As a reviewer I ensure that:
Pre-launch Checklist (For QA)
Pre-launch Checklist (For Maintainer)
Summary by Sourcery
Refactor and enhance the chart crosshair UI to support responsive variants, improved customization, and a more maintainable architecture, with updated showcase examples and theming support.
Enhancements:
Documentation: