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

feat: Add more features on how attention component is positioned #215

Merged
merged 83 commits into from
Apr 16, 2024

Conversation

felicia-haggqvist
Copy link
Contributor

@felicia-haggqvist felicia-haggqvist commented Feb 23, 2024

Part of fixes for Jira-tickets: WARP-432, WARP-341 & WARP-373

  • Add distance, skidding, flip, fallbackPlacements props to Attention component
  • Update pointingAtDirection to also account for the new placements: top-start, top-end, right-start, right-end, left-start, left-end, bottom-start, bottom-end
  • Update arrowDirectionClassname to also handle when placement includes either -start or -end
  • Add a useEffect to handle when to call autoUpdatePosition that will add event-listeners for on scroll and on resize and calls recompute. When cleanup is returned, the event-listeners will be removed.
  • Calculation of arrowRotation has been removed from this repo and is now instead calculated in the warp-ds/core repo.
  • Update Attention examples in Attention.stories.tsx to also show how distance, skidding, flip, fallbackPlacements and the new placements can be used.
  • Add AttentionTest.tsx and add tests for Attention component
  • Add Attention.ts as a helper file for Attention component
  • Bump version of @warp-ds/core to use latest changes

…rowDirection to get updated placement returned from floating-ui
Copy link
Contributor

@BalbinaK BalbinaK left a comment

Choose a reason for hiding this comment

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

LGTM

@felicia-haggqvist felicia-haggqvist marked this pull request as ready for review April 16, 2024 11:47
Copy link
Contributor

github-actions bot commented Apr 16, 2024

PR Preview Action v1.4.7
Preview removed because the pull request was closed.
2024-04-16 12:10 UTC

@felicia-haggqvist felicia-haggqvist merged commit 5bf7883 into next Apr 16, 2024
3 checks passed
@felicia-haggqvist felicia-haggqvist deleted the feat/control-attention-position branch April 16, 2024 12:10
github-actions bot pushed a commit that referenced this pull request Apr 16, 2024
# [1.5.0-next.1](v1.4.5-next.1...v1.5.0-next.1) (2024-04-16)

### Features

* Add more features on how attention component is positioned ([#215](#215)) ([5bf7883](5bf7883))
github-actions bot pushed a commit that referenced this pull request May 15, 2024
# [1.5.0](v1.4.4...v1.5.0) (2024-05-15)

### Bug Fixes

* Styling fixes for Card component ([#229](#229)) ([a99dc9c](a99dc9c))
* **textfield/textarea:** clean up classes ([#239](#239)) ([4372285](4372285))

### Features

* Add an optional prop to enable nofollow for pagination component ([#231](#231)) ([9534ae3](9534ae3))
* Add more features on how attention component is positioned ([#215](#215)) ([5bf7883](5bf7883))
* add more functionality to attention component ([#233](#233)) ([95c20b3](95c20b3))
* Individual imports ([#212](#212)) ([766282c](766282c))
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