Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[base-ui][docs] Placement rendering error in the Popup demos #40910

Closed
EyaOuenniche opened this issue Feb 3, 2024 · 8 comments
Closed

[base-ui][docs] Placement rendering error in the Popup demos #40910

EyaOuenniche opened this issue Feb 3, 2024 · 8 comments
Labels
docs Improvements or additions to the documentation package: base-ui Specific to @mui/base

Comments

@EyaOuenniche
Copy link
Contributor

EyaOuenniche commented Feb 3, 2024

Steps to reproduce

Link to live example: https://mui.com/base-ui/react-popup/

Steps:
1.Go to the Base UI Popup component demo.
2.Set the placement to "top-start."
3.Observe that the pop-up appears at the top-end instead.

Current behavior

The demo for the Base UI Popup component appears to have an issue with placement rendering. When selecting the placement as "top-start," the pop-up is displayed at the top-end instead. Similarly, when choosing "top-end," the pop-up appears at the top-start. The same issue occurs for placements related to the bottom.

2024-02-03.18-10-32.mp4

Expected behavior

I expect the pop-up placement in the demo to match the selected placement setting. For example, when choosing "top-start," the pop-up should appear at the top-start position, not top-end.

Context

No response

Your environment

npx @mui/envinfo
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.

Search keywords: Bug , Demo, Placement, Popup , Base UI

@EyaOuenniche EyaOuenniche added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Feb 3, 2024
@danilo-leal danilo-leal changed the title Incorrect Placement Rendering in Base UI Popup Component Demo [base-ui][docs] Placement rendering error in the Popup demos Feb 3, 2024
@danilo-leal danilo-leal added package: base-ui Specific to @mui/base docs Improvements or additions to the documentation and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Feb 3, 2024
@danilo-leal
Copy link
Contributor

Hey there @EyaOuenniche; thanks for opening the issue! I don't see the problem, though — top/bottom-start and end look correct to me. How visually different were you expecting it to be?

top-start top-end
Screenshot 2024-02-03 at 15 33 31 Screenshot 2024-02-03 at 15 33 41

@EyaOuenniche
Copy link
Contributor Author

Thank your for your response.
According to me I think that top-start should be at the left and top-end should be at the right.

@danilo-leal
Copy link
Contributor

I agree, yeah! And it is that way already, no? In the top-start example, the popup container is anchored at the left edge of the "Anchor" button, similarly to the top-end (anchored to the right).

@EyaOuenniche
Copy link
Contributor Author

I understand yes
My perspective of the visualization was that for the top-start the whole popup will slide to the left meaning that the end of the popup will be anchored with the right edge of the button .

@danilo-leal
Copy link
Contributor

Gotcha. That's how you should see the anchor button's start, center, and end edges, as the popup's placement is relative to that — hope it helps!

Screenshot 2024-02-03 at 15 55 19

@EyaOuenniche
Copy link
Contributor Author

Yes I understand .
Thank you!

@danilo-leal
Copy link
Contributor

Sweet — do you still think there's a problem or can we close the issue?

@EyaOuenniche
Copy link
Contributor Author

No, everything is clear now
We can close the issue
Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to the documentation package: base-ui Specific to @mui/base
Projects
None yet
Development

No branches or pull requests

2 participants