Skip to content

refactor: share useDeferredMenuMount from ui-client - #42831

Merged
dionisio-bot[bot] merged 1 commit into
developfrom
refactor/deferred-menu-mount
Oct 16, 2026
Merged

dionisio-bot[bot] merged 1 commit into
developfrom
refactor/deferred-menu-mount

Conversation

@juliajforesti

@juliajforesti juliajforesti commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Proposed changes (including videos or screenshots)

Moves useDeferredMenuMount from apps/meteor/client/sidebar/Item to @rocket.chat/ui-client, so list rows outside the sidebar (room members, team channels) can defer mounting their menus the same way. No behavior change: the current sidebar callers import it from @rocket.chat/ui-client.

Issue(s)

Part of the Item migration. Needed by #42818 and #42819, which carry this commit at the bottom until it lands.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Refactor
    • Sidebar menus now use a shared deferred-mounting capability. The change does not alter how sidebar menus behave.
  • Documentation
    • Clarified that a list-row menu mounts when focused.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ae424fb4-f563-40d7-9417-d9e101b035a3
📥 Commits

Reviewing files that changed from the base of the PR and between 881c338 and e8e1faa.

📒 Files selected for processing: 7
  • apps/meteor/client/sidebar/Item/Condensed.tsx
  • apps/meteor/client/sidebar/Item/Extended.tsx
  • apps/meteor/client/sidebar/Item/Medium.tsx
  • apps/meteor/client/sidebar/RoomList/RoomListCollapser.tsx
  • apps/meteor/client/views/navigation/sidebar/RoomList/SidebarItem.tsx
  • packages/ui-client/src/hooks/index.ts
  • packages/ui-client/src/hooks/useDeferredMenuMount.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.

⏰ Context from checks skipped due to timeout: 6
  • GitHub Check: Hacktron Security Check
  • GitHub Check: 🔎 Code Check / Code Lint
  • GitHub Check: 🔨 Test Unit / Unit Tests
  • GitHub Check: 🔎 Code Check / TypeScript
  • GitHub Check: 🔨 Test Storybook / Test Storybook
  • GitHub Check: 📦 Meteor Build (coverage)
🔇 Additional comments: 7
packages/ui-client/src/hooks/index.ts: 1

4-4: LGTM!

packages/ui-client/src/hooks/useDeferredMenuMount.ts: 1

21-22: LGTM!

apps/meteor/client/sidebar/Item/Condensed.tsx: 1

2-2: LGTM!

apps/meteor/client/sidebar/Item/Extended.tsx: 1

12-12: LGTM!

apps/meteor/client/sidebar/Item/Medium.tsx: 1

2-2: LGTM!

apps/meteor/client/sidebar/RoomList/RoomListCollapser.tsx: 1

2-2: LGTM!

apps/meteor/client/views/navigation/sidebar/RoomList/SidebarItem.tsx: 1

9-9: LGTM!

Walkthrough

The ui-client hooks barrel now exports useDeferredMenuMount. Five sidebar components import the hook from @rocket.chat/ui-client. The hook documentation now describes deferred list-row menu mounting and immediate mounting on focus.

Changes

Deferred menu hook

Layer / File(s) Summary
Export the hook from ui-client
packages/ui-client/src/hooks/index.ts, packages/ui-client/src/hooks/useDeferredMenuMount.ts
The hooks barrel exports useDeferredMenuMount. Its documentation describes deferred mounting for a list-row menu and immediate mounting on focus.
Update sidebar imports
apps/meteor/client/sidebar/Item/*.tsx, apps/meteor/client/sidebar/RoomList/RoomListCollapser.tsx, apps/meteor/client/views/navigation/sidebar/RoomList/SidebarItem.tsx
Five sidebar components now import useDeferredMenuMount from @rocket.chat/ui-client instead of local modules.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Refactor

Suggested labels: type: chore

Suggested reviewers: dougfabris

Merge Risk: ⚪ Minimal · up to e8e1f

This refactor changes the hook’s import location, and supported build workflows provide the package before Meteor uses it. No material user or release risk remains.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: sharing useDeferredMenuMount from ui-client.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 7…
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.
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Errors were encountered while retrieving linked issues.

Errors: 1
  • JIRA integration encountered authorization issues. Please disconnect and reconnect the integration in the CodeRabbit UI.

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.

@changeset-bot

changeset-bot Bot commented Oct 15, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: e8e1faa

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

@dionisio-bot

dionisio-bot Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

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

@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 7 files

View guided diff | Re-trigger cubic

@ggazzo ggazzo added this to the 8.10.0 milestone Oct 15, 2026
@ggazzo ggazzo added stat: QA assured Means it has been tested and approved by a company insider and removed type: chore labels Oct 15, 2026
@dionisio-bot dionisio-bot Bot added the stat: ready to merge PR tested and approved waiting for merge label Oct 15, 2026
@codecov

codecov Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 70.48%. Comparing base (ad08045) to head (e8e1faa).
⚠️ Report is 2 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop   #42831   +/-   ##
========================================
  Coverage    70.48%   70.48%           
========================================
  Files         5413     5413           
  Lines       229630   229634    +4     
  Branches     41749    41734   -15     
========================================
+ Hits        161846   161853    +7     
+ Misses       62448    62445    -3     
  Partials      5336     5336           
Flag Coverage Δ
e2e 58.94% <ø> (-0.01%) ⬇️
e2e-api 45.89% <ø> (-0.01%) ⬇️
unit 70.96% <0.00%> (+<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.

@dionisio-bot
dionisio-bot Bot added this pull request to the merge queue Oct 16, 2026
@rc-layne

rc-layne Bot commented Oct 16, 2026

Copy link
Copy Markdown

⚠️ Layne — scan incomplete

Layne could not analyze all changed content. Review the Check Run summary before merging.

Merged via the queue into develop with commit f6b75dc Oct 16, 2026
72 checks passed
@dionisio-bot
dionisio-bot Bot deleted the refactor/deferred-menu-mount branch October 16, 2026 00:51
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.

3 participants