Fix SelectPhraseBundleV2 dropdown close in modal context#37
Merged
navidshad merged 2 commits intoJun 17, 2026
Conversation
…st #86exzbh61 The save-phrase bundle selector (a pilotui Select in custom+multiple mode) would not close and its option list spilled out of the modal. - Close: pilotui's only outside-driven close is a document handler that bails whenever the click sits under any `.relative` ancestor — true for nearly every click inside the ConsoleCrane modal, so the dropdown never closed. pilotui exposes no close method or `open` prop, so drive its own Escape handler from a self-managed outside-pointerdown listener and a real closeDropdown() (the latter also wired up the previously no-op after-save close called by SaveWordSectionV2). - Overflow: pilotui only gives the option list an internal scroll in `confirm` mode; in the `custom` mode used here the list grows past the panel's max-height and out of the modal. Make the panel a flex column and let the list region scroll within it. Adds a happy-dom regression test for the close mechanism. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JsGMdHrjQfWRausa9T14kw
Collaborator
Author
The bundle list was capped at pilotui's max-h-96 with an internal scroll, but the save section sits near the modal bottom, so the fixed downward panel still ran past the visible frame — the user had to scroll the modal AND the list. On open, measure the trigger against the nearest scroll frame and place the absolutely-positioned panel accordingly: flip it upward when it can't fully open downward and there's more room above, and cap its height to the available space (minus a gap) in whichever direction it opens. Reposition on resize/scroll while open; pilotui exposes no placement API, so this is done via inline styles on its rendered panel. The list scrolls internally within the cap. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JsGMdHrjQfWRausa9T14kw
|
🎉 This PR is included in version 1.15.0-dev.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 1.15.1-dev.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 1.15.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🏷️ PR Title:
Fix bundle list containment and dropdown close behavior in console-crane modal
📋 Summary
This PR addresses UI issues in the console-crane modal by ensuring the bundle list remains contained within the modal frame and that the bundle selector dropdown closes appropriately.
🔗 Related Tasks
#86exzbh61 - Keep bundle list within the modal frame and close bundle selector dropdown properly
📝 Additional Details
The fixes improve user experience by preventing overflow of the bundle list outside the modal and ensuring dropdown interaction behaves as expected.
📜 Commit List
ca49b14 fix(console-crane): keep bundle list within the modal frame #86exzbh61
f9f1c8e fix(console-crane): close bundle selector dropdown and contain its list #86exzbh61