[PF-2145] Migrate Backdrop, Fade, Slide to tailwind - #5079
Conversation
🦋 Changeset detectedLatest commit: 5b11d04 The changes in this PR will be included in the next version bump. This PR includes changesets to release 82 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
📖 Storybook Preview 🚀 Your Storybook preview is ready: View Storybook 📍 Preview URL: This preview is updated automatically when you push changes to this PR. |
1 similar comment
|
📖 Storybook Preview 🚀 Your Storybook preview is ready: View Storybook 📍 Preview URL: This preview is updated automatically when you push changes to this PR. |
31c0fa7 to
5b11d04
Compare
|
📖 Storybook Preview 🚀 Your Storybook preview is ready: View Storybook 📍 Preview URL: This preview is updated automatically when you push changes to this PR. |
051f797
into
feature/pf-2262-lift-the-react-19-peer-dep
|
🗑️ Storybook preview cleaned up The preview deployment has been automatically removed since this PR was closed. |
* [PF-2145] Migrate Backdrop, Fade, Slide to tailwind * [PF-2145] Tweak children ref type
* [PF-2145] Migrate Backdrop, Fade, Slide to tailwind * [PF-2145] Tweak children ref type
* [PF-2145] Migrate Backdrop, Fade, Slide to tailwind * [PF-2145] Tweak children ref type
PF-2145
Description
Removes
react-transition-groupfromFade,SlideandBackdrop, replacing it with Tailwind class-driven transitions.useTransitionStatus+getTransitionTimeouts: a timer-driven replacement for rtg's<Transition>state machine. It settles onsetTimeout(timeout)exactly as rtg does when noaddEndListeneris given, so callback timing is identical and fake timers still drive it in jsdom. Supports the full lifecycle (onEnter/onEntering/onEntered/onExit/onExiting/onExited,appear,unmountOnExit) soCollapsecan reuse it later. Also addsgetElementRef, which types theReactElement.reflookup in one place and replaces the@ts-expect-errorsuppressions inFade/Slide.opacity-0/translate-*/invisibleclasses instead of inlinevisibility/opacity/transformstyles, merged viatwMerge. Public props, thedirectionmapping and callback timing are unchanged. Fixes the object form oftimeout({ enter, exit }), which previously produced an invalid inline[object Object]msduration.Fade), so rtg leaves its dependency tree. Also merges the consumerclassNameviatwMergeso consumer utilities win on conflicts, and drops a redundantbg-blackplus a dead-webkit-tap-highlight-color-transparentclass (no visual change).react-transition-groupdependency it never imported.react-transition-groupstays in the workspace viaCollapse(out of scope for this story) and transitively viarecharts → react-smooth.How to test
directionvalues.pnpm test:unit -- packages/base/Fade packages/base/Slide packages/base/Backdrop packages/base/UtilsScreenshots
No visual change — transitions are visually identical, only the mechanism changed. These stories run with
takeScreenshot: false, so there is no Happo coverage to diff.Development checks
picasso-tailwind-mergerequires major update (check itsREADME.md)propsin component with documentationexamplesfor componentBreaking change — N/A