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][SpeedDialAction] Add slots, slotProps and deprecate tooltip* props, FabProps #45065

Merged
merged 34 commits into from
Feb 7, 2025

Conversation

sai6855
Copy link
Contributor

@sai6855 sai6855 commented Jan 20, 2025

part of #41281

This PR adds fab, tooltip, staticTooltip, staticTooltipLabel slots, and deprecates tooltip* props and FabProps

@sai6855 sai6855 changed the title Spped-dial-slots [material-ui][SpeedDialAction] Add slots and slotProps Jan 20, 2025
@sai6855 sai6855 added component: speed dial This is the name of the generic UI component, not the React module! package: material-ui Specific to @mui/material labels Jan 20, 2025
@mui-bot
Copy link

mui-bot commented Jan 20, 2025

Netlify deploy preview

SpeedDialAction: parsed: +1.01% , gzip: +0.82%
@material-ui/lab: parsed: +0.46% , gzip: +0.43%
@material-ui/core: parsed: +0.13% , gzip: +0.11%

Bundle size report

Details of bundle changes (Toolpad)
Details of bundle changes

Generated by 🚫 dangerJS against 135ae2b

@sai6855

This comment was marked as outdated.

@sai6855 sai6855 requested a review from siriwatknp January 20, 2025 11:55
@sai6855
Copy link
Contributor Author

sai6855 commented Jan 21, 2025

@siriwatknp PR is ready for review

expectedClassName: classes.fab,
testWithElement: null,
testWithComponent: CustomButton,
},
Copy link
Member

@siriwatknp siriwatknp Jan 23, 2025

Choose a reason for hiding this comment

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

Other slots are missing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added tooltip slot, but for other slots to render tooltipOpen should be true, since SpeedDialAction describeConference doesn't support both, I've written tests for other slots seperatly here

/~https://github.com/mui/material-ui/pull/45065/files#diff-f29e1664b4ccb64dad9d20650cf010182a6e9e7fd3d95e98bd181bc123bc37d6R149

@siriwatknp
Copy link
Member

I'll deprecate tooltip* props in seperate PR

If you don't mind, can you do it directly in this PR?

@@ -3,50 +3,81 @@ import findComponentDefaultProps from '../../util/findComponentDefaultProps';
import assignObject from '../../util/assignObject';
import appendAttribute from '../../util/appendAttribute';

function moveJsxPropIntoSlotProps(j, element, propName, slotName) {
function moveJsxPropIntoSlotProps(j, element, propName, slotName, slotPropName) {
Copy link
Contributor Author

@sai6855 sai6855 Jan 29, 2025

Choose a reason for hiding this comment

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

Current version of moveJsxPropIntoSlotProps doesn't support moving a prop under specific key inside slotProps.

For example current version doesn't support below transformation

From

<SpeedDialAction tooltipPlacement='top'/>

To

<SpeedDialAction slotProps={{tooltip:{placement:"top"}}}/>

So i've made changes in this file to support this

@sai6855 sai6855 marked this pull request as draft January 29, 2025 14:45
@sai6855 sai6855 marked this pull request as ready for review January 29, 2025 17:45
@sai6855
Copy link
Contributor Author

sai6855 commented Jan 29, 2025

I'll deprecate tooltip* props in seperate PR

If you don't mind, can you do it directly in this PR?

Done, This PR is ready for review

@sai6855 sai6855 requested a review from siriwatknp January 29, 2025 18:08
Copy link
Member

@siriwatknp siriwatknp left a comment

Choose a reason for hiding this comment

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

Nice job. Left some comments.

@sai6855 sai6855 requested a review from siriwatknp January 31, 2025 13:54
@sai6855
Copy link
Contributor Author

sai6855 commented Feb 5, 2025

ping @siriwatknp

Copy link
Member

@siriwatknp siriwatknp left a comment

Choose a reason for hiding this comment

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

Nice job.

@sai6855 sai6855 merged commit f8319d1 into mui:master Feb 7, 2025
22 checks passed
@sai6855 sai6855 changed the title [material-ui][SpeedDialAction] Add slots and slotProps [material-ui][SpeedDialAction] Add slots, slotProps and deprecate tooltip* props, FabProps Feb 7, 2025
siriwatknp pushed a commit to siriwatknp/material-ui that referenced this pull request Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: speed dial This is the name of the generic UI component, not the React module! package: material-ui Specific to @mui/material
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants