fix: convert example to typescript to fix build; fit locked aspect ratio with least squares#261
Conversation
📝 WalkthroughWalkthroughThis PR refines the aspect ratio constraint calculation in the resizable component library and strengthens TypeScript typing across examples and build configuration. The core change replaces a delta-based branching approach with weighted projection for lockAspectRatio constraints, validated by updated test expectations. Example code receives improved type safety through explicit ResizeCallbackData typing and expanded state tracking, while the build config transitions the test example to use the TypeScript entrypoint. ChangesAspect Ratio Constraint and Type Safety Improvements
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Thanks! |
New:
https://github.com/user-attachments/assets/10029704-3316-478f-a8ef-138fb690f222
Old:
https://github.com/user-attachments/assets/3d44790b-971b-4279-a00c-abdb32b9c7be
Summary by CodeRabbit