Skip to content

Conversation

@gabriellsh
Copy link
Member

@gabriellsh gabriellsh commented Dec 8, 2025

Proposed changes (including videos or screenshots)

image

Issue(s)

VGA-89

Steps to test or reproduce

Further comments

Summary by CodeRabbit

  • New Features

    • Icon components now support an optional framed display style and a new "warning" variant for expanded visuals.
  • Documentation

    • Added story and payload examples showcasing framed icons and updated variants within info cards.
  • Chores

    • Minor package version updates to align UI kit components.

✏️ Tip: You can customize this high-level summary in your review settings.

@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Dec 8, 2025

Looks like this PR is ready to merge! 🎉
If you have any trouble, please check the PR guidelines

@changeset-bot
Copy link

changeset-bot bot commented Dec 8, 2025

🦋 Changeset detected

Latest commit: 100d9ad

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 42 packages
Name Type
@rocket.chat/fuselage-ui-kit Major
@rocket.chat/ui-kit Minor
@rocket.chat/meteor Patch
@rocket.chat/uikit-playground Patch
@rocket.chat/core-services Patch
@rocket.chat/core-typings Patch
@rocket.chat/livechat Patch
@rocket.chat/rest-typings Patch
@rocket.chat/ui-voip Patch
rocketchat-services Patch
@rocket.chat/account-service Patch
@rocket.chat/authorization-service Patch
@rocket.chat/ddp-streamer Patch
@rocket.chat/omnichannel-transcript Patch
@rocket.chat/presence-service Patch
@rocket.chat/queue-worker Patch
@rocket.chat/stream-hub-service Patch
@rocket.chat/federation-matrix Patch
@rocket.chat/network-broker Patch
@rocket.chat/omni-core-ee Patch
@rocket.chat/omnichannel-services Patch
@rocket.chat/presence Patch
@rocket.chat/api-client Patch
@rocket.chat/apps Patch
@rocket.chat/cron Patch
@rocket.chat/ddp-client Patch
@rocket.chat/freeswitch Patch
@rocket.chat/gazzodown Patch
@rocket.chat/http-router Patch
@rocket.chat/model-typings Patch
@rocket.chat/ui-avatar Patch
@rocket.chat/ui-client Patch
@rocket.chat/ui-contexts Patch
@rocket.chat/web-ui-registration Patch
@rocket.chat/license Patch
@rocket.chat/media-calls Patch
@rocket.chat/pdf-worker Patch
@rocket.chat/models Patch
@rocket.chat/mock-providers Patch
@rocket.chat/ui-video-conf Patch
@rocket.chat/instance-status Patch
@rocket.chat/omni-core Patch

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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 8, 2025

Walkthrough

Adds a frameable icon variation: introduces FrameableIconElement with optional framed?: boolean, adds a warning variant, updates UI-kit types/usages, and changes fuselage-ui-kit renderer to conditionally render FramedIcon with mapped styles.

Changes

Cohort / File(s) Change Summary
Type definitions & public exports
packages/ui-kit/src/blocks/elements/IconElement.ts, packages/ui-kit/src/index.ts
Added warning to IconElement.variant; introduced FrameableIconElement (extends IconElement with optional framed); exported FrameableIconElement alongside IconElement.
Block unions & layout types
packages/ui-kit/src/blocks/BlockElement.ts, packages/ui-kit/src/blocks/layout/InfoCardBlock.ts
Replaced IconElement references with FrameableIconElement in block element unions and InfoCardRow.elements.
Renderer / component implementation
packages/fuselage-ui-kit/src/elements/IconElement.tsx
Switched prop types to FrameableIconElement; added getFramedIconProps mapping; conditionally render FramedIcon when framed is true, otherwise render Icon with variant color mapping.
Stories & example payloads
packages/fuselage-ui-kit/src/stories/Message.stories.tsx, packages/fuselage-ui-kit/src/stories/payloads/infoCard.ts
Added InfoCardMultipleIcons story; updated infoCardMultiple to use warning variant; added new infoCardMultipleIcons payload containing framed and standard icon rows.
Changeset
.changeset/many-walls-cheat.md
Bumped minor versions for @rocket.chat/fuselage-ui-kit and @rocket.chat/ui-kit.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Check packages/fuselage-ui-kit/src/elements/IconElement.tsx: conditional branch for framed, getFramedIconProps mapping, and correct prop forwarding to FramedIcon vs Icon.
  • Verify type propagation: FrameableIconElement usage in BlockElement.ts and InfoCardBlock.ts.
  • Confirm story payloads (infoCardMultipleIcons) reflect intended framed vs non-framed icons and variants.

Possibly related PRs

Suggested reviewers

  • gabriellsh
  • tassoevan
  • ggazzo

Poem

I hop along the UI line, 🐇
Framed little icons now look fine,
A warning glow, a neutral frame,
I nibble bugs and call their name,
Hooray — the cards have changed their style! ✨

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Linked Issues check ❓ Inconclusive The linked issue VGA-89 provides minimal context (only a title 'Add variation to ui-kit'), making it difficult to validate complete compliance with specific requirements. Access the full VGA-89 issue details to verify all coding requirements are met by the framed icon implementation and variant updates.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding a 'framed' optional property to the IconElement ui-kit component, which aligns with the changeset and code modifications.
Out of Scope Changes check ✅ Passed All changes directly support the framed icon feature: IconElement type updates, FramedIcon rendering logic, variant handling, and story examples. No unrelated modifications detected.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/uiKitFramedIcon

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 8, 2025

📦 Docker Image Size Report

📈 Changes

Service Current Baseline Change Percent
sum of all images 1.2GiB 1.2GiB +12MiB
rocketchat 358MiB 347MiB +12MiB
omnichannel-transcript-service 132MiB 132MiB +223B
queue-worker-service 132MiB 132MiB -507B
ddp-streamer-service 126MiB 126MiB -1.6KiB
account-service 113MiB 113MiB -892B
stream-hub-service 111MiB 111MiB -127B
presence-service 111MiB 111MiB +229B
authorization-service 111MiB 111MiB +392B

📊 Historical Trend

---
config:
  theme: "dark"
  xyChart:
    width: 900
    height: 400
---
xychart
  title "Image Size Evolution by Service (Last 30 Days + This PR)"
  x-axis ["11/15 22:28", "11/16 01:28", "11/17 23:50", "11/18 22:53", "11/19 23:02", "11/21 16:49", "11/24 17:34", "11/27 22:32", "11/28 19:05", "12/01 23:01", "12/02 21:57", "12/03 21:00", "12/04 18:17", "12/05 21:56", "12/08 20:15", "12/09 22:17", "12/10 23:26", "12/11 21:56", "12/12 14:05 (PR)"]
  y-axis "Size (GB)" 0 --> 0.5
  line "account-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11]
  line "authorization-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11]
  line "ddp-streamer-service" [0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12]
  line "omnichannel-transcript-service" [0.14, 0.14, 0.14, 0.14, 0.14, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13]
  line "presence-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11]
  line "queue-worker-service" [0.14, 0.14, 0.14, 0.14, 0.14, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13]
  line "rocketchat" [0.36, 0.36, 0.35, 0.35, 0.35, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.35]
  line "stream-hub-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11]
Loading

Statistics (last 18 days):

  • 📊 Average: 1.5GiB
  • ⬇️ Minimum: 1.2GiB
  • ⬆️ Maximum: 1.6GiB
  • 🎯 Current PR: 1.2GiB
ℹ️ About this report

This report compares Docker image sizes from this build against the develop baseline.

  • Tag: pr-37726
  • Baseline: develop
  • Timestamp: 2025-12-12 14:05:52 UTC
  • Historical data points: 18

Updated: Fri, 12 Dec 2025 14:05:53 GMT

@codecov
Copy link

codecov bot commented Dec 9, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 67.72%. Comparing base (17f587b) to head (100d9ad).
⚠️ Report is 2 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop   #37726   +/-   ##
========================================
  Coverage    67.71%   67.72%           
========================================
  Files         3452     3458    +6     
  Lines       113979   113955   -24     
  Branches     20943    20927   -16     
========================================
- Hits         77182    77173    -9     
+ Misses       34663    34651   -12     
+ Partials      2134     2131    -3     
Flag Coverage Δ
e2e 57.36% <ø> (+0.03%) ⬆️
e2e-api 42.27% <ø> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@gabriellsh gabriellsh marked this pull request as ready for review December 9, 2025 17:13
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

📜 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.

📥 Commits

Reviewing files that changed from the base of the PR and between 9b3fa8d and 9c14e4b.

