Skip to content

Conversation

@bdfranck
Copy link
Collaborator

@bdfranck bdfranck commented Nov 27, 2025

This PR adds a Work Side Menu Group to use with the Workspace Side Menu. Features include...

  • Toggling the group open and closed
  • Using design tokens to style the Work Side Menu Items

work-side-menu-group

Sample code

Sample code

<goa-work-side-menu
  url="/"
  heading="Income and Employment Support (IES)"
  user-name="Edna Mode"
  user-secondary-text="edna.mode@example.com"
  open="true"
>
  <div slot="primary">
    <goa-work-side-menu-item
      icon="search"
      label="Search"
      url="/search"
    />

    <goa-work-side-menu-item
      icon="list"
      label="Clients"
      url="/clients"
    />

    <goa-work-side-menu-item
      icon="calendar"
      label="Schedule"
      url="/schedule"
    />

    <goa-work-side-menu-group icon="trending-up" heading="Reports">
      <goa-work-side-menu-item
        icon="file-text"
        label="Monthly Report"
        url="/reports/monthly"
      />
      <goa-work-side-menu-item
        icon="bar-chart-2"
        label="Annual Report"
        url="/reports/annual"
      />
    </goa-work-side-menu-group>
  </div>

  <div slot="secondary">
    <goa-work-side-menu-item
      icon="notifications"
      label="Notifications"
      type="success"
      badge="1"
      url="/notifications"
    />

    <goa-work-side-menu-item
      icon="help-circle"
      label="Support"
      url="/support"
    />

    <goa-work-side-menu-item icon="settings" label="Settings" url="/settings" />
  </div>

  <div slot="account">
    <goa-work-side-menu-item
      icon="person"
      label="Account management"
      url="/account"
    />

    <goa-work-side-menu-item icon="log-out" label="Log out" url="/logout" />
  </div>
</goa-work-side-menu>

Known issues

This component currently doesn't work with my brittle keyboard navigation in the Work Side Menu. I've created a bug to address it separately: #3279

@bdfranck bdfranck changed the base branch from dev to benjifranck/2478-workspace-side-menu November 27, 2025 23:03
@bdfranck bdfranck force-pushed the 3137-work-side-menu-group branch from fe9bdbf to 33893ef Compare November 27, 2025 23:05
Base automatically changed from benjifranck/2478-workspace-side-menu to dev November 28, 2025 17:48
@bdfranck bdfranck force-pushed the 3137-work-side-menu-group branch 3 times, most recently from b90b656 to 20fdfd2 Compare November 29, 2025 16:32
@bdfranck bdfranck changed the title 3137 work side menu group feat(#3137): add work side menu group Nov 29, 2025
@bdfranck bdfranck force-pushed the 3137-work-side-menu-group branch 2 times, most recently from 564b7ef to b34d10a Compare December 3, 2025 18:01
@bdfranck bdfranck marked this pull request as ready for review December 3, 2025 19:57
@bdfranck bdfranck linked an issue Dec 4, 2025 that may be closed by this pull request
@bdfranck bdfranck force-pushed the 3137-work-side-menu-group branch 4 times, most recently from 8013bd7 to c9c4781 Compare December 9, 2025 21:46
@bdfranck bdfranck force-pushed the 3137-work-side-menu-group branch 2 times, most recently from fe73761 to 24e4427 Compare December 15, 2025 23:36
@bdfranck bdfranck requested a review from twjeffery December 22, 2025 18:30
@bdfranck bdfranck force-pushed the 3137-work-side-menu-group branch from 24e4427 to dfbe648 Compare December 22, 2025 20:07
@bdfranck bdfranck force-pushed the 3137-work-side-menu-group branch 3 times, most recently from a07f85e to 9180a16 Compare January 6, 2026 19:52
@chrisolsen
Copy link
Collaborator

@bdfranck I know you love conflicts :)

@bdfranck bdfranck force-pushed the 3137-work-side-menu-group branch from 9180a16 to e0a159f Compare January 8, 2026 23:41
@bdfranck
Copy link
Collaborator Author

bdfranck commented Jan 8, 2026

@chrisolsen I've resolved the conflicts... for now. 🤪

@@ -0,0 +1,43 @@
import { ComponentFixture, TestBed, fakeAsync, tick } from "@angular/core/testing";
Copy link
Collaborator

Choose a reason for hiding this comment

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

I am seeing alignment issues

Image

I am also seeing one of the menus not opening in the right spot

Image

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@chrisolsen I've amended a commit to fix that menu item label alignment.

The Account menu is a known issue from the original Work Side Menu PR. (#2937) This is only an issue if teams use the menu in odd layouts, which I don't think we want to promote. I can revisit it if a team finds a valid use case.

I've also fixed the merge conflict.

@bdfranck bdfranck force-pushed the 3137-work-side-menu-group branch 2 times, most recently from 5612159 to 49c998b Compare January 15, 2026 22:22
@bdfranck bdfranck requested a review from chrisolsen January 15, 2026 23:04
Copy link
Collaborator

@twjeffery twjeffery left a comment

Choose a reason for hiding this comment

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

Looks good @bdfranck, just a few minor things I see:

  1. the text label alignment issue that Chris mentioned still seems to be there for me (text is slightly down of vertically centering with icons. I like the flex-start, so multi line will align properly a the start, but the line height seems to be shifting the label down too much.
Image
  1. maybe related to the align-start from #1, the icons all shift slightly up when the menu expands/collapses. removing 270 - align-items: center; seems to fix it.
Screen.Recording.2026-01-19.at.2.36.06.PM.mov

I think this fixes both #1 and #2 above:

A. In WorkSideMenuItem.svelte, remove align-items: center from the collapsed
container query:

@container (max-width: 160px) {                                              
   .menu-item {                                                               
     height: 36px;                                                            
     margin: 0;                                                               
     /* remove: align-items: center; */                                       
     padding-left: calc(var(--goa-space-xs) + 2px);                           
   }                                                                          
 }   

B. In WorkSideMenuItem.svelte, add margin-top to the icon:

  goa-icon {                                                                   
    display: var(--goa-work-side-menu-item-icon-display, flex);                
    margin-top: 2px;                                                           
  }   

C. In WorkSideMenuGroup.svelte, add margin-top to the trailing chevron:

  .trailing-icon {                                                             
    display: flex;                                                             
    margin-top: 2px;                                                           
  }     

This keeps icon positioning consistent between states (no shift) and aligns
the icons with the text's first baseline.

Image
  1. The line underneath the leading icon that shows the group is slight right of horizontal center from that icon.
Image
  1. in Figma we have the parent menu item showing an active state when expanded. I don't know if we need that state to persist, but having the background helps the child items feel closer and related to the parent above them. If we reduce the gap between the parent and the group below it, that could achieve the same thing? I'm curious what you think would be a better design.
Image
  1. One last minor thing I noticed: in Figma we have the sub items closer to the vertical line (12px), slightly inset from where the parent label starts. Would we want to change this to be closer? Up to you for what the design should be. It feels a bit spaced out when I see it in something like the account menu (see below).
Image

^Figma^

Image

^Code^

Let me know if you have any questions and/or want to discuss anything.

@bdfranck bdfranck force-pushed the 3137-work-side-menu-group branch 3 times, most recently from 3645332 to 6bc475f Compare January 20, 2026 18:35
@bdfranck
Copy link
Collaborator Author

Thanks for the feedback, @twjeffery! I've amended my commit with the following changes:

  1. Replaced work-side-menu-item with details and summary elements for better control of the component's state
  2. Added top margin to icons
  3. Fixed issue where icons shift on close
  4. Header has a background when group is open
  5. Aligned vertical border beside the child items
  6. Reduced left margin of child items

work-side-menu changes

Anything else? Thanks!

@bdfranck bdfranck requested review from twjeffery and removed request for chrisolsen January 20, 2026 18:42
@bdfranck bdfranck force-pushed the 3137-work-side-menu-group branch from 6bc475f to 2572f8f Compare January 20, 2026 19:21
Copy link
Collaborator

@twjeffery twjeffery left a comment

Choose a reason for hiding this comment

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

Looks great to me now @bdfranck! Thanks for making those changes.

One more thing comes up now that might be a bit confusing:

  • when a parent menu item is expanded and the side menu is collapsed, the menu item looks active because of that background. Also, when a user clicks on the parent group when the menu is collapsed, it opens and closes, but the user can't see it because the main side menu is collapsed. See video below:
Screen.Recording.2026-01-20.at.12.21.37.PM.mov

In my latest version of the design system website, I made it so if a side menu group is clicked when the side menu is collapsed, the menu opens automatically. thoughts on adding that approach as applicable here? https://goa-website-generation-v2.netlify.app/

@bdfranck bdfranck force-pushed the 3137-work-side-menu-group branch from 2572f8f to a1309ca Compare January 20, 2026 21:14
@bdfranck bdfranck force-pushed the 3137-work-side-menu-group branch from a1309ca to 034e8c3 Compare January 20, 2026 22:41
@bdfranck bdfranck requested a review from twjeffery January 20, 2026 23:30
@bdfranck
Copy link
Collaborator Author

@twjeffery Good catch! I've updated my commit to remove the background when the menu is collapsed. 👍

Instead of expanding the scope of this ticket, I could create a new one for improving the menu collapsed state. Here's all the ideas that I've captured so far:

  • Expand the menu when selecting a group
  • Expand the menu on load if a sub-menu item is the current item
  • Remember the expanded state between pages (and also between sessions?)
  • Collapse the menu when reducing the viewport to tablet width

Copy link
Collaborator

@twjeffery twjeffery left a comment

Choose a reason for hiding this comment

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

@twjeffery Good catch! I've updated my commit to remove the background when the menu is collapsed. 👍

Instead of expanding the scope of this ticket, I could create a new one for improving the menu collapsed state. Here's all the ideas that I've captured so far:

  • Expand the menu when selecting a group
  • Expand the menu on load if a sub-menu item is the current item
  • Remember the expanded state between pages (and also between sessions?)
  • Collapse the menu when reducing the viewport to tablet width

Good idea Benji, approved this version

@bdfranck bdfranck requested a review from chrisolsen January 21, 2026 22:49
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.

Workspace Side Menu: Menu Group

4 participants