Skip to content

refactor Chart component #5140

Open
benwolski wants to merge 5 commits into
developfrom
chart-cleanup-june-13
Open

refactor Chart component #5140
benwolski wants to merge 5 commits into
developfrom
chart-cleanup-june-13

Conversation

@benwolski

Copy link
Copy Markdown
Collaborator

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

…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
@netlify

netlify Bot commented Jun 13, 2026

Copy link
Copy Markdown

Deploy Preview for plume-ambient-finance ready!

Name Link
🔨 Latest commit 58fe0f8
🔍 Latest deploy log https://app.netlify.com/projects/plume-ambient-finance/deploys/6a2f841ecef90d0008b28c00
😎 Deploy Preview https://deploy-preview-5140--plume-ambient-finance.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Jun 13, 2026

Copy link
Copy Markdown

Deploy Preview for dev-ambi ready!

Name Link
🔨 Latest commit 58fe0f8
🔍 Latest deploy log https://app.netlify.com/projects/dev-ambi/deploys/6a2f841e361360000816f92a
😎 Deploy Preview https://deploy-preview-5140--dev-ambi.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Jun 13, 2026

Copy link
Copy Markdown

Deploy Preview for ambient-finance ready!

Name Link
🔨 Latest commit 58fe0f8
🔍 Latest deploy log https://app.netlify.com/projects/ambient-finance/deploys/6a2f841e870fd30008b5f098
😎 Deploy Preview https://deploy-preview-5140--ambient-finance.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

1 participant