refactor Chart component #5140
Open
benwolski wants to merge 5 commits into
Open
Conversation
…zone logic into custom hooks useChartScale and useLimitNoGoZone, move shape location checkers import, fix swipe back cleanup by returning cleanup function, and remove keydown event listeners on drag end
✅ Deploy Preview for plume-ambient-finance ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for dev-ambi ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for ambient-finance ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
…actory function, consolidate scaleData hash computations into hoisted variables scaleDataHashX and scaleDataHash, add visibleCandleDataHash and drawnShapeHistoryHash for reuse across dependency arrays, and extract hover status logic into useHoverStatus hook
…reateRangeDragBehavior and createLimitDragBehavior factory functions in useChartDrag module, remove getXandYLocationForChartDrag import, and consolidate drag event handling, state management, and cleanup logic into reusable drag behavior creators
… and snapForCandle helpers into chartUtils.ts as pure functions, thread isCondensedModeEnabled param into calculateVisibleCandles, pass scaleData explicitly to minimum and snapForCandle, create snapForCandleData wrapper for child canvases, and update REFACTOR_NOTES.md to mark item 4 complete and document item 5 investigation outcomes
…t inline mutation of visibleCandleData in sub-chart props, replace JSON.stringify(drawnShapeHistory) and diffHashSig(cursorStyleTrigger) in dependency arrays with drawnShapeHistoryHash and cursorStyleTrigger directly, copy timeGaps before sorting to avoid mutating state array, and document fresh review findings in REFACTOR_NOTES.md
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
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.
to extract scale management and limit no-go zone logic into custom hooks useChartScale and useLimitNoGoZone, move shape location checkers import, fix swipe back cleanup by returning cleanup function, and remove keydown event listeners on drag end