📒 Files selected for processing (8)
  • .changeset/many-walls-cheat.md (1 hunks)
  • packages/fuselage-ui-kit/src/elements/IconElement.tsx (1 hunks)
  • packages/fuselage-ui-kit/src/stories/Message.stories.tsx (1 hunks)
  • packages/fuselage-ui-kit/src/stories/payloads/infoCard.ts (2 hunks)
  • packages/ui-kit/src/blocks/BlockElement.ts (2 hunks)
  • packages/ui-kit/src/blocks/elements/IconElement.ts (1 hunks)
  • packages/ui-kit/src/blocks/layout/InfoCardBlock.ts (1 hunks)
  • packages/ui-kit/src/index.ts (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/stories/Message.stories.tsx
  • packages/ui-kit/src/blocks/elements/IconElement.ts
  • packages/ui-kit/src/blocks/BlockElement.ts
  • packages/ui-kit/src/index.ts
  • packages/fuselage-ui-kit/src/stories/payloads/infoCard.ts
  • packages/ui-kit/src/blocks/layout/InfoCardBlock.ts
  • packages/fuselage-ui-kit/src/elements/IconElement.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/ui-kit/src/blocks/elements/IconElement.ts
  • packages/ui-kit/src/blocks/BlockElement.ts
  • packages/ui-kit/src/index.ts
  • packages/ui-kit/src/blocks/layout/InfoCardBlock.ts
  • packages/fuselage-ui-kit/src/elements/IconElement.tsx
  • .changeset/many-walls-cheat.md
🧬 Code graph analysis (5)
packages/ui-kit/src/blocks/elements/IconElement.ts (1)
packages/ui-kit/src/index.ts (2)
  • IconElement (31-31)
  • FrameableIconElement (31-31)
packages/ui-kit/src/blocks/BlockElement.ts (2)
packages/ui-kit/src/blocks/elements/IconElement.ts (1)
  • FrameableIconElement (9-11)
packages/ui-kit/src/index.ts (1)
  • FrameableIconElement (31-31)
packages/fuselage-ui-kit/src/stories/payloads/infoCard.ts (2)
packages/ui-kit/src/blocks/layout/InfoCardBlock.ts (1)
  • InfoCardBlock (14-17)
packages/ui-kit/src/index.ts (1)
  • InfoCardBlock (46-46)
packages/ui-kit/src/blocks/layout/InfoCardBlock.ts (2)
packages/ui-kit/src/blocks/elements/IconElement.ts (1)
  • FrameableIconElement (9-11)
packages/ui-kit/src/index.ts (3)
  • FrameableIconElement (31-31)
  • PlainText (5-5)
  • Markdown (6-6)
packages/fuselage-ui-kit/src/elements/IconElement.tsx (3)
packages/ui-kit/src/blocks/elements/IconElement.ts (2)
  • FrameableIconElement (9-11)
  • IconElement (3-7)
packages/ui-kit/src/index.ts (2)
  • FrameableIconElement (31-31)
  • IconElement (31-31)
packages/fuselage-ui-kit/src/surfaces/FuselageSurfaceRenderer.tsx (1)
  • icon (361-367)
🪛 LanguageTool
.changeset/many-walls-cheat.md

[grammar] ~6-~6: Ensure spelling is correct
Context: ...at/ui-kit": minor --- Introduces a new varation of the Icon element to ui-kit throu...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

🔇 Additional comments (8)
packages/ui-kit/src/blocks/elements/IconElement.ts (1)

1-11: LGTM!

The type definitions are well-structured. The expansion of the variant union to include 'warning' and the introduction of FrameableIconElement as an extension of IconElement with an optional framed property follow a clean composition pattern.

packages/fuselage-ui-kit/src/stories/Message.stories.tsx (1)

120-120: LGTM!

The new story export follows the established pattern and properly demonstrates the framed icon functionality.

packages/ui-kit/src/index.ts (1)

31-31: LGTM!

The public API export correctly includes both IconElement and FrameableIconElement, enabling consumers to use either type as appropriate.

packages/ui-kit/src/blocks/BlockElement.ts (1)

8-8: LGTM!

The migration from IconElement to FrameableIconElement in the BlockElement union is consistent with the broader type evolution and ensures the framed property is available throughout the type system.

Also applies to: 43-43

packages/fuselage-ui-kit/src/stories/payloads/infoCard.ts (2)

35-35: LGTM!

The variant change to 'warning' demonstrates the newly added warning variant capability.


48-73: LGTM!

The new infoCardMultipleIcons payload effectively demonstrates both framed and non-framed icon variants across all supported variant types (default, warning, danger, secondary), providing comprehensive visual coverage of the new feature.

packages/ui-kit/src/blocks/layout/InfoCardBlock.ts (1)

4-4: LGTM!

The type update from IconElement to FrameableIconElement in InfoCardRow.elements is consistent with the broader refactor and enables framed icon support in info card blocks.

Also applies to: 10-10

packages/fuselage-ui-kit/src/elements/IconElement.tsx (1)

1-3: LGTM!

The implementation cleanly handles both framed and non-framed icon rendering. The helper functions getVariantColor and getFramedIconProps provide clear mapping logic for variant properties, and the conditional rendering based on the framed property is straightforward and correct.

Also applies to: 7-36, 38-39, 41-45

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@d-gubert d-gubert force-pushed the feat/uiKitFramedIcon branch from c04f05a to 069ef98 Compare December 9, 2025 17:50
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 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.

📥 Commits

Reviewing files that changed from the base of the PR and between 9c14e4b and c04f05a.

📒 Files selected for processing (2)
  • .changeset/many-walls-cheat.md (1 hunks)
  • packages/fuselage-ui-kit/src/elements/IconElement.tsx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • .changeset/many-walls-cheat.md
🧰 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/elements/IconElement.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/elements/IconElement.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). (3)
  • GitHub Check: 📦 Build Packages
  • GitHub Check: CodeQL-Build
  • GitHub Check: CodeQL-Build
🔇 Additional comments (4)
packages/fuselage-ui-kit/src/elements/IconElement.tsx (4)

1-3: LGTM: Imports are appropriate for framed icon support.

The additions of FramedIcon and ComponentProps are necessary for the new framed icon functionality.


7-7: LGTM: Type updated to support framed icons.

The change from IconElement to FrameableIconElement correctly reflects the new optional framed property.


9-21: The 'status-font-on-warning' color token is valid and widely used throughout the codebase for warning status indicators. No changes needed.


23-36: No issues identified. The getFramedIconProps function correctly maps variants to FramedIcon props using type-safe TypeScript patterns with ComponentProps and Pick, ensuring danger, warning, and neutral props exist on the FramedIcon component.

@tassoevan tassoevan added the stat: QA assured Means it has been tested and approved by a company insider label Dec 11, 2025
@tassoevan tassoevan added this to the 7.14.0 milestone Dec 11, 2025
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Dec 11, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
packages/fuselage-ui-kit/src/elements/IconElement.tsx (1)

23-36: Consider a more precise return type for the variant-to-props mapping.

The variant mapping logic is correct and complete. However, the return type could be more precise. Currently, Pick<ComponentProps<typeof FramedIcon>, 'warning' | 'danger' | 'neutral'> creates optional properties, whereas the function always returns exactly one property set to true.

For better type safety, use a union type:

const getFramedIconProps = (
	variant: UiKit.FrameableIconElement['variant'],
-): Pick<ComponentProps<typeof FramedIcon>, 'warning' | 'danger' | 'neutral'> => {
+): { warning: true } | { danger: true } | { neutral: true } => {

This makes the type system reflect the actual runtime behavior more accurately.

📜 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.

📥 Commits

Reviewing files that changed from the base of the PR and between c04f05a and 7c388d0.

📒 Files selected for processing (2)
  • .changeset/many-walls-cheat.md (1 hunks)
  • packages/fuselage-ui-kit/src/elements/IconElement.tsx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • .changeset/many-walls-cheat.md
🧰 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/elements/IconElement.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/elements/IconElement.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). (3)
  • GitHub Check: 📦 Build Packages
  • GitHub Check: CodeQL-Build
  • GitHub Check: CodeQL-Build
🔇 Additional comments (4)
packages/fuselage-ui-kit/src/elements/IconElement.tsx (4)

1-3: LGTM! Imports are clean and necessary.

The added FramedIcon and ComponentProps imports are used appropriately in the implementation.


7-7: Type change aligns with the new framed icon capability.

The transition to FrameableIconElement correctly supports the new framed property.


9-21: Variant color mapping is comprehensive and correct.

The addition of the warning variant and explicit default case properly handles all FrameableIconElement variants for non-framed icon rendering.


38-44: Rendering logic cleanly implements the framed/non-framed behavior.

The conditional rendering correctly switches between FramedIcon (when framed) and Icon (when not framed), with appropriate prop mapping for each case.

@kodiakhq kodiakhq bot merged commit d3538e7 into develop Dec 12, 2025
87 of 90 checks passed
@kodiakhq kodiakhq bot deleted the feat/uiKitFramedIcon branch December 12, 2025 17:08
ricardogarim pushed a commit that referenced this pull request Dec 15, 2025
…nt (#37726)

Co-authored-by: Douglas Gubert <1810309+d-gubert@users.noreply.github.com>
@dougfabris dougfabris modified the milestones: 7.14.0, 8.0.0 Jan 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stat: QA assured Means it has been tested and approved by a company insider stat: ready to merge PR tested and approved waiting for merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants