Skip to content

[2.1] feat(ui): add the Classic/AI interface switcher to the classic sidebar footer (#38861) - #38953

Merged
Rohit0301 merged 1 commit into
2.1from
Rohit0301/backport-38861-2.1
Nov 27, 2026
Merged

Rohit0301 merged 1 commit into
2.1from
Rohit0301/backport-38861-2.1

Conversation

@Rohit0301

@Rohit0301 Rohit0301 commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Fixes open-metadata/openmetadata-collate#8999

Backport of #38861 to 2.1.

Source PR #38861
Merge commit e2a8db30a40
Method Clean cherry-pick (git cherry-pick -x), no conflicts.

Describe your changes:

Classic mode gets the shared Classic/AI interface switcher in the left-sidebar footer: a bordered card when expanded, an icon button when collapsed, both framed by core Card. The User Interface section is removed from the profile dropdown, along with InterfaceModeMenuItem and label.user-interface. AI mode is unchanged apart from the shared popover being 16px wider. Full description, screenshots and Playwright evidence are on #38861.

Companion Collate backport: open-metadata/openmetadata-collate#9022. Collate 2.1's AI-mode Playwright helper clicks the removed interface-mode-option-ai. Merge it right after this PR.

Checks on 2.1

  • 2.1 already has everything this change builds on (AppModeSwitcher, InterfaceModeMenuItem, the classic LeftSidebar). Nothing on 2.1 still references InterfaceModeMenuItem, interface-mode-option-*, label.user-interface, switchToAiModeViaProfileToggle or the compact prop.
  • Jest on LeftSidebar, AppModeSwitcher, ai-shell Sidebar, UserProfileIcon, AIUserMenu: 160 / 160 passed.
  • No type errors in the changed files; ESLint and Prettier clean on all 38 changed files.
  • Playwright not re-run on 2.1. The 5 affected specs ran on feat(ui): add the Classic/AI interface switcher to the classic sidebar footer #38861 (18 passed; the one failure also fails on main).

🤖 Generated with Claude Code

…r footer (#38861)

* feat(ui): add the Classic/AI interface switcher to the classic sidebar footer

Classic mode now shows the shared AppModeSwitcher at the bottom of the left
sidebar (bordered card when expanded, icon button when collapsed, both framed
by core Card), matching AI mode. The User Interface section is removed from
the profile dropdown along with InterfaceModeMenuItem and its i18n key.

Refs open-metadata/openmetadata-collate#8999

* test(ui): drop assertions that can no longer fail and reset the extra-items mock per test

(cherry picked from commit e2a8db3)
@Rohit0301
Rohit0301 requested a review from a team as a code owner November 27, 2026 09:45
@Rohit0301
Rohit0301 requested review from sweta1308 and removed request for a team November 27, 2026 09:45
@github-actions

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically.

Maintainers can bypass this check by adding the skip-pr-checks label.

@gitar-bot

gitar-bot Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Code Review ✅ Approved 🟡 Medium risk 1 closed / 1 findings

Moving the Classic/AI switcher from the profile dropdown to the classic sidebar changes mode-selection access and could make the control harder to find.

Adds the Classic/AI interface switcher to the classic sidebar footer and removes the User Interface section from the profile dropdown. Changes are requested because the collapsed-sidebar icon switcher is a raw icon-only <button> wrapped in a Card, which conflicts with the accepted record requiring icon-only actions to use ButtonUtility. Switching that variant to ButtonUtility with color="secondary" and dropping the hand-made button styling would resolve it.

✅ 1 closed
Closed: Quality: Collapsed-sidebar icon switcher is a raw icon-only <button>

📄 openmetadata-ui/src/main/resources/ui/src/components/AppModeSwitcher/AppModeSwitcher.constants.ts:51-55 📄 openmetadata-ui/src/main/resources/ui/src/components/AppModeSwitcher/AppModeSwitcher.tsx:65-73 📄 openmetadata-ui/src/main/resources/ui/src/components/AppModeSwitcher/AppModeSwitcher.tsx:177 📄 openmetadata-ui/src/main/resources/ui/src/components/MyData/LeftSidebar/LeftSidebar.component.tsx:306-311
The new icon variant, rendered by LeftSidebar whenever the sidebar is collapsed, draws the app-mode icon by itself inside a raw <button> (TRIGGER_STYLES.icon has no label, and aria-label is set only for this case). It then wraps that button in a Card to get a border. This goes against the Accepted record icon-only actions use ButtonUtility. That record says an icon-only action is a ButtonUtility and never a raw <button>, and that a bordered icon-only action is a ButtonUtility with color="secondary" (v8). The record's v9 exception list doesn't cover this control. It also adds a hand-made tw:hover:bg-primary_hover fill and a Card frame that ButtonUtility already provides.

Fix: for variant === 'icon', render ButtonUtility with color="secondary", size="lg" (or the size that matches the 56px sidebar items), the mode icon as icon, ref={triggerRef}, aria-label={modeLabelSentence}, aria-expanded and onClick. Then drop the icon entry's frame and root button styling. The other option is to add a v11 amendment to the record that lists this control as an exception.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Display: compact → Showing compact verification results.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@Rohit0301
Rohit0301 merged commit c96c702 into 2.1 Nov 27, 2026
51 of 53 checks passed
@Rohit0301
Rohit0301 deleted the Rohit0301/backport-38861-2.1 branch November 27, 2026 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants