-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Refactor row calculation logic in expandable.ts #7109
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
base: main
Are you sure you want to change the base?
Conversation
bug:if the container set with a flex css property,below *rowHeights* will get a ['none'] value.
```
const rowHeights = containerStyles
.getPropertyValue('grid-template-rows')
.split(' ');
```
Refactor : Optimize row calculation logic for extensible forms
Replace the original cumulative height calculation with a mapping scheme based on element positions, improving the accuracy of row number assignment. Added boundary checks for containers to avoid potential errors.
|
📝 WalkthroughWalkthroughThe expandable form component's row calculation logic has been refactored from a grid-based template approach to a position-based assignment system using itemTop coordinates and a rowPositions map. The update includes bounding rect validation, improved collapsed row handling, and sequential row number assignment based on proximity matching. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧹 Recent nitpick comments
📜 Recent review detailsConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
🔇 Additional comments (3)
✏️ Tip: You can disable this entire section by setting 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 |
bug:if the container set with a flex css property,below rowHeights will get a ['none'] value.
Refactor : Optimize row calculation logic for extensible forms Replace the original cumulative height calculation with a mapping scheme based on element positions, improving the accuracy of row number assignment. Added boundary checks for containers to avoid potential errors.
Description
Type of change
Please delete options that are not relevant.
pnpm-lock.yamlunless you introduce a new test example.Checklist
pnpm run docs:devcommand.pnpm test.feat:,fix:,perf:,docs:, orchore:.Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.