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

fix: add default targetEl for callout #170

Merged
merged 4 commits into from
Jun 17, 2024

Conversation

felicia-haggqvist
Copy link
Contributor

@felicia-haggqvist felicia-haggqvist commented Jun 11, 2024

Fixes Jira WARP-527

  • Update to latest version of @warp-ds/core dependency
  • Create a default targetEl when callout is true and targetEl is undefined.
  • Add a comment for the reason of creating a default targetEl:
    "the autoUpdatePosition() from @warp-ds/core, uses Floating-ui's computePosition(). Floating-ui's computePosition() requires a defined targetEl to be able to compute the attentionEl's position and the attentionEl's arrow position. When props.callout is true, we only need computePosition() to calculate the callout's arrow position. So, we create a default targetEl for callout that we can pass to the autoUpdatePosition(), in order to avoid Floating-ui from throwing an error."

Tested:

  • Tested in Chrome, Firefox and Safari
  • Also tested in Server-side rendered app

@felicia-haggqvist felicia-haggqvist requested a review from a team June 11, 2024 09:25
@felicia-haggqvist felicia-haggqvist self-assigned this Jun 11, 2024
@felicia-haggqvist felicia-haggqvist changed the title fix: add start end suffix for callout fix: add default targetEl for callout Jun 11, 2024
Copy link
Contributor

@imprashast imprashast left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice 👍

@felicia-haggqvist felicia-haggqvist merged commit 957e4cb into next Jun 17, 2024
10 checks passed
@felicia-haggqvist felicia-haggqvist deleted the fix/add-start-end-suffix-callout branch June 17, 2024 07:56
github-actions bot pushed a commit that referenced this pull request Jun 17, 2024
## [2.0.1-next.3](v2.0.1-next.2...v2.0.1-next.3) (2024-06-17)

### Bug Fixes

* add default targetEl for callout ([#170](#170)) ([957e4cb](957e4cb))
github-actions bot pushed a commit that referenced this pull request Jul 4, 2024
## [2.0.1](v2.0.0...v2.0.1) (2024-07-04)

### Bug Fixes

* add default targetEl for callout ([#170](#170)) ([957e4cb](957e4cb))
* add support for formatting vue files ([#167](#167)) ([347ab79](347ab79))
* Deprecate the "notification" variant of Badge ([#172](#172)) ([74bf5f2](74bf5f2))
* revert renaming key in w-toggle ([#168](#168)) ([286ed74](286ed74))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants