Skip to content

[NavGroup] Fix disabled state for top-level FluentNavGroup#4647

Merged
vnbaaij merged 1 commit intomicrosoft:devfrom
MarvinKlein1508:menu-fix
Mar 27, 2026
Merged

[NavGroup] Fix disabled state for top-level FluentNavGroup#4647
vnbaaij merged 1 commit intomicrosoft:devfrom
MarvinKlein1508:menu-fix

Conversation

@MarvinKlein1508
Copy link
Copy Markdown
Collaborator

Pull Request

📖 Description

This PR fixes the disabled state for top-level FluentNavGroup elements. When you had a FluentNavGroup with Disabled="true" on the top level of FluentNavMenu then it was still possible to open it.

Before:

before

After:

after

🎫 Issues

Fixes #4645

👩‍💻 Reviewer Notes

📑 Test Plan

✅ Checklist

General

  • I have added tests for my changes.
  • I have tested my changes.
  • I have updated the project documentation to reflect my changes.
  • I have read the CONTRIBUTING documentation and followed the standards for this project.

Component-specific

  • I have added a new component
  • I have added Unit Tests for my new component
  • I have modified an existing component
  • I have validated the Unit Tests for an existing component

⏭ Next Steps

@vnbaaij vnbaaij merged commit 84f3b9c into microsoft:dev Mar 27, 2026
2 checks passed
@dvoituron
Copy link
Copy Markdown
Collaborator

Why the design is not the same between the two "disabled"?
{940F66DE-8525-4E40-822A-B26A06793735}

@MarvinKlein1508
Copy link
Copy Markdown
Collaborator Author

@dvoituron this is either another bug or on purpose. it's using different colors for FluentNavGroup and FluentNavItem. Was like this before my PR as well:

grafik

@MarvinKlein1508 MarvinKlein1508 deleted the menu-fix branch March 27, 2026 12:54
@MarvinKlein1508
Copy link
Copy Markdown
Collaborator Author

@dvoituron @vnbaaij By default disabled items do not change color. Instead there is an opacity applied.

We can change this behaviour for the NavGroup with this CSS as well

::deep .fluent-nav-group.disabled {
    pointer-events: none;
}

    ::deep .fluent-nav-group.disabled .fluent-nav-icon {
        fill: var(--neutral-stroke-rest) !important;
    }

    ::deep .fluent-nav-group.disabled .fluent-nav-text {
        opacity: var(--disabled-opacity);
    }

Result:

grafik

Let me know what you think and I'll create a second PR for this change :)

@dvoituron
Copy link
Copy Markdown
Collaborator

I find that better, to have the same color.

@vnbaaij
Copy link
Copy Markdown
Collaborator

vnbaaij commented Mar 27, 2026

Yup, much better. Bring on the PR!

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.

FluentNavGroup Disabled property has no effect on top-level groups

3 participants