Skip to content

fix(RightMenu): fix inconsistent icon alignment in RightMenu items#36532

Merged
rusackas merged 3 commits intoapache:masterfrom
innovark37:innovark/fix/menu-item-icon
Jan 3, 2026
Merged

fix(RightMenu): fix inconsistent icon alignment in RightMenu items#36532
rusackas merged 3 commits intoapache:masterfrom
innovark37:innovark/fix/menu-item-icon

Conversation

@innovark37
Copy link
Contributor

@innovark37 innovark37 commented Dec 11, 2025

User description

SUMMARY

This PR fixes inconsistent icon spacing in the RightMenu component. Menu items where the icon is rendered outside the label (using the icon prop) had different spacing compared to items where the icon was rendered inside the label (inline). This caused visual misalignment and inconsistent UI.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

BEFORE
{46BFE384-FE7D-46B3-BE59-2DBC09F7ACFE}

AFTER
{9B387511-6C45-41A8-91A7-C05926F76509}

TESTING INSTRUCTIONS

  1. Navigate to any page with header (Welcome page, Dashboards page, Charts page, etc).
  2. Move your cursor over the + icon in the top-right corner. A dropdown menu (RightMenu) will appear.
  3. Verify consistent spacing between icons and labels in menu item.

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

CodeAnt-AI Description

Separate icons from labels in RightMenu to ensure consistent icon alignment

What Changed

  • Menu items no longer render icons inline inside the link text; icons are placed in the menu item's icon slot so the icon appears consistently to the left of the label
  • This applies to both internal routes and external links in the RightMenu dropdown, removing double-spacing and misaligned labels

Impact

✅ Consistent menu icon spacing
✅ Fewer visual alignment issues in header dropdowns
✅ Clearer, more predictable RightMenu appearance

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

@codeant-ai-for-open-source
Copy link
Contributor

CodeAnt AI is reviewing your PR.

@dosubot dosubot bot added change:frontend Requires changing the frontend home Namespace | Related to the Homepage labels Dec 11, 2025
@codeant-ai-for-open-source codeant-ai-for-open-source bot added the size:XS This PR changes 0-9 lines, ignoring generated files label Dec 11, 2025
@codeant-ai-for-open-source
Copy link
Contributor

Nitpicks 🔍

🔒 No security issues identified
⚡ Recommended areas for review

  • Click target changed
    Icons were removed from inside the Link/Typography content and instead set as the MenuItem icon property. That can change the clickable area and keyboard focus behavior — clicking the icon might no longer activate the associated Link if the icon slot isn't inside the anchor. Verify that icons in the icon slot keep the same navigation/activation behaviour (mouse click, keyboard, screen readers) as before.

  • Visual/layout regression risk
    Moving icons from inline content into the Menu icon prop can affect layout rules (order, spacing) applied to .ant-menu-item and .ant-menu-submenu-title. Verify submenu headings, horizontal alignment, and responsive behavior to ensure spacing/ordering matches the intended design across breakpoints and RTL locales.

  • Missing test selectors
    Previously icons had data-test attributes (e.g. on the icon components). Since labels were changed to plain Link/Text nodes and icons moved, test selectors may need to be updated or new data-test attributes added to Link/Typography to keep automated tests stable.

@codeant-ai-for-open-source
Copy link
Contributor

CodeAnt AI finished reviewing your PR.

@rusackas
Copy link
Member

Superset uses Git pre-commit hooks courtesy of pre-commit. To install run the following:

pip3 install -r requirements/development.txt
pre-commit install

A series of checks will now run when you make a git commit.

Alternatively it is possible to run pre-commit by running pre-commit manually:

pre-commit run --all-files

@codeant-ai-for-open-source
Copy link
Contributor

CodeAnt AI is running Incremental review


Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@codeant-ai-for-open-source
Copy link
Contributor

CodeAnt AI is running Incremental review


Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@rusackas rusackas merged commit d07a452 into apache:master Jan 3, 2026
65 checks passed
sadpandajoe pushed a commit that referenced this pull request Jan 5, 2026
@sadpandajoe sadpandajoe added the v6.0 Label added by the release manager to track PRs to be included in the 6.0 branch label Jan 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

change:frontend Requires changing the frontend home Namespace | Related to the Homepage size/S size:XS This PR changes 0-9 lines, ignoring generated files v6.0 Label added by the release manager to track PRs to be included in the 6.0 branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants