Skip to content

Fix broken Storybook story for useAnchoredPosition #1543

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

Merged
merged 2 commits into from
Oct 26, 2021

Conversation

rezrah
Copy link
Contributor

@rezrah rezrah commented Oct 26, 2021

Fixes a broken Story for useAnchoredPosition that was preventing access its Controls and component preview.

The issue was caused by the Controls triggering excessive, sequential state updates in the useAnchoredPosition hook.

This PR restores access to the story by explicitly declaring only the control arguments that are required in the hooks dependency array.

Changes

  • Restored useAnchoredPosition hook story
  • Updated Storybook addons to their latest patch versions for consistency and compatibility

Screenshots

Before:
Screenshot 2021-10-26 at 14 09 58

After:
Screenshot 2021-10-26 at 16 03 22

Merge checklist

  • Added/updated tests
  • Added/updated documentation
  • Tested in Chrome
  • Tested in Firefox
  • Tested in Safari
  • Tested in Edge

Take a look at the What we look for in reviews section of the contributing guidelines for more information on how we review PRs.

@rezrah rezrah requested review from a team and jfuchs October 26, 2021 15:06
@changeset-bot
Copy link

changeset-bot bot commented Oct 26, 2021

⚠️ No Changeset found

Latest commit: 19c521c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions
Copy link
Contributor

size-limit report 📦

Path Size
dist/browser.esm.js 53.92 KB (0%)
dist/browser.umd.js 54.3 KB (0%)

Copy link
Member

@siddharthkp siddharthkp left a comment

Choose a reason for hiding this comment

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

Looks solid! 👍

Copy link
Contributor

@colebemis colebemis left a comment

Choose a reason for hiding this comment

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

Nice fix 💖

@rezrah rezrah added the skip changeset This change does not need a changelog label Oct 26, 2021
@rezrah rezrah merged commit 47a71b8 into main Oct 26, 2021
@rezrah rezrah deleted the bugfix/fix-broken-useanchoredposition-story branch October 26, 2021 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip changeset This change does not need a changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants