Skip to content

refactor: Explicit component props (20/23) - #41219

Merged
tassoevan merged 20 commits into
developfrom
refactor/explicit-component-props-20
Jul 8, 2026
Merged

refactor: Explicit component props (20/23)#41219
tassoevan merged 20 commits into
developfrom
refactor/explicit-component-props-20

Conversation

@tassoevan

@tassoevan tassoevan commented Jul 7, 2026

Copy link
Copy Markdown
Member

Proposed changes (including videos or screenshots)

It explicits the types for component props, following our guideline.

Issue(s)

Steps to test or reproduce

Further comments

Task: ARCH-2224

Summary by CodeRabbit

  • Chores
    • Expanded the public type surface for several live chat message and screen components, making them easier to use and integrate in custom implementations.
    • Added exported prop definitions for common message elements, UI blocks, and chat screen components without changing runtime behavior.

@tassoevan tassoevan added this to the 8.7.0 milestone Jul 7, 2026
@tassoevan
tassoevan requested review from a team as code owners July 7, 2026 14:28
@dionisio-bot

dionisio-bot Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

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

@changeset-bot

changeset-bot Bot commented Jul 7, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 09aedfa

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@tassoevan

Copy link
Copy Markdown
Member Author

/jira ARCH-2200

@coderabbitai

coderabbitai Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 59203c23-98ee-4809-8644-c997759c09d2

📥 Commits

Reviewing files that changed from the base of the PR and between 38e80cb and 09aedfa.

📒 Files selected for processing (25)
  • packages/livechat/src/components/Messages/MessageContent/index.tsx
  • packages/livechat/src/components/Messages/MessageSeparator/index.tsx
  • packages/livechat/src/components/Messages/MessageText/index.tsx
  • packages/livechat/src/components/Messages/MessageTime/index.tsx
  • packages/livechat/src/components/Messages/TypingDots/index.tsx
  • packages/livechat/src/components/Messages/TypingIndicator/index.tsx
  • packages/livechat/src/components/Messages/VideoAttachment/index.tsx
  • packages/livechat/src/components/Screen/ChatButton.tsx
  • packages/livechat/src/components/Screen/Header.tsx
  • packages/livechat/src/components/Screen/ScreenProvider.tsx
  • packages/livechat/src/components/uiKit/message/ActionsBlock/index.tsx
  • packages/livechat/src/components/uiKit/message/Block.tsx
  • packages/livechat/src/components/uiKit/message/ButtonElement/index.tsx
  • packages/livechat/src/components/uiKit/message/ContextBlock/index.tsx
  • packages/livechat/src/components/uiKit/message/DatePickerElement/index.tsx
  • packages/livechat/src/components/uiKit/message/DividerBlock/index.tsx
  • packages/livechat/src/components/uiKit/message/ImageBlock/index.tsx
  • packages/livechat/src/components/uiKit/message/ImageElement/index.tsx
  • packages/livechat/src/components/uiKit/message/Mrkdwn/index.tsx
  • packages/livechat/src/components/uiKit/message/OverflowElement/OverflowElement.tsx
  • packages/livechat/src/components/uiKit/message/OverflowElement/OverflowOption.tsx
  • packages/livechat/src/components/uiKit/message/OverflowElement/OverflowTrigger.tsx
  • packages/livechat/src/components/uiKit/message/PlainText/index.tsx
  • packages/livechat/src/components/uiKit/message/SectionBlock/index.tsx
  • packages/livechat/src/components/uiKit/message/Surface.tsx
📜 Recent review details
⏰ Context from checks skipped due to timeout. (1)
  • GitHub Check: Hacktron Security Check
⚠️ CI failures not shown inline (4)

GitHub Check: Dionisio QA: Some checks did not pass

Conclusion: failure

View job details

**Conclusion:** failure
### Steps
- ✅ **No merge conflicts**
- ❌ **QA assured** — This PR is missing the 'stat: QA assured' label
- ✅ **Mergeable**
- ✅ **Has milestone or project**
- ✅ **Valid PR title**
- ✅ **Correct target version**

