From 9503d5a234d09505fc5a487de9b55521ea147640 Mon Sep 17 00:00:00 2001
From: "gcp-cherry-pick-bot[bot]"
<98988430+gcp-cherry-pick-bot[bot]@users.noreply.github.com>
Date: Thu, 16 May 2024 19:03:50 -0400
Subject: [PATCH] Revert "Fix aside affecting parent popover height (#11859)"
(cherry-pick #11942) (#11944)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cherry-picked Revert "Fix aside affecting parent popover height
(#11859)" (#11942)
This reverts commit d3dfa91254f8cbc7f4779463b30a3df1677c395d.
This change can cause weird behavior where the completion menu ends up
positioned away from the cursor location:
With the change reverted:
Release Notes:
- Fixed an issue where the completion menu would sometimes appear
detached from the cursor location (preview only).
Co-authored-by: Marshall Bowers
---
crates/ui/src/components/popover.rs | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/crates/ui/src/components/popover.rs b/crates/ui/src/components/popover.rs
index d71b9028d0fff67f2c84b25c3313e9abd8d0e5ed..b9932eb401a85d8d15010a65d4dacef7fd1f27e8 100644
--- a/crates/ui/src/components/popover.rs
+++ b/crates/ui/src/components/popover.rs
@@ -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()