fix(table): animate expandable#7497
Merged
mcoker merged 3 commits intopatternfly:mainfrom May 7, 2025
Merged
Conversation
Collaborator
|
Preview: https://patternfly-pr-7497.surge.sh A11y report: https://patternfly-pr-7497-a11y.surge.sh |
sg00dwin
reviewed
May 2, 2025
| --#{$table}__action--PaddingInlineEnd: var(--pf-t--global--spacer--sm); | ||
|
|
||
| // * Table expandable row | ||
| --#{$table}__expandable-row--TransitionDuration--display: var(--#{$table}__expandable-row--TransitionDuration--fade); |
Contributor
There was a problem hiding this comment.
I'm not seeing where this is used.
Contributor
Author
There was a problem hiding this comment.
Thanks! I realized I didn't need that and forgot to delete.
sg00dwin
reviewed
May 2, 2025
| --#{$table}__expandable-row--TransitionDuration--slide: var(--#{$table}__expandable-row--TransitionDuration--expand--slide); | ||
| --#{$table}__expandable-row--TransitionDuration--fade: var(--#{$table}__expandable-row--TransitionDuration--expand--fade); | ||
| --#{$table}__expandable-row--TransitionTimingFunction: var(--pf-t--global--motion--timing-function--default); | ||
| --#{$table}__expandable-row--TransitionDelay: 0; |
Contributor
There was a problem hiding this comment.
Is a delay needed for this animation?
Contributor
Author
There was a problem hiding this comment.
Same here - forgot to delete.
Collaborator
|
🎉 This PR is included in version 6.3.0-prerelease.15 🎉 The release is available on: Your semantic-release bot 📦🚀 |
mcoker
added a commit
to mcoker/patternfly
that referenced
this pull request
Jul 16, 2025
This reverts commit cf30724.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes #7363
Link - https://patternfly-pr-7497.surge.sh/components/table#expandable
To trigger the animation, in dev tools find a
<tr class="pf-m-expanded pf-v6-c-table__expandable-row pf-v6-c-table__tr">, click on the ".cls" button in the top/right of dev tools (near the ":hov" hover/focus button) and toggle the.pf-m-expandedclass. Here's a screenshot:One note about this animation is, without some changes, on collapse the slide/fade runs and then the empty space collapses. I had mentioned that I expected the empty space to collapse immediately as the animation ran but I was mistaken - it collapses after the animation runs. WDYT @andrew-ronaldson @lboehling? I can update this and the other animations to collapse immediately if we prefer that interaction.
Currently table is different than some of the others because it uses
display: noneto hide the expandable content. As we discussed, we're OK with allowingtransition-behavior: allow-discretefor that as a progressive enhancement (browser support here - https://caniuse.com/?search=allow-discrete). However, if we just go with that, then we'll also need to use@starting-stylefor the expand transition to work.@starting-stylealso doesn't have full browser support, either. Here's a TL;DR on where that stands with our official support. I'm only going to call out FF and Safari as they're the ones lagging with support for these two properties.@starting-styleonly works on Safari starting v17.5. Works fine in FF.transition-behavior: allow-discreteonly works on Safari starting v18, and doesn't work at all in FF.So what does that mean?
@starting-stylebut no support forallow-discrete). Collapse animation will not work in FF.I mention this because I believe I overheard that we would use
allow-discreteand for anyone that uses a browser that doesn't support it, they would get the expand animation but not the collapse animation, and I wanted to call out that if you're below Safari v17.5, you won't get either.If that's OK then 🚀. If not, we can work around it, we'll probably just need to add a new class or two and react will need an update, too.