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

[material-ui][Backdrop] Deprecate TransitionComponent #40677

Merged
merged 27 commits into from
Mar 20, 2024

Conversation

harry-whorlow
Copy link
Contributor

@harry-whorlow harry-whorlow commented Jan 18, 2024

Part of: #40417

@DiegoAndai here's my submission for the backdrop component update, please let me know if it's correct. I did ask for clarification on the original post, but I didn't get a response. Enjoy the rest of this fine Thursday!

Changes made to backdrop component
backdrop: Add deprecations for transition props and the slots API that should replace it.

Questions for reviewers
I see that the transition slot in other components has "transition props" under the prop "slotProps" is this required for this component? as the original code did not have this provided.

@mui-bot
Copy link

mui-bot commented Jan 18, 2024

@DiegoAndai DiegoAndai self-requested a review January 18, 2024 14:55
@zannager zannager added package: material-ui Specific to @mui/material component: backdrop This is the name of the generic UI component, not the React module! labels Jan 18, 2024
Copy link
Member

@DiegoAndai DiegoAndai left a comment

Choose a reason for hiding this comment

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

Hey @harry-whorlow, thanks for working on this!

Here's my review so we can keep working on this.

packages/mui-material/src/Backdrop/Backdrop.d.ts Outdated Show resolved Hide resolved
packages/mui-material/src/Backdrop/Backdrop.d.ts Outdated Show resolved Hide resolved
packages/mui-material/src/Backdrop/Backdrop.js Outdated Show resolved Hide resolved
docs/pages/material-ui/api/backdrop.json Outdated Show resolved Hide resolved
@DiegoAndai DiegoAndai added the deprecation New deprecation message label Jan 19, 2024
@DiegoAndai DiegoAndai changed the title Deprecate *Props props and classes for v6 [material-ui][Backdrop] Deprecate TransitionComponent Jan 19, 2024
@harry-whorlow
Copy link
Contributor Author

@DiegoAndai Thanks for the opportunity to contribute, and thanks for taking the time to review my code.

Sorry about the docs.... I had read it, but completely forgot.🙃

I hope you'll see I've made the requested changed, I've checked and double checked, but please let me know if I missed anything.

Copy link
Member

@DiegoAndai DiegoAndai left a comment

Choose a reason for hiding this comment

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

Hey @harry-whorlow, I left a couple comments so we can keep working on this PR 😊

Besides the comments:

packages/mui-material/src/Backdrop/Backdrop.d.ts Outdated Show resolved Hide resolved
@harry-whorlow harry-whorlow force-pushed the depricate-v6-class-backdrop branch from b9a86e6 to e0d3417 Compare January 23, 2024 14:46
@harry-whorlow
Copy link
Contributor Author

Hi @DiegoAndai thanks again for the code review, as always its appreciated. 🤟

I've made the changes you requested. I'm a little unsure on the tests, so if you could just have a quick look that would be awesome.

@harry-whorlow
Copy link
Contributor Author

harry-whorlow commented Jan 24, 2024

Afternoon @DiegoAndai!
Thanks for the code review! 🤟(as always)

Please find the amended code pushed. A quick point of note, running the tests throws an error, as the describeConformance prop "testLegacyComponentsProp" throws.
After looking at it, I came to the assumption it wasn't required as it tests for props that we just depreciated. Is this correct? I noticed in your example and the other CR's that the prop isn't present.

The failing test:
Screenshot 2024-01-24 at 16 33 48


On a side note, I just wanted to say thanks for all the pointers along the way. It's probably frustrating having to make all these comments, so thanks for the time, the effort is appreciated! The next component will be a lot smoother. 🫡

@harry-whorlow harry-whorlow marked this pull request as draft February 5, 2024 15:22
@harry-whorlow
Copy link
Contributor Author

Good afternoon @DiegoAndai, I hope you had a good start to the week!

Please find my attempt at the codemod pushed! I haven’t had much experience with code mods before, and given theres only one example up, I hope its okay... I tried my best.

Let me know if theres any amendments you need made, hope the rest of the week goes well!

Copy link
Member

@DiegoAndai DiegoAndai left a comment

Choose a reason for hiding this comment

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

Hey @harry-whorlow, sorry for the delay, I was waiting for the migration guide PR to get merged.

I left some guidance on the codemod, let me know if it works. You can also follow the recently added codemods contributing guide. That code is a little tricky, if you're stuck let me know and I can review it in more detail.

Now we can also add this deprecation to the migration guide with the corresponding links, you can follow what was done for the accordion in #40767 for guidance.

On a side note, I just wanted to say thanks for all the pointers along the way. It's probably frustrating having to make all these comments, so thanks for the time, the effort is appreciated! The next component will be a lot smoother. 🫡

It's my pleasure, thanks to you for contributing 🚀 hopefully we can get this one merged soon 😊

@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Feb 7, 2024
Comment on lines 19 to 23
root: {
expectedClassName: classes.root,
},
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@DiegoAndai was this correct? I was unsure it was required and given that the other example didn't have it I removed it and the tests passed.

Screenshot 2024-02-07 at 17 01 40

@harry-whorlow harry-whorlow force-pushed the depricate-v6-class-backdrop branch from b7d740d to 6f8ff5c Compare February 12, 2024 07:56
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Feb 12, 2024
@harry-whorlow
Copy link
Contributor Author

@DiegoAndai Good morning man!

Hope your having a good start to the week! Please find the updated code so that it's synced with master.
I pulled re-based, hence why all the commits of the previous merges are at the bottom of the stack again.

Have a good start to the week! looking forward to hearing what you have to say.

Copy link
Member

@DiegoAndai DiegoAndai left a comment

Choose a reason for hiding this comment

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

Hey @harry-whorlow, getting closer!

@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Feb 15, 2024
@harry-whorlow harry-whorlow force-pushed the depricate-v6-class-backdrop branch from b59e68b to 3d2840b Compare February 16, 2024 15:02
@harry-whorlow harry-whorlow force-pushed the depricate-v6-class-backdrop branch from cd51367 to c10f61c Compare March 8, 2024 12:30
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Mar 8, 2024
@DiegoAndai
Copy link
Member

Hey @harry-whorlow, great work! This is ready to merge 🎉.

Next week, we'll freeze v5 and open the next branch to release v6 alpha versions. Would you mind waiting until then to merge this? This way, we'll avoid fixing any error in v5 that may have slipped. This is to be extra careful as we'll try not to release any v5 patches after it's frozen. Does that make sense?

If you're on board, I'll ask you to wait a bit longer, and when the next branch is created next week, point this PR to that branch instead. I'll let you know.

@harry-whorlow harry-whorlow marked this pull request as ready for review March 12, 2024 19:54
@harry-whorlow
Copy link
Contributor Author

@DiegoAndai dude you've got to hit me with the "LGTM 🚀". 😂

On a more serious note... I'm happy to wait till next week, I get the versioning concerns, and I'd hate to be the reason for screwing it up. When about's next week are you branching? or has this not been decided yet.

To finish up, thanks for all the help along the way, it's been super cool working in this code base! It's really appreciated, and It's opened my eyes to a lot of stuff that I wouldn’t of came across otherwise. And thanks to @sai6855 too!

If it's cool with you I'll carry on with speed dial, I hope I'm a bit more independent this time round. 🤟

@DiegoAndai
Copy link
Member

@harry-whorlow, we're close, I promise 😂

Thanks for your patience and continued working on this through the various revisions. I expect the next branch to be created on Tuesday or Wednesday of next week, and then we can point this PR to it. I'm happy it has been enjoyable and fruitful for you as well.

Feel free to carry on with the speed dial 🙌🏼 for that one, let's not create the PR yet. We should create it directly to the next branch to avoid creating it pointing to master and then having to change it a few days later.

@harry-whorlow
Copy link
Contributor Author

harry-whorlow commented Mar 13, 2024

@DiegoAndai, Thats cool! hit me up when the branch is live. Looking forward to merging it!

The speed dial is something I already started, here, but I think it fell through the gaps. Plus, I know it needs rebasing and updating with things like code mods and that... So I wouldn’t worry about code reviewing, but as you said need to change where it's pointing to.

Either way, enjoy the rest of you day!

@DiegoAndai DiegoAndai changed the base branch from master to next March 19, 2024 15:16
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Mar 19, 2024
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Mar 19, 2024
@DiegoAndai
Copy link
Member

DiegoAndai commented Mar 19, 2024

Hey @harry-whorlow! I pointed the PR to the next branch and resolved merge conflicts. You'll have to pull these changes.

May I ask you to add the Backdrop section to the migration guide, we should follow the current format: https://github.com/mui/material-ui/blob/next/docs/data/material/migration/migrating-from-deprecated-apis/migrating-from-deprecated-apis.md

@harry-whorlow harry-whorlow force-pushed the depricate-v6-class-backdrop branch from 0e1dbcf to 8766587 Compare March 19, 2024 16:05
@harry-whorlow
Copy link
Contributor Author

@DiegoAndai like so? 🤟

@harry-whorlow harry-whorlow force-pushed the depricate-v6-class-backdrop branch from 8766587 to 96a3c94 Compare March 19, 2024 16:11
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Mar 20, 2024
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Mar 20, 2024
@DiegoAndai
Copy link
Member

@DiegoAndai like so? 🤟

Yes 👌🏼

I pushed some fixes, I'm doing the some final testing 👍🏼

@DiegoAndai DiegoAndai force-pushed the depricate-v6-class-backdrop branch from e960418 to 556158c Compare March 20, 2024 15:54
@harry-whorlow
Copy link
Contributor Author

Ah... you beat me to the capitalisation. The fastest hands in the west

Copy link
Member

@DiegoAndai DiegoAndai left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

Good job @harry-whorlow! I appreciate your drive to keep working on this through multiple revisions. I hope you're motivated to keep contributing. Congrats 🎉

@DiegoAndai DiegoAndai merged commit fe11e80 into mui:next Mar 20, 2024
22 checks passed
@harry-whorlow
Copy link
Contributor Author

@DiegoAndai, thank you for all the help along the way! you've been excellent.

I'll see you over in speedDial in the coming week! 🚀

pluvio72 pushed a commit to pluvio72/material-ui that referenced this pull request Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: backdrop This is the name of the generic UI component, not the React module! deprecation New deprecation message package: material-ui Specific to @mui/material
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants