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

[v4] Popover: Arrow offset uses wrong design token #5755

Closed
m-meier opened this issue May 17, 2024 · 4 comments
Closed

[v4] Popover: Arrow offset uses wrong design token #5755

m-meier opened this issue May 17, 2024 · 4 comments
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@m-meier
Copy link
Contributor

m-meier commented May 17, 2024

Describe the bug

The PopoverStyle.js uses the "popover.arrow.left" design token to position the arrow when the popup reaches the screen border. However the Popover component sets the "overlay.arrow.left" design token in the alignOverlay method.

Therefore the arrow is never repositioned.

Reproducer

https://stackblitz.com/edit/vitejs-vite-rameuq?file=src%2FApp.vue

PrimeVue version

4.0.0-beta.3

Vue version

3.x

Language

TypeScript

Build / Runtime

Vue CLI App

Browser(s)

No response

Steps to reproduce the behavior

Add a button with a popover which is limited by the right side and therefore pushed to the left.

Expected behavior

Arrow should be placed in the correct spot and use the correct design token.

@m-meier m-meier added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label May 17, 2024
@mertsincan mertsincan added this to the 4.0.0-rc.1 milestone May 17, 2024
@mertsincan mertsincan added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels May 17, 2024
@mertsincan
Copy link
Member

Good catch! Thanks a lot for your contribution!

@ElysaSrc
Copy link

I can still reproduce this issue with v4.0.0-rc.2:
image

It was working as expected on v3.

@m-meier
Copy link
Contributor Author

m-meier commented Jun 19, 2024

Yeah, they renamed the design token (e7853c5) but didn't adjust the component, so it uses the wrong name again :-(

@leosin
Copy link

leosin commented Jul 6, 2024

in 4.0.0 it still wrong offset.

const mydt = ref({
  background: '{amber.500}',
  borderRadius: '2rem',
})
<PvPopover ref="op" :dt="mydt">
....
</PvPopover>

@ElysaSrc
Can you use :dt in popover ?, I just started learning and not sure if I wrote it right but it doesn't work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants