SAP / ui5-webcomponents

UI5 Web Components - the enterprise-flavored sugar on top of native APIs! Build SAP Fiori user interfaces with the technology of your choice.
https://sap.github.io/ui5-webcomponents/
Apache License 2.0
1.5k stars 260 forks source link

[popover]: arrow is not centered when close to the border/with large text #7152

Closed rvsia closed 7 months ago

rvsia commented 1 year ago

Bug Description

The arrow of popover is not centered to the middle of target when it's close to the border of the screen or when there is a larger content

1) close to the border

Snímek obrazovky 2023-06-06 v 9 05 33

2) large content

Snímek obrazovky 2023-06-06 v 9 08 03

As we use only a small target for the popover, it looks really bad in our product

Snímek obrazovky 2023-06-06 v 9 20 27

Affected Component

popover

Expected Behaviour

Popover arrow is centered to the

Isolated Example

https://sap.github.io/ui5-webcomponents-react/?path=/docs/modals-popovers-popover--docs

Steps to Reproduce

  1. open webcompoments react popover page
  2. modify content of the popover using inspect

Log Output, Stack Trace or Screenshots

see above

Priority

Medium

UI5 Web Components Version

^1.13.2

Browser

Edge

Operating System

MacOS

Additional Context

No response

Organization

SAP Signavio

Declaration

elenastoyanovaa commented 1 year ago

Hello @SAP/ui5-webcomponents-topic-rd ,

When the opener target is small and the popover does not have enough space the calculation of the arrow result in a unpleasant visualisation.

Steps to reproduce:

Can you check?

Kind Regards, Elena

georgimkv commented 1 year ago

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