Skip to content

Conversation

@rithik56
Copy link
Contributor

@rithik56 rithik56 commented Nov 8, 2025

Summary

This PR fixes an incorrect slot name in the mui-codemod transformer for Tabs props.

In tab-props.js, the codemod currently moves TabScrollButtonProps into a slot named scrollButton (singular).
However, according to the Tabs API, the correct slot is scrollButtons (plural).

@mui-bot
Copy link

mui-bot commented Nov 8, 2025

Netlify deploy preview

Bundle size report

Bundle Parsed size Gzip size
@mui/material 🔺+1B(0.00%) 0B(0.00%)
@mui/lab 0B(0.00%) 0B(0.00%)
@mui/system 0B(0.00%) 0B(0.00%)
@mui/utils 0B(0.00%) 0B(0.00%)

Details of bundle changes

Generated by 🚫 dangerJS against 2deda0a

@rithik56
Copy link
Contributor Author

rithik56 commented Nov 8, 2025

@ZeeshanTamboli @sai6855 Please check this PR.

@rithik56
Copy link
Contributor Author

rithik56 commented Nov 8, 2025

@siriwatknp I am confused. Should it be scrollButton or scrollButtons. In MUI Docs, it is scrollButtons but ideally it should be scrollButton

@mj12albert
Copy link
Member

@siriwatknp I am confused. Should it be scrollButton or scrollButtons. In MUI Docs, it is scrollButtons but ideally it should be scrollButton

In the code it's plural: https://github.com/mui/material-ui/blob/master/packages/mui-material/src/Tabs/Tabs.js#L575C63-L575C76

@rithik56
Copy link
Contributor Author

@ZeeshanTamboli I tried pushing the empty commit but the CI is not getting triggered

@ZeeshanTamboli
Copy link
Member

ZeeshanTamboli commented Nov 11, 2025

@siriwatknp There's a lot of inconsistency here.

@ZeeshanTamboli
Copy link
Member

@siriwatknp Any reponse on this?

@siriwatknp
Copy link
Member

In the TS type, it is scrollButton slot (singular)

It's plural, please check again -> https://github.com/mui/material-ui/blob/master/packages/mui-material/src/Tabs/Tabs.d.ts#L101

But in the externalForwardedProps it is scrollButton (singular)

I think this is a bug, it should be plural (same as defined useSlot)

And in the migration docs it is scrollButton (singular)

Looks wrong to me, should be plural too.

@siriwatknp
Copy link
Member

@ZeeshanTamboli can you do the fixes, it can be in this PR (please also add a test for the scrollButtons slot to ensure that slotProps.scrollButtons pass through).

@ZeeshanTamboli
Copy link
Member

ZeeshanTamboli commented Dec 13, 2025

@siriwatknp Done with the changes. As for the tests, they were already present.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: codemod Specific to codemod.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants