Skip to content

chore: Replace some SidebarV1 components in favor of SidebarV2 - #41498

Merged
dionisio-bot[bot] merged 4 commits into
developfrom
chore/use-sidebarv2
Jul 21, 2026
Merged

chore: Replace some SidebarV1 components in favor of SidebarV2#41498
dionisio-bot[bot] merged 4 commits into
developfrom
chore/use-sidebarv2

Conversation

@yash-rajpal

@yash-rajpal yash-rajpal commented Jul 21, 2026

Copy link
Copy Markdown
Member

Proposed changes (including videos or screenshots)

Issue(s)

Steps to test or reproduce

Further comments

CORE-2455

Review in cubic

Summary by CodeRabbit

  • Style

    • Updated the sidebar layout and visual presentation using the refreshed sidebar components.
    • Refined sidebar footer spacing, dividers, and branding display.
    • Improved watermark and footer content alignment.
  • Bug Fixes

    • Preserved correct behavior for external sidebar links, including opening them securely in a new tab.
    • Maintained license loading and error-state handling in the footer watermark.

@dionisio-bot

dionisio-bot Bot commented Jul 21, 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 21, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: c0ae698

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

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

Sidebar components and footer layouts were migrated from the original Fuselage primitives to Sidebar V2 equivalents, with updated prop forwarding, item props, and footer spacing/content structure.

Changes

Sidebar V2 migration

Layer / File(s) Summary
Sidebar components and footer migration
apps/meteor/client/components/Sidebar/*, apps/meteor/client/sidebar/footer/*
Sidebar wrappers and generic items now use Sidebar V2 components, while footer components use Sidebar V2 divider, footer, and content primitives with revised layout props.

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

Suggested labels: type: chore

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 accurately summarizes the main change: migrating selected sidebar components from SidebarV1 to SidebarV2.
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 (1)
  • CORE-2455: 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.

@codecov

codecov Bot commented Jul 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.57%. Comparing base (2077b7e) to head (c0ae698).
⚠️ Report is 5 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #41498      +/-   ##
===========================================
- Coverage    68.61%   68.57%   -0.04%     
===========================================
  Files         4134     4134              
  Lines       160802   160840      +38     
  Branches     29273    29252      -21     
===========================================
- Hits        110338   110304      -34     
- Misses       45356    45430      +74     
+ Partials      5108     5106       -2     
Flag Coverage Δ
e2e 58.82% <100.00%> (-0.05%) ⬇️
e2e-api 45.32% <ø> (-0.02%) ⬇️
unit 70.53% <ø> (-0.05%) ⬇️

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.

@yash-rajpal
yash-rajpal force-pushed the chore/use-sidebarv2 branch from adcfcbf to c0ae698 Compare July 21, 2026 18:18
@yash-rajpal
yash-rajpal marked this pull request as ready for review July 21, 2026 18:57
@yash-rajpal
yash-rajpal requested a review from a team as a code owner July 21, 2026 18:57

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/meteor/client/components/Sidebar/SidebarGenericItem.tsx`:
- Around line 5-10: Update SidebarGenericItemProps to include the forwarded
anchor attributes accepted by SidebarV2Item, preferably by deriving them with
ComponentPropsWithoutRef<typeof SidebarV2Item> while preserving the existing
href, active, children, and externalUrl props. Ensure SidebarNavigationItem can
pass aria-current and other standard anchor attributes without JSX type errors.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d22ec425-1c65-4db3-91bf-42001f1c4a57

📥 Commits

Reviewing files that changed from the base of the PR and between c162052 and c0ae698.

📒 Files selected for processing (4)
  • apps/meteor/client/components/Sidebar/Sidebar.tsx
  • apps/meteor/client/components/Sidebar/SidebarGenericItem.tsx
  • apps/meteor/client/sidebar/footer/SidebarFooterDefault.tsx
  • apps/meteor/client/sidebar/footer/SidebarFooterWatermark.tsx
📜 Review details
⏰ Context from checks skipped due to timeout. (3)
  • GitHub Check: cubic · AI code reviewer
  • GitHub Check: Hacktron Security Check
  • GitHub Check: 🔨 Test UI (EE) / MongoDB 8.0 coverage (4/5)
🧰 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:

  • apps/meteor/client/sidebar/footer/SidebarFooterDefault.tsx
  • apps/meteor/client/components/Sidebar/Sidebar.tsx
  • apps/meteor/client/sidebar/footer/SidebarFooterWatermark.tsx
  • apps/meteor/client/components/Sidebar/SidebarGenericItem.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:

  • apps/meteor/client/sidebar/footer/SidebarFooterDefault.tsx
  • apps/meteor/client/components/Sidebar/Sidebar.tsx
  • apps/meteor/client/sidebar/footer/SidebarFooterWatermark.tsx
  • apps/meteor/client/components/Sidebar/SidebarGenericItem.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:

  • apps/meteor/client/sidebar/footer/SidebarFooterDefault.tsx
  • apps/meteor/client/components/Sidebar/Sidebar.tsx
  • apps/meteor/client/sidebar/footer/SidebarFooterWatermark.tsx
  • apps/meteor/client/components/Sidebar/SidebarGenericItem.tsx
🔇 Additional comments (4)
apps/meteor/client/components/Sidebar/Sidebar.tsx (1)

1-6: 🎯 Functional Correctness

Verify that SidebarV2 preserves the removed wrapper contract.

apps/meteor/client/sidebar/SidebarRegion.tsx:92-108 still renders <Sidebar /> without props. The old wrapper supplied role='navigation', display='flex', flexDirection='column', and height='100%'; this change removes all four. Confirm that SidebarV2 provides equivalent landmark and full-height column behavior before merging.

apps/meteor/client/components/Sidebar/SidebarGenericItem.tsx (1)

1-4: LGTM!

apps/meteor/client/sidebar/footer/SidebarFooterDefault.tsx (1)

2-2: LGTM!

Also applies to: 26-28

apps/meteor/client/sidebar/footer/SidebarFooterWatermark.tsx (1)

1-1: LGTM!

Also applies to: 29-38

Comment thread apps/meteor/client/components/Sidebar/SidebarGenericItem.tsx

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

Re-trigger cubic

@dougfabris dougfabris left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM!

@yash-rajpal yash-rajpal added the stat: QA assured Means it has been tested and approved by a company insider label Jul 21, 2026
@yash-rajpal yash-rajpal added this to the 8.8.0 milestone Jul 21, 2026
@dionisio-bot dionisio-bot Bot added the stat: ready to merge PR tested and approved waiting for merge label Jul 21, 2026
@yash-rajpal yash-rajpal removed the stat: QA assured Means it has been tested and approved by a company insider label Jul 21, 2026
@dionisio-bot dionisio-bot Bot removed the stat: ready to merge PR tested and approved waiting for merge label Jul 21, 2026
@yash-rajpal yash-rajpal added the stat: QA assured Means it has been tested and approved by a company insider label Jul 21, 2026
@dionisio-bot dionisio-bot Bot added the stat: ready to merge PR tested and approved waiting for merge label Jul 21, 2026
@dionisio-bot
dionisio-bot Bot added this pull request to the merge queue Jul 21, 2026
Merged via the queue into develop with commit 30623d9 Jul 21, 2026
99 of 101 checks passed
@dionisio-bot
dionisio-bot Bot deleted the chore/use-sidebarv2 branch July 21, 2026 21:46
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