Popover: trigger_style is ignored
Problem
Popover::trigger_style stores the supplied StyleRefinement, but Popover::render does not read or forward it. As a result, trigger-container styling supplied through this public method has no effect.
Source inspection of upstream commit 3f1dda6ee9256ba317b19552999d130e3d078159 shows exactly four references to trigger_style: the field declaration (line 123), initialization (138), method name (214), and assignment (215). There is no render-time read:
- The setter stores
trigger_style. - The render path forwards the trigger but never applies
trigger_style. - DropdownMenuPopover also passes its trigger style to this method, so the ignored value affects an existing caller as well.
Reproduction
Render this inside an initialized GPUI Kit view:
use gpui_kit::{ParentElement as _, StyleRefinement, Styled as _, px};
use gpui_kit::component::{button::Button, h_flex, popover::Popover};
h_flex().w(px(320.)).child(
Popover::new("styled-popover")
.trigger_style(StyleRefinement::default().w_full().p(px(10.)))
.trigger(Button::new("trigger").label("Open").w_full())
.child("Popover content"),
)Expected: the trigger container honors the supplied width and padding, and popup positioning and the click target use that container's bounds.
Local runtime result: in a focused GPUI regression on macOS, in a worktree based on 42721ea040d522053fe20b935d66c19c195f8f83, the button's left edge was 0px relative to its parent instead of the requested 10px inset. That worktree's Popover render path was unchanged by the InputGroup implementation.
The runtime reproduction was performed on the local revision above. Verification of 3f1dda6ee9256ba317b19552999d130e3d078159 was source inspection, not a runtime test of that newer revision.
Scope
This can be reproduced with the existing Popover and Button, independently of InputGroup. It was found while working on #2863 and is reported separately so the project owner can decide the intended trigger-styling contract and fix. No Popover or Base-layer fix is being included in the InputGroup work.
Source: longbridge/gpui-component