Skip to content

fix(ui): keep a context menu open while its own list scrolls - #795

Merged
InstaZDLL merged 1 commit into
mainfrom
fix/context-menu-inner-scroll
Oct 3, 2026
Merged

InstaZDLL merged 1 commit into
mainfrom
fix/context-menu-inner-scroll

Conversation

@InstaZDLL

@InstaZDLL InstaZDLL commented Oct 3, 2026 •

Copy link
Copy Markdown
Owner

Reported while adding tracks to a playlist: scrolling the playlist list in Add to a playlist closed the whole menu, so any playlist below the first few could not be reached.

Cause

ContextMenu closes on scroll so it never floats away from its anchor. It listens on window in the capture phase, which catches every scroll, including the one inside its own submenu list (max-h-64 overflow-y-auto).

Change

  • ContextMenu: a scroll whose target sits inside [data-context-menu] (the menu or its submenu) is ignored. Any other scroll still closes the menu as before. This is fixed in the shared component, so every menu benefits.
  • TrackContextMenu: the playlist list gets overscroll-contain. Without it, reaching the end of the list chains the wheel to the page, which scrolls and closes the menu.
  • Docs: the note in playlists.md on why the grid's menu survives an unmount now says page scroll.

typecheck, eslint, prettier and the local CodeRabbit review pass.

Summary by CodeRabbit

  • Corrections
    • Le menu contextuel reste ouvert lors du défilement dans le menu et ses sous-menus. Les défilements de la page continuent de le fermer.
    • Le défilement de la liste des playlists ne se propage plus à la page lorsque la liste atteint sa limite.

The menu closed on every scroll it captured, the playlist list inside the Add to a playlist
submenu included, so the list could not be scrolled at all. Only a scroll outside the menu closes
it now, and the list no longer hands its scroll on to the page once it reaches the end.
@InstaZDLL InstaZDLL added scope: frontend React/Vite frontend (src/) scope: docs Docs, README, assets type: fix Bug fix size: s 10-50 lines labels Oct 3, 2026
@coderabbitai

coderabbitai Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: InstaZDLL/WaveFlow/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 77f5a619-7acf-45d6-ae35-84783dbd235c
📥 Commits

Reviewing files that changed from the base of the PR and between 84eafb8 and 0bf928d.

📒 Files selected for processing (3)
  • docs/features/playlists.md
  • src/components/common/ContextMenu.tsx
  • src/components/common/TrackContextMenu.tsx

Included review availability: This review used your included allowance. 9 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 10 reviews per hour.


📝 Walkthrough

Walkthrough

Le menu contextuel reste ouvert lors d’un défilement interne. Les défilements extérieurs continuent de le fermer. La liste des playlists empêche la propagation du défilement en butée vers la page.

Changes

Menu contextuel et liste des playlists

Layer / File(s) Summary
Filtrage et confinement du défilement
src/components/common/ContextMenu.tsx, src/components/common/TrackContextMenu.tsx, docs/features/playlists.md
Le gestionnaire ignore les défilements dont la cible appartient à [data-context-menu] et ferme le menu dans les autres cas. La liste des playlists utilise overscroll-contain. La documentation décrit ces comportements.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 0bf92

Le défilement de la liste conserve le menu ouvert et son dépassement ne se propage pas à la page; les scrolls extérieurs continuent de le fermer. Aucun risque concret ne s’oppose à la fusion.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed Le titre suit le format Conventional Commits et décrit clairement le changement principal : garder le menu ouvert pendant le défilement de sa liste.
Description check ✅ Passed La description explique le problème, sa cause et les changements. Elle indique aussi les validations effectuées. Elle ne donne pas d’étapes de test reproductibles et ne remplit pas les sections de che…
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. (1 skipped: 1 …
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@InstaZDLL InstaZDLL self-assigned this Oct 3, 2026
@InstaZDLL
InstaZDLL merged commit 1740008 into main Oct 3, 2026
16 checks passed
@InstaZDLL
InstaZDLL deleted the fix/context-menu-inner-scroll branch October 3, 2026 03:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: docs Docs, README, assets scope: frontend React/Vite frontend (src/) size: s 10-50 lines type: fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant