fix(#3548): pin secondary menu at bottom of Work Side Menu during scroll#3709
fix(#3548): pin secondary menu at bottom of Work Side Menu during scroll#3709
Conversation
9c3723b to
2ce89d2
Compare
2ce89d2 to
96ecc0c
Compare
bdfranck
left a comment
There was a problem hiding this comment.
Looks good! I have a couple suggestions that I added in a commit. You can squash them if you agree. Changes include:
- Give the top section the class name
.top-sectionfor consistency - Remove bottom padding on primary menu to get rid of the extra space
- Use tokens for new values (GovAlta/design-tokens#144)
| observer = watchPathChanges(setCurrentUrl); | ||
|
|
||
| if (typeof ResizeObserver !== "undefined") { | ||
| _resizeObserver = new ResizeObserver(() => setMenuScrolling()); |
There was a problem hiding this comment.
Potential problem with this. The ResizeObserver fires setMenuScrolling, which has the potential to change the observed _menuEl, which would cause it to fire again. I can't come up with an actual test that will have this problem, just noticed it as a potential issue we may want to do something about now.
There was a problem hiding this comment.
I wrapped the callback in performOnce with its own timer so it doesn't interfere with the existing one in addMenuLink, Which should prevent any re-triggering.
There was a problem hiding this comment.
@twjeffery Not quite the same issue:
ResizeObserverfires, line 84- It schedules
setMenuScrolling, line 85 - That function can change
_isScrolling, line 111 _isScrollingcontrols thescrollingclass, line 349- The
.scrollingclass can change the width, line 550 - The
ResizeObserverin step 1 above, is watching_menuEl, which is inside that container, and thus can have its width change, which would refire ResizeObserver
libs/web-components/src/components/work-side-menu/WorkSideMenu.svelte
Outdated
Show resolved
Hide resolved
|
Quick update on this one @bdfranck @ArakTaiRoth: I got the suggestions and review points sorted out locally and tests are still passing. I reviewed and merged the token PR from Benji, but the npm release failed due to a bad token. Now waiting on another fix PR to re-trigger the publish before I squash everything together and push |
2708b8a to
270bea5
Compare
✅ Deploy Preview for benji-docs-previews ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
270bea5 to
dd7f364
Compare
|
@bdfranck @ArakTaiRoth Should be good to review again now |
Restructure the side menu layout so only the primary nav scrolls while secondary menu, account section, and collapse toggle stay fixed at the bottom. Adds scroll-aware border and shadow indicators that fade in when content is hidden in either direction. Uses a ResizeObserver (debounced via performOnce) to detect dynamic overflow from group expansion or window resize, and caches scrollTop from goa-scrollable's _scroll event to avoid shadow DOM coupling. Co-authored-by: Benji Franck <1479091+bdfranck@users.noreply.github.com>
dd7f364 to
eb3b476
Compare

Summary
Screen.Recording.2026-03-30.at.3.48.30.PM.mov
Top of scroll
Closes #3548
Test plan
/bugs/3548which has enough primary items to overflow