Skip to content

fix(tabs): keep nested tab orientations independent - #5353

Merged
Vincent Baaij (vnbaaij) merged 3 commits into
microsoft:devfrom
rksharma-owg:fix/nested-tabs-orientation
Sep 28, 2026
Merged

Vincent Baaij (vnbaaij) merged 3 commits into
microsoft:devfrom
rksharma-owg:fix/nested-tabs-orientation

Conversation

@rksharma-owg

Copy link
Copy Markdown
Contributor

📖 Description

A horizontal tab group switches to a flex layout when it contains a nested vertical tab group. The vertical-layout :has() selector matches tablists at any descendant depth.

Limit the selector to the owning header: either a direct tablist or a tablist inside the direct overflow-header wrapper.

🎫 Issues

Fixes #5341.

👩‍💻 Reviewer Notes

The selector covers both header structures used by FluentTabs. There are no component API changes.

📑 Test Plan

  • Added eight Chromium cases covering outer/inner orientations with and without overflow. The two horizontal-outer/vertical-inner cases fail before the fix; all eight pass afterward, locally and in cloud browser validation.
  • Fork build/test workflow passed for a1ff4a940b839c958c5754eceb0ff42a7df9c771, including Release builds, Core/Charts/MCP tests, CodeQL and 98.4% line coverage against the 98% requirement.
  • .NET 11: 4,522 passed; ten existing DataGrid virtualization tests remain skipped for the documented bUnit limitation. Local core tests: 4,527 passed.

Upstream currently disables integration tests in its workflow. The separate browser run invokes the existing integration project through dotnet vstest, with an external server-readiness/cleanup wrapper kept out of this PR.

✅ Checklist

General

  • I have added tests for my changes.
  • I have tested my changes.
  • I have updated the project documentation to reflect my changes. (Not applicable: restores existing layout behavior.)
  • I have read the CONTRIBUTING documentation and followed the project standards.

Component-specific

  • I have modified an existing component.
  • I have validated the unit tests for an existing component.

Copilot AI 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.

Copilot review overview

🟢 Approval recommended

No unresolved review issues were identified, and all reviewers assessed it as ready.

Review effort: Lite
Findings: None

What changed in this PR

Fixes nested FluentTabs orientation interference by scoping vertical layout detection to each tab group’s own header.

Changes:

  • Restricts vertical :has() selectors to owning tab headers.
  • Adds eight Chromium integration cases covering orientations and overflow.
File Description
tests/​Integration/​Components/​Tabs/​FluentTabsTests.cs Adds eight orientation and overflow scenarios.
tests/​Integration/​Components/​Tabs/​Examples/​NestedTabsPage.razor Adds a nested-tabs test page.
src/​Core/​Components/​Tabs/​FluentTabs.razor.css Scopes orientation layout selectors to the owning tab group.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good for me.

Image

@vnbaaij Vincent Baaij (vnbaaij) left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

See Marvin Klein (@MarvinKlein1508) 's feedback: No page link and no stylesheet link in the example and the example needs to be linked from the FluentTabs.md doc page
As mentioned, it is an integration test, not an example

@vnbaaij
Vincent Baaij (vnbaaij) merged commit 102e446 into microsoft:dev Sep 28, 2026
3 checks passed
@rksharma-owg
RKS (rksharma-owg) deleted the fix/nested-tabs-orientation branch September 28, 2026 10:24
This was referenced Oct 14, 2026
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.

fix: cannot use vertical FluentTabs within another FluentTabs

5 participants