GitHub Check: Dionisio QA: Some checks did not pass

Conclusion: failure

View job details

**Conclusion:** failure
### Steps
- ✅ **No merge conflicts**
- ❌ **QA assured** — This PR is missing the 'stat: QA assured' label
- ✅ **Mergeable**
- ✅ **Has milestone or project**
- ✅ **Valid PR title**
- ✅ **Correct target version**

GitHub Check: Dionisio QA: Some checks did not pass

Conclusion: failure

View job details

**Conclusion:** failure
### Steps
- ✅ **No merge conflicts**
- ❌ **QA assured** — This PR is missing the 'stat: QA assured' label
- ✅ **Mergeable**
- ✅ **Has milestone or project**
- ✅ **Valid PR title**
- ✅ **Correct target version**

GitHub Check: Dionisio QA: Some checks did not pass

Conclusion: failure

View job details

**Conclusion:** failure
### Steps
- ✅ **No merge conflicts**
- ❌ **QA assured** — This PR is missing the 'stat: QA assured' label
- ✅ **Mergeable**
- ✅ **Has milestone or project**
- ✅ **Valid PR title**
- ✅ **Correct target version**
🧰 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/livechat/src/components/uiKit/message/PlainText/index.tsx
  • packages/livechat/src/components/uiKit/message/DividerBlock/index.tsx
  • packages/livechat/src/components/Screen/ChatButton.tsx
  • packages/livechat/src/components/uiKit/message/Mrkdwn/index.tsx
  • packages/livechat/src/components/uiKit/message/OverflowElement/OverflowElement.tsx
  • packages/livechat/src/components/Screen/ScreenProvider.tsx
  • packages/livechat/src/components/Messages/MessageContent/index.tsx
  • packages/livechat/src/components/uiKit/message/OverflowElement/OverflowTrigger.tsx
  • packages/livechat/src/components/uiKit/message/ContextBlock/index.tsx
  • packages/livechat/src/components/Messages/TypingDots/index.tsx
  • packages/livechat/src/components/uiKit/message/DatePickerElement/index.tsx
  • packages/livechat/src/components/Messages/MessageTime/index.tsx
  • packages/livechat/src/components/uiKit/message/OverflowElement/OverflowOption.tsx
  • packages/livechat/src/components/uiKit/message/Surface.tsx
  • packages/livechat/src/components/uiKit/message/ActionsBlock/index.tsx
  • packages/livechat/src/components/Messages/VideoAttachment/index.tsx
  • packages/livechat/src/components/Messages/MessageText/index.tsx
  • packages/livechat/src/components/uiKit/message/ImageBlock/index.tsx
  • packages/livechat/src/components/Messages/TypingIndicator/index.tsx
  • packages/livechat/src/components/uiKit/message/Block.tsx
  • packages/livechat/src/components/uiKit/message/SectionBlock/index.tsx
  • packages/livechat/src/components/Screen/Header.tsx
  • packages/livechat/src/components/Messages/MessageSeparator/index.tsx
  • packages/livechat/src/components/uiKit/message/ButtonElement/index.tsx
  • packages/livechat/src/components/uiKit/message/ImageElement/index.tsx
🧠 Learnings (2)
📚 Learning: 2026-03-27T14:52:56.865Z
Learnt from: dougfabris
Repo: RocketChat/Rocket.Chat PR: 39892
File: apps/meteor/client/views/room/contextualBar/Threads/Thread.tsx:150-155
Timestamp: 2026-03-27T14:52:56.865Z
Learning: In Rocket.Chat, there are two different `ModalBackdrop` components with different prop APIs. During review, confirm the import source: (1) `rocket.chat/fuselage` `ModalBackdrop` uses `ModalBackdropProps` based on `BoxProps` (so it supports `onClick` and other Box/DOM props) and does not have an `onDismiss` prop; (2) `rocket.chat/ui-client` `ModalBackdrop` uses a narrower props interface like `{ children?: ReactNode; onDismiss?: () => void }` and handles Escape keypress and outside mouse-up, and it does not forward arbitrary DOM props such as `onClick`. Flag mismatched props (e.g., `onDismiss` passed to the fuselage component or `onClick` passed to the ui-client component) and ensure the usage matches the correct component being imported.

