Fix aside affecting parent popover height (#11859)

Release Notes:

- Fixed the size of the completions menu changing based on the size of
the aside
([#11722](https://github.com/zed-industries/zed/issues/11722)).


https://github.com/zed-industries/zed/assets/30776250/c67e6fef-20f2-4dc5-92b3-09bb73f874a7


https://github.com/zed-industries/zed/assets/30776250/7467b8ee-6e66-42d7-a8cc-2df11df58c5e

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
This commit is contained in:
loczek 2024-05-15 17:08:24 +02:00 committed by GitHub
parent 4ff1ee126c
commit d3dfa91254
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -40,10 +40,14 @@ pub struct Popover {
impl RenderOnce for Popover {
fn render(self, cx: &mut WindowContext) -> impl IntoElement {
div()
.flex()
h_flex()
.items_start()
.gap_1()
.child(v_flex().elevation_2(cx).px_1().children(self.children))
.child(
div()
.flex()
.child(v_flex().elevation_2(cx).px_1().children(self.children)),
)
.when_some(self.aside, |this, aside| {
this.child(
v_flex()