feat: add Rectangle and Price Range drawing tools + performance improvements + Storybook 8 + React 18 upgrades#720
Open
sgonzaloc wants to merge 127 commits into
Open
feat: add Rectangle and Price Range drawing tools + performance improvements + Storybook 8 + React 18 upgrades#720sgonzaloc wants to merge 127 commits into
sgonzaloc wants to merge 127 commits into
Conversation
…ted node:internal/crypto/hash:68 error. Also install react for devDependencies to be able to fix error Failed to load preset: Cannot find module 'react/package.json'
Add react and react dom 19 to peer dependencies
- Updated all packages to support React 16.x || 17.x || 18.x || 19.x - Upgraded @types/react and @types/react-dom to version 19 - Updated Storybook from 6.x to 8.x for React 19 compatibility - Migrated all tsconfig.json to use 'react-jsx' transform - Fixed TypeScript strict type checking issues for React 19 - Added explicit context type declarations for class components - Updated useRef calls to include initial values (React 19 requirement) - Added type safety for SVG attributes and optional function calls - Removed unused React imports with new JSX transform - All packages build successfully See REACT_19_MIGRATION.md for detailed migration guide.
…e_modules from packages
…e_modules from packages
…nk, overlapping text selection priority, and editing index management
…ing selection to existing text tool, refactor interactive actions stories
- Move clearThreeCanvas() inside setState callbacks to prevent blank frames
- Update handleZoom, handlePinchZoomEnd, xAxisZoom, yAxisZoom, resetYDomain, handlePanEnd
- Remove redundant clearThreeCanvas from redraw() to avoid double cleaning
- Add explicit draw({ force: true }) after clearing within callbacks
This ensures canvas is never empty between state updates and redraws,
eliminating the visual flicker that occurred during interactive operations.
The Y-axis zoom was not working because chartId could be string while each.id was number (or vice versa), causing strict equality to fail and preventing the chart from being found. Convert each.id to string before comparison to ensure the chart is always found regardless of type mismatch. This fixes the Y-axis drag/zoom functionality without affecting existing behavior.
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.
Summary
This PR is a comprehensive update to the interactive components library, including new drawing tools, performance optimizations, and modern tooling upgrades.
Changes
New Components
Performance Improvements
shouldComponentUpdateimplemented on all interactive components to prevent unnecessary re-rendersInteractive Features
Components Updated
Tooling & Dependencies
Documentation
Bug Fixes
Testing
All components tested locally with Storybook. Performance verified with React DevTools.
Related
Fixes issues with: