Skip to content

[avatar] Remove deprecated props#47966

Open
silviuaavram wants to merge 6 commits intomui:masterfrom
silviuaavram:chore/remove-deprecated-props-2
Open

[avatar] Remove deprecated props#47966
silviuaavram wants to merge 6 commits intomui:masterfrom
silviuaavram:chore/remove-deprecated-props-2

Conversation

@silviuaavram
Copy link
Member

@silviuaavram silviuaavram commented Mar 13, 2026

Copilot AI review requested due to automatic review settings March 13, 2026 13:01
@silviuaavram silviuaavram changed the title Chore/remove deprecated props 2 [avatar] Remove deprecated props Mar 13, 2026
@mui-bot
Copy link

mui-bot commented Mar 13, 2026

Netlify deploy preview

Bundle size report

Bundle Parsed size Gzip size
@mui/material 🔺+17B(0.00%) 🔺+13B(+0.01%)
@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 2098dcd

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR removes the deprecated imgProps prop from the Avatar component as part of the v9 migration. The useLoaded hook is extracted into its own TypeScript file with improved type safety and conditional property setting.

Changes:

  • Removed the deprecated imgProps prop from Avatar component, its types, PropTypes, and API docs
  • Extracted useLoaded into a separate TypeScript file (Avatar/utils/useLoaded.ts) with typed state and conditional property assignment
  • Updated docs and examples to use slotProps.img instead of imgProps

Reviewed changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/mui-material/src/Avatar/utils/useLoaded.ts New file: extracted and improved useLoaded hook with TypeScript types
packages/mui-material/src/Avatar/Avatar.js Removed imgProps prop, inline useLoaded, imported new hook
packages/mui-material/src/Avatar/Avatar.d.ts Removed imgProps from type definitions
packages/mui-material/src/Avatar/Avatar.test.js Removed one imgProps test (but missed another)
packages/mui-material/src/Avatar/Avatar.spec.tsx Removed imgProps type spec test
docs/src/modules/components/MaterialUIExampleCollection.js Migrated imgProps to slotProps.img
docs/src/components/about/Team.tsx Migrated imgProps to slotProps.img
docs/translations/api-docs/avatar/avatar.json Removed imgProps translation
docs/pages/material-ui/api/avatar.json Removed imgProps from API page
docs/data/material/migration/upgrade-to-v9/upgrade-to-v9.md Added migration guide for imgProps removal

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged. label Mar 13, 2026
@silviuaavram silviuaavram force-pushed the chore/remove-deprecated-props-2 branch from e37bbb1 to 2098dcd Compare March 13, 2026 14:42
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged. label Mar 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants