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

Clean up Tabs animation logic #65878

Merged
merged 8 commits into from
Oct 4, 2024
Merged

Conversation

DaniGuardiola
Copy link
Contributor

@DaniGuardiola DaniGuardiola commented Oct 4, 2024

Follow-up to #65808

What?

Moved the useAnimatedOffsetRect to the utils dir which is now used from Tabs. Also, cleaned up tabs a bit and extracted the scroll logic into a hook (inlined in the file).

This will also fix some issues in the indicator animation that make it skip around in some cases.

Testing Instructions

Try the Tabs stories in Storybook, and tabs instances in WP.

@DaniGuardiola DaniGuardiola self-assigned this Oct 4, 2024
@DaniGuardiola DaniGuardiola added [Package] Components /packages/components [Type] Code Quality Issues or PRs that relate to code quality labels Oct 4, 2024
@DaniGuardiola DaniGuardiola marked this pull request as ready for review October 4, 2024 13:02
Copy link

github-actions bot commented Oct 4, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: DaniGuardiola <daniguardiola@git.wordpress.org>
Co-authored-by: ciampo <mciampini@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@ciampo ciampo added the Backport to Gutenberg RC Pull request that needs to be backported to a Gutenberg release candidate (RC) label Oct 4, 2024
Copy link
Contributor

@ciampo ciampo left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

  • ✅ Code changes look good
  • ✅ Tests well in Storybook
  • ✅ No regressions in the editor

@ciampo ciampo enabled auto-merge (squash) October 4, 2024 13:34
Copy link

github-actions bot commented Oct 4, 2024

Flaky tests detected in 143bc3d.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/11180870751
📝 Reported issues:

@ciampo ciampo merged commit 570a81d into trunk Oct 4, 2024
63 checks passed
@ciampo ciampo deleted the improve/clean-up-tabs-animation-logic branch October 4, 2024 14:07
@github-actions github-actions bot added this to the Gutenberg 19.5 milestone Oct 4, 2024
@cbravobernal
Copy link
Contributor

I just cherry-picked this PR to the release/19.4 branch to get it included in the next release: a1b696d

cbravobernal pushed a commit that referenced this pull request Oct 7, 2024
* Clean up and misc improvements.

* Move utility from ToggleGroupControl to utils.

* Clean up Tabs.Tablist

* Clean up ToggleGroupControl and update utility from latest trunk version

* Clean up scroll utility

* Remove unnecessary null.

* CHANGELOG

---------

Co-authored-by: DaniGuardiola <daniguardiola@git.wordpress.org>
Co-authored-by: ciampo <mciampini@git.wordpress.org>
@cbravobernal cbravobernal removed the Backport to Gutenberg RC Pull request that needs to be backported to a Gutenberg release candidate (RC) label Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Components /packages/components [Type] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants