docs(release-highlights): Adds 6.3 highlights.#4682
Conversation
|
|
||
| 1. Hamburger menu (`fa-bars`) | ||
| - **Animation type:** Opt-out. | ||
| - **Animation behavior:** When a hamburger icon receives hover or keyboard focus, the middle bar becomes an arrow, pointing in the direction that the attached menu will move when the icon is clicked. This motion helps better indicate when a menu will open and close. |
There was a problem hiding this comment.
This behavior actually changes slightly for mobile views. I don't know if we want to go into it here or make this more generic so that it covers mobile as well.
There was a problem hiding this comment.
oh good callout! I think it's good to mention when mobile behavior is notably different.
Is there a good place to view the mobile behavior?
From the og issue, it seems like this was the idea, but I'm not able to replicate it on staging sites:
On desktop
- No direction by default (regular 3 bars)
- Show "collapse" arrows on hover/focus
On mobile
- Show "collapse" arrows when expanded
- Show "expand" arrows on hover/focus when collapsed
| - **Animation type:** Opt-out. | ||
| - **Animation behavior:** When a hamburger icon receives hover or keyboard focus, the middle bar becomes an arrow, pointing in the direction that the attached menu will move when the icon is clicked. This motion helps better indicate when a menu will open and close. | ||
| - **Example:** As an opt-out animation, you can see this by default across hamburger menus in our examples and demos. To visualize the motion behavior, interact with the navigation menu in [our page examples](/components/page#vertical-navigation). | ||
| - **Note:** Because the hamburger menu icon for the PatternFly.org navigation has more padding than standard PatternFly buttons, we've opted out of this animation to avoid fit issues. |
There was a problem hiding this comment.
ahh, I was going off of patternfly/patternfly#7151 (comment), which I'm now realizing is a super old comment. But I also don't see the animation in the pf menu on any of the staging sites? Do you know if it's just something yet to be pulled in, vs an intentional leave-off?
|
Hey @edonehoo - This is what we added for ChatBot lately:
|
|
One other thought - we had implemented expand/collapse motion on navigation previously, but in this release we changed the approach so that it's more performant. This is probably worth calling out as at least one consumer saw some lagginess when lots of things were happening on their page. |
…d/release-highlights.md
|
|
||
| #### enable-animations codemods | ||
|
|
||
| We have also created an [enable-animations codemod](https://github.com/patternfly/pf-codemods/tree/main/packages/eslint-plugin-pf-codemods/src/rules/v6/enableAnimations), which adds the `hasAnimations` prop to components that support opt-in animations. |
There was a problem hiding this comment.
We need to be super clear here that using this codemod to enable these particular animations could cause breaking changes. That's why they are created as opt-in - they create breaking changes due to changes in the HTML structure.
Instead of "support opt-in" perhaps it's also clearer to say "require opt-in"
| - **Notes:** | ||
| - This release does not include expansion animations for tree tables. | ||
| - To prevent visual issues with the divider on expanded rows, ensure that both the `<Table>` and the first `Tr` in the `Tbody` contains `isExpanded` logic. | ||
| - To avoid visual issues with animations in compound expandable tables, ensure that the `Tr` which contains `isControlRow` contains `isExpanded` logic. To dynamically render the content, each expandable row content should also be rendered in its own structure. |
There was a problem hiding this comment.
I think what you have here is a great start for all of this. Some comments that would be worth tweaking/adding so consumers are structuring their tables in the way that was originally intended by Core but wasn't done so in React (but is now in expandable-like examples), moreso if they're opting into animations but they should also update their structure regardless (but nothing should break if they don't and aren't opting into animations):
Tablemust haveisExpandablepassed to it (rather thanisExpandedlogic)- The
Tbodythat contains any expandable rows must haveisExpandedlogic - Any
Trwhose purpsoe is to act as a "control row" (for normal expandable tables) or has theisControlRowprop (for compound expansion tables) must haveisExpandedlogic - Any
Trwhose purpose is to expand/collapse (the one that actually contains the expandable content) must haveisExpandablepassed to it, in addition toisExpandedlogic- Additionally, any
Tdwithin these expandableTr's must wrap any content in anExpandableRowContent
- Additionally, any
With a basic example structure being:
<Table isExpandable> // pass hasAnimations if opting into animations, or run codemods rule to auto apply it
...Thead stuff...
<Tbody isExpanded={...logic for checking if expanded}>
<Tr isExpanded={...logic for checking if expanded}> // pass isControlRow for compound expandable implementation as well
..."control row" content
</Tr>
<Tr isExpandable isExpanded={...logic for checking if expanded}>
<Td>
<ExpandableRowContent>
...the actual content to display for the cell
</ExpandableRowContent>
</Td>
</Tr>
</Tbody>
</Table>But this is also a lot of information so let me know what you think.
cc @mcoker did I miss anything/mess anything up in the intended structure here?
thatblindgeye
left a comment
There was a problem hiding this comment.
😮 looks great, thank you for adding the verbiage about all the table stuff! 🪨 ⭐
Co-authored-by: Michael Coker <35148959+mcoker@users.noreply.github.com>
…d/release-highlights.md Co-authored-by: Eric Olkowski <70952936+thatblindgeye@users.noreply.github.com>
|
|
||
| #### enable-animations codemods | ||
|
|
||
| We have also created an [enable-animations codemod](https://github.com/patternfly/pf-codemods/tree/main/packages/eslint-plugin-pf-codemods/src/rules/v6/enableAnimations), which adds the `hasAnimations` prop to components that require opt-in animations. Keep in mind that, depending on your codebase, this codemod could introduce breaking changes that require further attention. |
There was a problem hiding this comment.
| We have also created an [enable-animations codemod](https://github.com/patternfly/pf-codemods/tree/main/packages/eslint-plugin-pf-codemods/src/rules/v6/enableAnimations), which adds the `hasAnimations` prop to components that require opt-in animations. Keep in mind that, depending on your codebase, this codemod could introduce breaking changes that require further attention. | |
| We have also created an [enable-animations codemod](https://github.com/patternfly/pf-codemods/tree/main/packages/eslint-plugin-pf-codemods/src/rules/v6/enableAnimations), which adds the `hasAnimations` prop to components that require opt-in animations. Keep in mind that, depending on your codebase, this codemod could introduce breaking changes that require further attention. Due to this, when running the codemod you will be asked whether you want to include the Table components for the animations opt-in, or just opt into animations for the react-core package. |
Since the codemod will now offer a CLI option to include the react-table package as part of the animations optin, wdyt about this tweak?
* docs(release-highlights): Adds 6.3 highlights. * Small link change * And small wording change. * Edits to animation details and addition of PF AI section. * Update packages/documentation-site/patternfly-docs/content/get-started/release-highlights.md * Add mention of codemods * Package link updates and animation phrasing tweaks. * Update enable animations codemod info * Update packages/documentation-site/patternfly-docs/content/get-started/release-highlights.md Co-authored-by: Michael Coker <35148959+mcoker@users.noreply.github.com> * Adds more details per reviews * Adds more codemod instruction per request. * Add more around codemod. * update details about expandable table animations. * Tabbing for code block Co-authored-by: Michael Coker <35148959+mcoker@users.noreply.github.com> * Update packages/documentation-site/patternfly-docs/content/get-started/release-highlights.md Co-authored-by: Eric Olkowski <70952936+thatblindgeye@users.noreply.github.com> * Small edits for table * Make note of potential memory issues re spinners. * Update animations memory issue note * Update animations note per Jenny's suggestion * Update animations codemod note --------- Co-authored-by: Michael Coker <35148959+mcoker@users.noreply.github.com> Co-authored-by: Eric Olkowski <70952936+thatblindgeye@users.noreply.github.com>
Closes #4637