Skip to content

[v4] Switch react-transition-group versions #1759

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

Merged
merged 2 commits into from
Jul 9, 2019
Merged

Conversation

AndrewMusgrave
Copy link
Member

@AndrewMusgrave AndrewMusgrave commented Jul 2, 2019

WHY are these changes introduced?

Some of our dependencies use findDOMNode which is a strict mode nono 😭

  • enzyme uses findDOMNode
  • original react-transition-group uses findDOMNode

WHAT is this pull request doing?

  • remove strict mode from our legacy tests
  • remove strict mode test
  • use a forked version of react-transition-group that removes findDOMNode
  • add some refs

How to 🎩

Check out animations in the deployment (Frame, Toast, Modal, Dialog, ReosurceList, and Sheet)

Notes

@BPScott BPScott temporarily deployed to polaris-react-pr-1759 July 2, 2019 14:18 Inactive
@BPScott BPScott temporarily deployed to polaris-react-pr-1759 July 2, 2019 14:21 Inactive
@AndrewMusgrave AndrewMusgrave changed the base branch from version-4.0.0 to rm-css-transition-pool July 2, 2019 14:25
@BPScott BPScott temporarily deployed to polaris-react-pr-1759 July 2, 2019 14:26 Inactive
@BPScott BPScott temporarily deployed to polaris-react-pr-1759 July 2, 2019 14:26 Inactive
@AndrewMusgrave AndrewMusgrave changed the base branch from rm-css-transition-pool to version-4.0.0 July 2, 2019 14:49
@AndrewMusgrave AndrewMusgrave added the 🤖Skip Changelog Causes CI to ignore changelog update check. label Jul 2, 2019
@BPScott BPScott temporarily deployed to polaris-react-pr-1759 July 2, 2019 14:55 Inactive
@BPScott BPScott temporarily deployed to polaris-react-pr-1759 July 8, 2019 19:45 Inactive
@AndrewMusgrave AndrewMusgrave marked this pull request as ready for review July 8, 2019 19:51
@AndrewMusgrave AndrewMusgrave requested a review from dleroux July 8, 2019 19:56
@@ -0,0 +1,21 @@
declare module '@material-ui/react-transition-group' {
Copy link
Contributor

@dleroux dleroux Jul 9, 2019

Choose a reason for hiding this comment

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

Why did we need to declare this module? Is it because the fork didn't include the types?

Copy link
Member Author

Choose a reason for hiding this comment

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

Every package we consume needs types, however, most don't include them in the package. Polaris does include types, which is why we don't have a @types/shopify__polaris-react. react-transition-group does have a types package, which we're still consuming and I'm using to create type definitions for @material-ui/react-transition-group which doesn't have a @types package

@@ -124,6 +124,10 @@ $bulk-actions-offset-slide-in-start: rem(-40px);
}
}

.CheckableContainer {
flex: 1 1 0;
Copy link
Contributor

@dleroux dleroux Jul 9, 2019

Choose a reason for hiding this comment

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

Why was this needed? I see.

@@ -151,15 +151,13 @@ export function polarisContextReactWrapper<P, S>(
}

return (
<React.StrictMode>
Copy link
Contributor

Choose a reason for hiding this comment

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

Why did you remove Strictmode, wasn't this the reason for this PR?

Copy link
Member Author

Choose a reason for hiding this comment

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

Enzyme still uses it 😢 Although @shopify/react-testing and storybook don't 😄

Copy link
Contributor

@dleroux dleroux left a comment

Choose a reason for hiding this comment

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

Once again, great job 🎉

One thing I noticed while top hatting:

Screen Shot 2019-07-09 at 9 20 33 AM

This also exists on the main V4 branch. So I'll open an issue but just wanted to flag it to you.

@BPScott BPScott requested a deployment to polaris-react-pr-1759 July 9, 2019 15:23 Abandoned
@AndrewMusgrave AndrewMusgrave merged commit 57dc2dc into version-4.0.0 Jul 9, 2019
@AndrewMusgrave AndrewMusgrave deleted the mui-rtg branch July 9, 2019 15:31
@AndrewMusgrave AndrewMusgrave temporarily deployed to alpha July 9, 2019 21:32 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖Skip Changelog Causes CI to ignore changelog update check.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants