Skip to content

Commit

Permalink
Revert "Fix aside affecting parent popover height (#11859)" (#11942)
Browse files Browse the repository at this point in the history
This reverts commit d3dfa91.

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).
  • Loading branch information
maxdeviant committed May 16, 2024
1 parent b9ecca7 commit 0dd5fe3
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions crates/ui/src/components/popover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 0dd5fe3

Please sign in to comment.