Skip to content

Feat/navbar vertical next flat submenu#2065

Draft
mistrykaran91 wants to merge 2 commits into
mainfrom
feat/navbar-vertical-next-flat-submenu
Draft

Feat/navbar vertical next flat submenu#2065
mistrykaran91 wants to merge 2 commits into
mainfrom
feat/navbar-vertical-next-flat-submenu

Conversation

@mistrykaran91
Copy link
Copy Markdown
Member

@mistrykaran91 mistrykaran91 commented May 14, 2026

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a mobile-specific "flat submenu" feature for the navbar-vertical-next component. When the viewport is at or below the small breakpoint (576px), triggering a group now opens a dedicated submenu view with a back button instead of using flyouts or inline expansion. The changes include the new SiNavbarFlatSubmenuComponent, updated layout logic to hide other elements when the submenu is active, and comprehensive E2E and unit tests. Feedback focuses on improving the robustness of label retrieval by targeting specific title elements and ensuring the new component adheres to project standards by using ChangeDetectionStrategy.OnPush and its corresponding import.

Comment thread projects/element-ng/navbar-vertical-next/si-navbar-flat-submenu.component.ts Outdated
Comment thread projects/element-ng/navbar-vertical-next/si-navbar-flat-submenu.component.ts Outdated
@mistrykaran91 mistrykaran91 marked this pull request as ready for review May 15, 2026 05:09
@mistrykaran91 mistrykaran91 requested review from a team as code owners May 15, 2026 05:09
Copy link
Copy Markdown
Member

@panch1739 panch1739 left a comment

Choose a reason for hiding this comment

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

@mistrykaran91 Awesomeee!!

Just some notes, in the drill down version, for the title node, we should use text-primary. Right now is using text-secondary:

Image

In the design, the flyout menu is using base-3, could we do the same? I know this is a change from the current implementation, so if is too breaking, we can skip that and do it later:

Image

Thanks!

Comment thread projects/element-ng/navbar-vertical-next/si-navbar-flat-submenu.component.ts Outdated
readonly flyout = signal(false);

/** @internal `true` when this group is currently rendered inside the mobile flat submenu. */
readonly flatSubmenuActive = computed(
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't like the naming, can we have something shorter e.g. flatMode ?

styleUrl: './si-navbar-flat-submenu.component.scss',
changeDetection: ChangeDetectionStrategy.OnPush
})
export class SiNavbarFlatSubmenuComponent implements OnDestroy {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can we find a better name?

Copy link
Copy Markdown
Member

@spliffone spliffone left a comment

Choose a reason for hiding this comment

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

  1. When the user press on a group and the flat the next level become active -> the focus is lost but should be on the first item
  2. When a group is active and the sub items are visible - toggle the collapse expand mode loose the current selection and the user starts from the top navbar - we need to fix it
  3. I can't see a animation / transition between group click and visible sub items
  4. Are we still limited to one sub-level or can we build navigation for 3, 4 or more levels?

@mistrykaran91 mistrykaran91 force-pushed the feat/add-navbar-vertical-next-flyout-behavior branch 6 times, most recently from 23b8b01 to 1c08adc Compare May 19, 2026 10:32
Base automatically changed from feat/add-navbar-vertical-next-flyout-behavior to main May 19, 2026 12:01
@kfenner kfenner requested a review from chintankavathia as a code owner May 20, 2026 17:00
@mistrykaran91 mistrykaran91 force-pushed the feat/navbar-vertical-next-flat-submenu branch from fbb60eb to af1ed61 Compare May 25, 2026 13:38
@mistrykaran91 mistrykaran91 marked this pull request as draft May 25, 2026 13:43
@mistrykaran91 mistrykaran91 force-pushed the feat/navbar-vertical-next-flat-submenu branch from 0f34a41 to 3efdc69 Compare May 26, 2026 06:57
- On mobile viewports (≤576px) with the navbar expanded, triggering a
group now opens its sub-items as a flat submenu that replaces the inline list

Related #1944
@mistrykaran91 mistrykaran91 force-pushed the feat/navbar-vertical-next-flat-submenu branch from b5f1dff to e26e176 Compare May 26, 2026 09:17
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.

3 participants