fix: InfoCard element's action block not dispatching action payload#37768
fix: InfoCard element's action block not dispatching action payload#37768kodiakhq[bot] merged 3 commits intodevelopfrom
InfoCard element's action block not dispatching action payload#37768Conversation
|
Looks like this PR is ready to merge! 🎉 |
🦋 Changeset detectedLatest commit: e9ae584 The changes in this PR will be included in the next version bump. This PR includes changesets to release 41 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 |
WalkthroughA changeset entry documents a patch release for Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ 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 |
94fd543 to
a54e747
Compare
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
packages/fuselage-ui-kit/src/blocks/InfoCard.tsx (1)
55-55: Fix correctly delegates action rendering to surface renderer.The change properly routes action rendering through
surfaceRenderer.renderActionsBlockElement(), which ensures the action dispatch logic is executed. This resolves the issue where directly rendering IconButtonElement bypassed the dispatch mechanism.For style consistency with the rest of the component, consider using
<Box>instead of<div>:-{action && <div>{surfaceRenderer.renderActionsBlockElement(action, index)}</div>} +{action && <Box>{surfaceRenderer.renderActionsBlockElement(action, index)}</Box>}
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Jira integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (2)
.changeset/happy-news-reflect.md(1 hunks)packages/fuselage-ui-kit/src/blocks/InfoCard.tsx(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx,js}
📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)
**/*.{ts,tsx,js}: Write concise, technical TypeScript/JavaScript with accurate typing in Playwright tests
Avoid code comments in the implementation
Files:
packages/fuselage-ui-kit/src/blocks/InfoCard.tsx
🧠 Learnings (2)
📓 Common learnings
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 37398
File: packages/fuselage-ui-kit/src/surfaces/FuselageSurfaceRenderer.tsx:357-363
Timestamp: 2025-11-17T15:07:13.273Z
Learning: In packages/fuselage-ui-kit/src/surfaces/FuselageSurfaceRenderer.tsx, IconElement is a presentational, non-actionable element that does not require wrapping in AppIdProvider, similar to plain_text and mrkdwn renderers. Only actionable elements (those with actions, actionId, or interactive behavior) should be wrapped in AppIdProvider.
📚 Learning: 2025-11-17T15:07:13.273Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 37398
File: packages/fuselage-ui-kit/src/surfaces/FuselageSurfaceRenderer.tsx:357-363
Timestamp: 2025-11-17T15:07:13.273Z
Learning: In packages/fuselage-ui-kit/src/surfaces/FuselageSurfaceRenderer.tsx, IconElement is a presentational, non-actionable element that does not require wrapping in AppIdProvider, similar to plain_text and mrkdwn renderers. Only actionable elements (those with actions, actionId, or interactive behavior) should be wrapped in AppIdProvider.
Applied to files:
packages/fuselage-ui-kit/src/blocks/InfoCard.tsx
⏰ 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). (2)
- GitHub Check: CodeQL-Build
- GitHub Check: CodeQL-Build
🔇 Additional comments (1)
.changeset/happy-news-reflect.md (1)
1-5: LGTM!The changeset properly documents the bug fix with an appropriate patch-level version bump.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #37768 +/- ##
========================================
Coverage 67.69% 67.69%
========================================
Files 3452 3452
Lines 113982 113982
Branches 20943 20943
========================================
+ Hits 77161 77163 +2
- Misses 34688 34690 +2
+ Partials 2133 2129 -4
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Proposed changes (including videos or screenshots)
The IconButton element was being rendered the wrong way, bypassing some logic that allows actions to be dispatched.
Issue(s)
VGA-103
Steps to test or reproduce
Further comments
Summary by CodeRabbit
Bug Fixes
✏️ Tip: You can customize this high-level summary in your review settings.