0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-12 05:37:26 +08:00
discourse/frontend
Sérgio Saquetim a18c5b3303
UX: Align DComboButton menus with the trigger's trailing edge (#42493)
`DComboButton` never passed a placement to `DMenu`, so FloatKit's
`bottom-start` default applied. For an ordinary full-width trigger that
is right, but a combo button's trigger is the narrow chevron welded to
the group's trailing edge, so the dropdown opened left-aligned to the
chevron and a wide menu ran past the right edge of the group. The menu
now prefers `bottom-end`, aligning its trailing edge with the trigger's.

### Before

<img width="435" height="115" alt="image"
src="https://github.com/user-attachments/assets/f47c1053-1c01-4c9b-93e1-5a67c815671f"
/>

### After

<img width="309" height="123" alt="image"
src="https://github.com/user-attachments/assets/9e317c96-ed84-4978-a19f-72cabd926d28"
/>

Two of the four call sites had already worked around this by
hand-writing `@placement="bottom-end"`, which is what suggested the
default was wrong rather than those call sites being special. Those
overrides still apply and are unchanged; the drafts dropdown on the
topic list and discourse-calendar's event RSVP button pick up the new
default.

The default is written as a fallback rather than a bare value because of
how Glimmer merges curried arguments: `Menu` forwards consumer arguments
through `curryComponent`, and the curry path only adds keys the
invocation site has not already set, so arguments written on the curried
invocation win. A bare value would therefore be a hard override that
silently discarded any consumer's placement. The same applies to the
`chevron-down` icon, which was previously hardcoded and did silently
discard a consumer's `@icon`; it is now a real default.
2026-08-11 17:44:17 -03:00
..
asset-processor DEV: Derive styleguide code samples from the rendered example (#42100) 2026-07-29 13:48:35 -03:00
deprecation-silencer
discourse UX: Align DComboButton menus with the trigger's trailing edge (#42493) 2026-08-11 17:44:17 -03:00
discourse-i18n DEV: add typescript support for core, themes and plugins (#41478) 2026-07-08 12:57:18 +01:00
discourse-markdown-it DEV: Bump eslint/lint-configs, and correct violations (#41321) 2026-07-01 10:39:57 +01:00
discourse-types DEV: Use bundler module resolution for @discourse/types consumers (#41661) 2026-07-13 21:43:39 -03:00
pretty-text FIX: clean up onebox loading decorations on fetch failure (#39277) 2026-07-23 19:50:41 -03:00
pretty-text-processor DEV: Set tsconfig: false for pretty-text-processor (#42483) 2026-08-10 17:12:22 +01:00
.npmrc
polyfills.js