Skip to content

Clean up Tabs animation logic - #65878

Merged
ciampo merged 8 commits into
trunkfrom
improve/clean-up-tabs-animation-logic
Oct 4, 2024
Merged

ciampo merged 8 commits into
trunkfrom
improve/clean-up-tabs-animation-logic

Conversation

@DaniGuardiola

@DaniGuardiola DaniGuardiola commented Oct 4, 2024 •

Copy link
Copy Markdown
Member

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
@github-actions

github-actions Bot commented Oct 4, 2024 •

Copy link
Copy Markdown

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

@ciampo ciampo left a comment

Copy link
Copy Markdown
Contributor

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
@github-actions

github-actions Bot commented Oct 4, 2024

Copy link
Copy Markdown

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
@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
Copy Markdown
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
karthick-murugan pushed a commit to karthick-murugan/gutenberg that referenced this pull request Nov 13, 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>
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