microsoft / fluentui

Fluent UI web represents a collection of utilities, React components, and web components for building web applications.
https://react.fluentui.dev
Other
18.44k stars 2.72k forks source link

Nested Nav links rendering incorrectly - two highlight bars #21971

Closed ptallettms closed 2 years ago

ptallettms commented 2 years ago

Environment Information

Please provide a reproduction of the bug in a codepen:

  <Nav
    groups={[
      {
        links: [
          {
            name: "Top",
            url: '',
            key: "key1",
            links: [{
              name: "Level 1",
              url: '',
              key: "key33",
              links: [{
                name: "Level 2",
                url: '',
                key: "key333",
                target: "_blank",
                links: [{
                  name: "Level 3",
                  url: '',
                  key: "key3333",
                }],
              }],
            },
            ]
          }
        ],
      },
    ]}
  />

Actual behavior:

image

Also loses the icon if present (all of the items should have an icon):

image

Expected behavior:

Link is showing two blue bars, expected 1 blue bar Only happens on nested links with children, not top level (ie Top and Level 3 are okay, Level 1 and Level 2 show this behaviour)

Priorities and help requested:

Either a fix or a styling workaround

Are you willing to submit a PR to fix? (Yes, No) No

Requested priority: (Blocking, High, Normal, Low): Normal

Products/sites affected: (if applicable)

Nav components with nested links

micahgodbolt commented 2 years ago

confirmed the bug via https://codepen.io/micahgodbolt/pen/wvpxdPb?editors=0010