Applied to files:

  • packages/livechat/src/components/uiKit/message/PlainText/index.tsx
  • packages/livechat/src/components/uiKit/message/DividerBlock/index.tsx
  • packages/livechat/src/components/Screen/ChatButton.tsx
  • packages/livechat/src/components/uiKit/message/Mrkdwn/index.tsx
  • packages/livechat/src/components/uiKit/message/OverflowElement/OverflowElement.tsx
  • packages/livechat/src/components/Screen/ScreenProvider.tsx
  • packages/livechat/src/components/Messages/MessageContent/index.tsx
  • packages/livechat/src/components/uiKit/message/OverflowElement/OverflowTrigger.tsx
  • packages/livechat/src/components/uiKit/message/ContextBlock/index.tsx
  • packages/livechat/src/components/Messages/TypingDots/index.tsx
  • packages/livechat/src/components/uiKit/message/DatePickerElement/index.tsx
  • packages/livechat/src/components/Messages/MessageTime/index.tsx
  • packages/livechat/src/components/uiKit/message/OverflowElement/OverflowOption.tsx
  • packages/livechat/src/components/uiKit/message/Surface.tsx
  • packages/livechat/src/components/uiKit/message/ActionsBlock/index.tsx
  • packages/livechat/src/components/Messages/VideoAttachment/index.tsx
  • packages/livechat/src/components/Messages/MessageText/index.tsx
  • packages/livechat/src/components/uiKit/message/ImageBlock/index.tsx
  • packages/livechat/src/components/Messages/TypingIndicator/index.tsx
  • packages/livechat/src/components/uiKit/message/Block.tsx
  • packages/livechat/src/components/uiKit/message/SectionBlock/index.tsx
  • packages/livechat/src/components/Screen/Header.tsx
  • packages/livechat/src/components/Messages/MessageSeparator/index.tsx
  • packages/livechat/src/components/uiKit/message/ButtonElement/index.tsx
  • packages/livechat/src/components/uiKit/message/ImageElement/index.tsx
📚 Learning: 2026-05-06T12:21:44.083Z
Learnt from: juliajforesti
Repo: RocketChat/Rocket.Chat PR: 40256
File: apps/meteor/client/components/CreateDiscussion/CreateDiscussion.tsx:121-149
Timestamp: 2026-05-06T12:21:44.083Z
Learning: Field wrappers in rocket.chat/fuselage-forms (Field, FieldLabel, FieldRow, FieldError, FieldHint) auto-create htmlFor/id associations, aria-describedby, and role="alert" for errors. Do not manually set htmlFor, id, aria-describedby, or role attributes when using these wrappers. This automatic wiring does not apply to plain rocket.chat/fuselage components, which require explicit ID wiring per the accessibility docs. In code reviews, prefer using fuselage-forms wrappers for form fields and verify there is no unnecessary manual ID/aria wiring in files that use these wrappers. If a component uses plain fuselage components, ensure proper id wiring as per docs.

Applied to files:

  • packages/livechat/src/components/uiKit/message/PlainText/index.tsx
  • packages/livechat/src/components/uiKit/message/DividerBlock/index.tsx
  • packages/livechat/src/components/Screen/ChatButton.tsx
  • packages/livechat/src/components/uiKit/message/Mrkdwn/index.tsx
  • packages/livechat/src/components/uiKit/message/OverflowElement/OverflowElement.tsx
  • packages/livechat/src/components/Screen/ScreenProvider.tsx
  • packages/livechat/src/components/Messages/MessageContent/index.tsx
  • packages/livechat/src/components/uiKit/message/OverflowElement/OverflowTrigger.tsx
  • packages/livechat/src/components/uiKit/message/ContextBlock/index.tsx
  • packages/livechat/src/components/Messages/TypingDots/index.tsx
  • packages/livechat/src/components/uiKit/message/DatePickerElement/index.tsx
  • packages/livechat/src/components/Messages/MessageTime/index.tsx
  • packages/livechat/src/components/uiKit/message/OverflowElement/OverflowOption.tsx
  • packages/livechat/src/components/uiKit/message/Surface.tsx
  • packages/livechat/src/components/uiKit/message/ActionsBlock/index.tsx
  • packages/livechat/src/components/Messages/VideoAttachment/index.tsx
  • packages/livechat/src/components/Messages/MessageText/index.tsx
  • packages/livechat/src/components/uiKit/message/ImageBlock/index.tsx
  • packages/livechat/src/components/Messages/TypingIndicator/index.tsx
  • packages/livechat/src/components/uiKit/message/Block.tsx
  • packages/livechat/src/components/uiKit/message/SectionBlock/index.tsx
  • packages/livechat/src/components/Screen/Header.tsx
  • packages/livechat/src/components/Messages/MessageSeparator/index.tsx
  • packages/livechat/src/components/uiKit/message/ButtonElement/index.tsx
  • packages/livechat/src/components/uiKit/message/ImageElement/index.tsx
🔇 Additional comments (25)
packages/livechat/src/components/Messages/MessageContent/index.tsx (1)

8-8: LGTM!

packages/livechat/src/components/Messages/TypingDots/index.tsx (1)

6-6: LGTM!

packages/livechat/src/components/Messages/TypingIndicator/index.tsx (1)

9-9: LGTM!

packages/livechat/src/components/Messages/VideoAttachment/index.tsx (1)

9-9: LGTM!

packages/livechat/src/components/Screen/ChatButton.tsx (1)

5-5: LGTM!

packages/livechat/src/components/Messages/MessageSeparator/index.tsx (1)

9-16: LGTM!

packages/livechat/src/components/Messages/MessageText/index.tsx (1)

10-15: LGTM!

packages/livechat/src/components/Messages/MessageTime/index.tsx (1)

20-27: LGTM!

packages/livechat/src/components/Screen/Header.tsx (1)

27-45: LGTM!

packages/livechat/src/components/Screen/ScreenProvider.tsx (1)

71-73: LGTM!

packages/livechat/src/components/uiKit/message/ActionsBlock/index.tsx (1)

11-13: LGTM!

packages/livechat/src/components/uiKit/message/Block.tsx (1)

11-15: LGTM!

packages/livechat/src/components/uiKit/message/ContextBlock/index.tsx (1)

9-11: LGTM!

packages/livechat/src/components/uiKit/message/DividerBlock/index.tsx (1)

8-8: LGTM!

packages/livechat/src/components/uiKit/message/ImageBlock/index.tsx (1)

11-13: LGTM!

packages/livechat/src/components/uiKit/message/SectionBlock/index.tsx (1)

9-11: LGTM!

packages/livechat/src/components/uiKit/message/Surface.tsx (1)

13-16: LGTM!

packages/livechat/src/components/uiKit/message/ButtonElement/index.tsx (1)

12-15: LGTM!

packages/livechat/src/components/uiKit/message/DatePickerElement/index.tsx (1)

8-8: LGTM!

packages/livechat/src/components/uiKit/message/ImageElement/index.tsx (1)

7-9: LGTM!

packages/livechat/src/components/uiKit/message/OverflowElement/OverflowElement.tsx (1)

11-13: LGTM!

packages/livechat/src/components/uiKit/message/OverflowElement/OverflowOption.tsx (1)

8-12: LGTM!

packages/livechat/src/components/uiKit/message/OverflowElement/OverflowTrigger.tsx (1)

9-12: LGTM!

packages/livechat/src/components/uiKit/message/Mrkdwn/index.tsx (1)

8-10: 🎯 Functional Correctness

No duplicate MrkdwnProps declaration.

			> Likely an incorrect or invalid review comment.
packages/livechat/src/components/uiKit/message/PlainText/index.tsx (1)

8-10: 🎯 Functional Correctness

No duplicate PlainTextProps declaration. PlainTextProps is defined once here, so this is not a duplicate-identifier issue.

			> Likely an incorrect or invalid review comment.

Walkthrough

This PR exports previously internal TypeScript prop type aliases across numerous livechat components (Messages, Screen, and uiKit message components), making them part of the public API. Two components (Mrkdwn, PlainText) also introduce new named exported prop types replacing inline anonymous prop annotations. No runtime logic changes.

Changes

Exported prop types across livechat components

Layer / File(s) Summary
Messages component prop type exports
packages/livechat/src/components/Messages/MessageContent/index.tsx, .../MessageSeparator/index.tsx, .../MessageText/index.tsx, .../MessageTime/index.tsx, .../TypingDots/index.tsx, .../TypingIndicator/index.tsx, .../VideoAttachment/index.tsx
Prop type aliases for message-related components are changed from unexported to exported.
Screen component prop type exports
packages/livechat/src/components/Screen/ChatButton.tsx, .../Header.tsx, .../ScreenProvider.tsx
ChatButtonProps, ScreenHeaderProps, and ScreenProviderProps are exported.
uiKit message block prop type exports
packages/livechat/src/components/uiKit/message/ActionsBlock/index.tsx, .../Block.tsx, .../ContextBlock/index.tsx, .../DividerBlock/index.tsx, .../ImageBlock/index.tsx, .../SectionBlock/index.tsx, .../Surface.tsx
Block-level uiKit prop types are exported.
uiKit message element and overflow prop type exports
.../ButtonElement/index.tsx, .../DatePickerElement/index.tsx, .../ImageElement/index.tsx, .../OverflowElement/OverflowElement.tsx, .../OverflowOption.tsx, .../OverflowTrigger.tsx
Element and overflow-related uiKit prop types are exported.
Mrkdwn and PlainText named prop type introduction
.../Mrkdwn/index.tsx, .../PlainText/index.tsx
New MrkdwnProps and PlainTextProps exported type aliases replace inline anonymous prop annotations in component signatures.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Suggested reviewers: ggazzo

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main refactor: exporting explicit component prop types across Livechat components.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Warning

Review ran into problems

🔥 Problems

Errors were encountered while retrieving linked issues.

Errors (2)
  • ARCH-2224: Request failed with status code 401
  • PROPS-20: Request failed with status code 401

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.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 25 files

Re-trigger cubic

@codecov

codecov Bot commented Jul 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.18%. Comparing base (38e80cb) to head (09aedfa).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #41219      +/-   ##
===========================================
+ Coverage    69.17%   69.18%   +0.01%     
===========================================
  Files         3651     3651              
  Lines       142782   142782              
  Branches     25565    25570       +5     
===========================================
+ Hits         98765    98789      +24     
+ Misses       39728    39697      -31     
- Partials      4289     4296       +7     
Flag Coverage Δ
e2e 59.35% <ø> (+<0.01%) ⬆️
e2e-api 50.74% <ø> (+0.43%) ⬆️
unit 70.25% <ø> (-0.02%) ⬇️

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.

tassoevan added 20 commits July 7, 2026 20:31
@tassoevan
tassoevan force-pushed the refactor/explicit-component-props-20 branch from 3fe1416 to 09aedfa Compare July 7, 2026 23:31
@tassoevan tassoevan added stat: QA assured Means it has been tested and approved by a company insider type: chore labels Jul 7, 2026
@dionisio-bot dionisio-bot Bot added the stat: ready to merge PR tested and approved waiting for merge label Jul 7, 2026
@tassoevan
tassoevan added this pull request to the merge queue Jul 8, 2026
Merged via the queue into develop with commit d4e7012 Jul 8, 2026
84 of 86 checks passed
@tassoevan
tassoevan deleted the refactor/explicit-component-props-20 branch July 8, 2026 10:49
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 type: chore

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants