mirror of
https://github.com/discourse/discourse.git
synced 2026-08-12 05:37:26 +08:00
`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. |
||
|---|---|---|
| .. | ||
| asset-processor | ||
| deprecation-silencer | ||
| discourse | ||
| discourse-i18n | ||
| discourse-markdown-it | ||
| discourse-types | ||
| pretty-text | ||
| pretty-text-processor | ||
| .npmrc | ||
| polyfills.js | ||