Repository navigation
Conversation
… CardGrid Closes RocketChat#42804 Signed-off-by: Aryan Sachin <aryansachinixd@gmail.com>
🦋 Changeset detectedLatest commit: d11d1a5 The changes in this PR will be included in the next version bump. This PR includes changesets to release 22 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
All reported issues were addressed across 3 files
Reply to a comment to ask cubic a question or push back. It learns from your replies.
View guided diff | Re-trigger cubic
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
WalkthroughCardGrid now normalizes children with ChangesCardGrid child handling
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Low Suggested labels: Merge Risk: ⚪ Minimal · up to
|
Signed-off-by: Aryan Sachin <aryansachinixd@gmail.com>

Proposed changes (including videos or screenshots)
CardGrid previously wrapped each child using Children.map(children, ...). Because Children.map visits
ull, undefined, and boolean values, conditionally rendered cards such as {condition && } caused an empty, padded to be rendered into the DOM.
This PR updates CardGrid to iterate over Children.toArray(children) instead. Children.toArray strips out empty, null, and boolean children, so only genuine card items are wrapped in a .
ull, undefined, and boolean children do not produce elements.
Issue(s)
Closes #42804
Steps to test or reproduce
` sx
Further comments
Follows the solution outlined by @tassoevan in #42804.
Summary by CodeRabbit
Bug Fixes
CardGridno longer renders empty grid items fornull,undefined, or boolean children.Tests