Skip to content

[base-ui] Update props using Array to ReadonlyArray type#40754

Merged
ZeeshanTamboli merged 5 commits intomui:masterfrom
RaghavenderSingh:master
Feb 7, 2024
Merged

[base-ui] Update props using Array to ReadonlyArray type#40754
ZeeshanTamboli merged 5 commits intomui:masterfrom
RaghavenderSingh:master

Conversation

@RaghavenderSingh
Copy link
Contributor

@RaghavenderSingh RaghavenderSingh commented Jan 23, 2024

I have followed (at least) the PR section of the contributing guide.

Replaced Array API with ReadonlyArray
Closes #40750

@mui-bot
Copy link

mui-bot commented Jan 23, 2024

Netlify deploy preview

https://deploy-preview-40754--material-ui.netlify.app/

Bundle size report

No bundle size changes (Toolpad)
No bundle size changes

Generated by 🚫 dangerJS against 94e86ae

@zannager zannager requested a review from DiegoAndai January 23, 2024 13:57
@danilo-leal danilo-leal added the package: @mui/base Specific to @mui/base (legacy). label Jan 23, 2024
@danilo-leal danilo-leal changed the title fix for API use Array while using ReadonlyArray would be better [base-ui] Change APIs using Array to ReadonlyArray Jan 23, 2024
@DiegoAndai
Copy link
Member

Hey @RaghavenderSingh, thanks for working on this 😊. Before reviewing, please fix the failing build checks.

@RaghavenderSingh
Copy link
Contributor Author

Hey @RaghavenderSingh, thanks for working on this 😊. Before reviewing, please fix the failing build checks.

Yea sure will fix the failing build checks.

@ZeeshanTamboli
Copy link
Member

Since this PR predates a similar one (#40760) created to address the same issue (#40750), perhaps we should prioritize reviewing this one instead.

Copy link
Member

@michaldudak michaldudak left a comment

Choose a reason for hiding this comment

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

There are couple more occurrences of a mutable arrays in Base UI that could be changed to ReadonlyArray. Search for [] in ./packages/mui-base/**/*.types.ts

@ZeeshanTamboli ZeeshanTamboli added the type: enhancement It’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature. label Feb 5, 2024
@ZeeshanTamboli ZeeshanTamboli changed the title [base-ui] Change APIs using Array to ReadonlyArray [base-ui] Update APIs using Array to ReadonlyArray Feb 5, 2024
@ZeeshanTamboli
Copy link
Member

@michaldudak Since the PR author isn't active, I've made the changes myself. Could you review?

Copy link
Member

@michaldudak michaldudak left a comment

Choose a reason for hiding this comment

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

Thanks, Zeeshan!

@ZeeshanTamboli ZeeshanTamboli changed the title [base-ui] Update APIs using Array to ReadonlyArray [base-ui] Update props using Array to ReadonlyArray Feb 7, 2024
@ZeeshanTamboli ZeeshanTamboli changed the title [base-ui] Update props using Array to ReadonlyArray [base-ui] Update props using Array to ReadonlyArray type Feb 7, 2024
@ZeeshanTamboli ZeeshanTamboli merged commit 67552ad into mui:master Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: @mui/base Specific to @mui/base (legacy). type: enhancement It’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature. typescript

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[typescript] Replace Array API with ReadonlyArray

7 participants