-
Notifications
You must be signed in to change notification settings - Fork 1.4k
fix: Click on Show more on ModalActions breaks the app #6942
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
Conversation
WalkthroughModified the Actions component to render all elements always and hide overflow items via CSS instead of conditional rendering, maintaining hook call order with a 5-item display limit and "show more" button. Added a new story demonstrating the expanded actions behavior with 8 items. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
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 |
Proposed changes
The Actions component violated the Rules of Hooks when toggling "Show more". When showMoreVisible changed, the number of rendered elements changed (5 vs 8), causing hooks to be called in different orders between renders and triggering React warnings.
Issue(s)
https://rocketchat.atlassian.net/browse/SUP-975
How to test or reproduce
Screenshots
Types of changes
Checklist
Further comments
Summary by CodeRabbit
Release Notes
New Features
Tests
✏️ Tip: You can customize this high-level summary in your review settings.