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

Tabs: fix animation timings #66198

Merged
merged 3 commits into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ function CategoryTabs( {

return (
<Tabs
className="block-editor-inserter__category-tabs"
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I should have mentioned — applying a className to Tabs doesn't make any sense because Tabs doesn't render any element to the DOM (and doesn't accept a className prop at all)

selectOnMove={ false }
selectedTabId={ selectedCategory ? selectedCategory.name : null }
orientation="vertical"
Expand Down
4 changes: 4 additions & 0 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

### Bug Fixes

- `Tabs`: fix indicator animation ([#66198](https://github.com/WordPress/gutenberg/pull/66198)).

## 28.10.0 (2024-10-16)

### Bug Fixes
Expand Down
4 changes: 2 additions & 2 deletions packages/components/src/tabs/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ export const Tab = styled( Ariakit.Tab )`
opacity: 0;

@media not ( prefers-reduced-motion ) {
transition: opacity 0.15s 0.15s linear;
transition: opacity 0.1s linear;
}
}

Expand Down Expand Up @@ -253,7 +253,7 @@ export const TabChevron = styled( Icon )`
[data-select-on-move='true']
[role='tab']:is( [aria-selected='true'], )
& {
transition: opacity 0.3s ease-in;
transition: opacity 0.15s 0.15s linear;
}
}
&:dir( rtl ) {
Expand Down
Loading