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

Add arrow #24

Open
camskene opened this issue Oct 14, 2022 · 2 comments · Fixed by universal-ember/ember-primitives#289
Open

Add arrow #24

camskene opened this issue Oct 14, 2022 · 2 comments · Fixed by universal-ember/ember-primitives#289
Labels
enhancement New feature or request

Comments

@camskene
Copy link
Collaborator

'Velcro is designed to "create an experience out of the box that is useful" - to that end, adding an arrow to a tooltip or popover should be as simple as possible and easy for consumers to style.

See https://floating-ui.com/docs/arrow

@camskene camskene added the enhancement New feature or request label Oct 14, 2022
@NullVoxPopuli
Copy link
Contributor

I have an implementation of this over here:
https://github.com/universal-ember/ember-primitives/pull/38/files#diff-923252e42afb249fe91098b5fe111e16c1cb59a766ef2d478e695c6e4d353bd5R41

Code: https://github.com/universal-ember/ember-primitives/pull/38/files#diff-ed5e9331439bf50c215f4e7829854af5098476ffa6d12c4848117123efdc4fc0R180

Had to do another modifier, because it's an opt-in thing.
There is also a problem of double-render, because the floating-ui is setup when only the hook and loop have elements, but there isn't a way I could think of to somehow know to wait for the third element before booting up.

Something else I noticed is that the middleware data is frequently dirty -- even when the values don't change. I think this would be an issue for floating-ui to fix, because it doesn't make sense for the autoUpdate function to call again if the data isn't changing, ya know?

@NullVoxPopuli
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
2 participants