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

[Popovers]: wrong position if page is scaled #7828

Closed
1 task done
Lukas742 opened this issue Nov 9, 2023 · 7 comments
Closed
1 task done

[Popovers]: wrong position if page is scaled #7828

Lukas742 opened this issue Nov 9, 2023 · 7 comments
Assignees
Labels
bug This issue is a bug in the code TOPIC RD UI5_WEBC_4_REACT
Milestone

Comments

@Lukas742
Copy link
Collaborator

Lukas742 commented Nov 9, 2023

Bug Description

If transform: scale(...) is used, the popovers are not calculating their position correctly.

image

Affected Component

All components implementing popovers

Expected Behaviour

No response

Isolated Example

https://codesandbox.io/s/ui5-webcomponents-forked-sy4wcp?file=/index.html

Steps to Reproduce

  1. Go to codeSandbox
  2. See that the transform: scale(0.7) is applied to the body
  3. Open the popover by clicking the button.
  4. See that the popover is misaligned

Log Output, Stack Trace or Screenshots

No response

Priority

None

UI5 Web Components Version

1.19.0

Browser

Chrome, Edge, Firefox, Safari

Operating System

No response

Additional Context

No response

Organization

MXP / UI5WCR

Declaration

  • I’m not disclosing any internal or sensitive information.
@Lukas742 Lukas742 added the bug This issue is a bug in the code label Nov 9, 2023
@tsanislavgatev
Copy link
Contributor

Hello colleagues,

Can you check this issue? It's reproducible in the code sandbox.

Best Regards,
Tsanislav

@georgimkv georgimkv self-assigned this Nov 13, 2023
@georgimkv
Copy link
Contributor

Reached out on our internal comms to find out about the usage and proposed to use CSS zoom: X

@georgimkv georgimkv removed their assignment Nov 16, 2023
@Lukas742
Copy link
Collaborator Author

Lukas742 commented Nov 16, 2023

Hi @gmkv

unfortunately I also found an issue when using zoom. The popover is not displayed for elements close to the edge of the window:
https://codesandbox.io/s/ui5-webcomponents-forked-3tzfj2?file=/index.html

I will also try to explain our use case a little bit.
We're providing a WYSIWYG editor where users can create content by choosing between different components and data sources.
The editor provides a live preview so that users can directly see what their page will look like. There we currently use transform:scale to zoom in or zoom out similar to the responsive view in the dev tools of e.g. Chrome.
The zoom should really just be a zoom and not change the layout of the page, as it should always show the layout for that dimensions. So a responsive container would be great for different device options (e.g. mobile, tablet, etc.) but not for actually zooming in or out.
For example: A user only has a small screen, but wants to support a layout for large desktops. The user adds elements and wants to see what the whole screen would look like for those dimensions, so he zooms out without the UI reacting to the dimension shift, because there is virtually none.

@georgimkv georgimkv self-assigned this Nov 22, 2023
@georgimkv georgimkv removed their assignment Dec 8, 2023
@georgimkv
Copy link
Contributor

#7908

@dimovpetar dimovpetar self-assigned this Feb 1, 2024
@dimovpetar
Copy link
Contributor

dimovpetar commented Apr 18, 2024

Hello @Lukas742 ,

Popovers now step on the native popover solution. This results in correctly positioned popovers, regardless of the body transform.
This will be available with version 2.0. Is this OK for you?

Best regards,
Petar

@Lukas742
Copy link
Collaborator Author

Hi @dimovpetar

yes, that's fine for us. Thank you!

@ilhan007 ilhan007 added this to the 2.0.0 milestone Apr 18, 2024
@dimovpetar
Copy link
Contributor

Hello @Lukas742,

This is the relevant pull request #8192.
Please re-test once version 2.0 is available.

Best regards,
Petar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug in the code TOPIC RD UI5_WEBC_4_REACT
Projects
Status: Completed
Development

No branches or pull requests

6 participants