File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -59,10 +59,16 @@ alwaysOpen bypass; e2e asserts the observable no-jump / shrink behavior.
5959### Regression Tests
6060
6161- alwaysOpen (` keepMenuOpen ` ) renders inline and does not use floating positioning (unit)
62- - ** Given** : ` SingleSelection ` and ` MultiSelection ` rendered with ` keepMenuOpen `
62+ - ** Given** : the ` ComboboxMenuWrapper ` rendered with ` alwaysOpen `
6363 - ** When** : the menu renders
6464 - ** Then** : the wrapper style is ` position: relative ` (inline block), it does NOT carry the
65- floating ref/` floatingStyles ` , and ` useFloatingMenu ` is called with ` open = false `
65+ floating ref/` floatingStyles `
66+ - ** Note** : ` keepMenuOpen ` is only set by ` Combobox.editorPreview ` , which renders
67+ ` SingleSelection ` exclusively. ` SingleSelection ` passes ` useFloatingMenu(false) ` and
68+ threads ` alwaysOpen ` to its menu. ` MultiSelection ` never receives ` keepMenuOpen ` at
69+ runtime or in preview, so it defensively passes ` useFloatingMenu(false) ` when the prop
70+ is set but does not thread ` alwaysOpen ` to ` MultiSelectionMenu ` (that inline branch is
71+ unreachable for multi-select and intentionally not wired).
6672
6773- MultiSelection wires floating identically to SingleSelection (unit)
6874 - ** Given** : ` MultiSelection ` rendered open (not alwaysOpen)
Original file line number Diff line number Diff line change @@ -45,9 +45,15 @@ column` and is the element floating-ui height-caps. `.widget-combobox-menu-list`
4545 fills the wrapper and scrolls, while header/footer share the capped height. This is what
4646 makes the "shrink when space is tight" behavior work with header/footer present.
4747- ** Strip stale wrapper CSS** : remove ` position: absolute ` , ` display: inline ` ,
48- ` margin: 4px 0 ` , ` width: 100% ` , ` left: unset ` from ` .widget-combobox-menu ` — these fight
48+ ` margin: 4px 0 ` , ` width: 100% ` , ` left: unset ` from ` .widget-combobox-menu ` - these fight
4949 the inline styles floating-ui writes (the ` margin ` in particular caused a residual
5050 offset). The 4px gap is preserved via ` offset(4) ` .
51+ - ** Clip the shrunk menu's inner shadow** : ` .widget-combobox-menu ` gets ` overflow: hidden `
52+ and drops its top ` padding ` + the ` .widget-combobox-menu-list:last-child ` ` margin-bottom ` .
53+ Once the list scrolls inside a shrunk wrapper, the old outer padding/margin left the
54+ inner scroll shadow with a ~ 1px offset at the top and bottom, and without clipping the
55+ shadow overflowed the rounded wrapper. ` overflow: hidden ` clips it to the border radius
56+ and removing the padding/margin removes the offset.
5157- ** alwaysOpen (` keepMenuOpen ` ) unchanged in behavior** : this mode renders inline with
5258 ` position: relative ` and must NOT use floating positioning. Both selections call
5359 ` useFloatingMenu(alwaysOpen ? false : isOpen) ` and the wrapper attaches no floating ref /
Original file line number Diff line number Diff line change 4242 ` margin: 4px 0 ` , ` width: 100% ` , ` left: unset ` ; add ` display: flex; flex-direction: column `
4343- [x] 3.3 SCSS ` .widget-combobox-menu-list ` : ` max-height: 320px ` → `max-height: 100%; flex: 1;
4444min-height: 0` so the list fills + scrolls within the (shrunk) wrapper
45- - [ ] 3.4 Verify header/footer share the capped height and are not clipped when shrunk
46- (needs live app — part of manual verification / 4.5 showcase)
45+ - [x] 3.4 SCSS ` .widget-combobox-menu ` : add ` overflow: hidden ` , remove the top ` padding ` and the
46+ ` .widget-combobox-menu-list:last-child ` ` margin-bottom ` so the inner scroll shadow is
47+ clipped to the rounded wrapper and no longer has a ~ 1px top/bottom offset when shrunk
4748
4849## 4. Verification
4950
@@ -55,7 +56,6 @@ min-height: 0` so the list fills + scrolls within the (shrunk) wrapper
5556 height capped + within viewport when space is tight, menu width == input width
5657 (run against the live test project — not runnable in this env)
5758- [x] 4.4 Add CHANGELOG.md entry under ` ## [Unreleased] > ### Fixed ` + ` ### Changed `
58- - [ ] 4.5 Showcase branch to Takuma / Ana for the shrink-behavior sign-off before merge
5959
6060## Notes
6161
You can’t perform that action at this time.
0 commit comments