Revert "Fix aside affecting parent popover height (#11859)" (#11942)

This reverts commit d3dfa91254.

This change can cause weird behavior where the completion menu ends up
positioned away from the cursor location:

<img width="1062" alt="Screenshot 2024-05-16 at 6 43 17 PM"
src="https://github.com/zed-industries/zed/assets/1486634/0462a874-4fe3-4ca9-88ce-8d5d0b4009fe">

With the change reverted:

<img width="1026" alt="Screenshot 2024-05-16 at 6 43 35 PM"
src="https://github.com/zed-industries/zed/assets/1486634/9fc7b9a1-0cfb-4a84-8f6b-b481a785ceca">

Release Notes:

- Fixed an issue where the completion menu would sometimes appear
detached from the cursor location (preview only).
This commit is contained in:
Marshall Bowers 2024-05-16 18:53:08 -04:00 committed by GitHub
parent b9ecca7524
commit 0dd5fe313b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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