quickinput: keep Command Center visible when Quick Pick is dragged away (#306139)
* quickinput: expose alignment observable, keep Command Center visible when Quick Pick is dragged
When the Quick Pick is dragged away from its default top position, the
Command Center in the title bar no longer hides. Previously it always
hid on Quick Pick show, even when the widget was in a custom position
where it wouldn't overlap.
Changes:
- Add QuickInputAlignment type ('top' | 'center' | 'custom') and
alignment observable to IQuickInputService
- DnD controller tracks alignment via _setAlignmentState() helper that
updates both the context key and the observable
- Each service layer has a stable observableValue mirrored via autorun
(avoids breaking subscriptions on lazy controller creation)
- Command Center uses autorun to reactively show/hide based on alignment
- Fix onShowEmitter.fire() timing (moved after layoutContainer so
alignment is settled before listeners fire)
- Fix top===0 truthiness bugs in layoutContainer and updateLayout
- Fix double-click reset not updating alignment state
Fixes #306138
Co-authored-by: Copilot <[email protected]>
* quickinput: handle anchored inputs and partial state in alignment
- Set alignment to 'custom' for anchored quick inputs (positioned near
a DOM element, not at the top)
- Re-sync alignment from DnD controller on non-anchored show to prevent
stale 'custom' value after an anchored input closes
- Guard setAlignment() to no-op while an anchored input is visible
- DnD alignment typed as IObservable<QuickInputAlignment> (read-only)
- Require both top and left in persisted state before marking as custom
Co-authored-by: Copilot <[email protected]>
---------
Co-authored-by: Copilot <[email protected]> R
Rob Lourens committed
590f350b07bae00e1af378792866327198409f76
Parent: 8a20f2f
Committed by GitHub <[email protected]>
on 3/30/2026, 6:43:28 PM