[alert] Remove unnecessary default icon mapping fallback#47460
Conversation
Netlify deploy previewhttps://deploy-preview-47460--material-ui.netlify.app/ Bundle size report
|
This MR contains the following updates: | Package | Type | Update | Change | OpenSSF | |---|---|---|---|---| | [@mui/icons-material](https://mui.com/material-ui/material-icons/) ([source](https://github.com/mui/material-ui/tree/HEAD/packages/mui-icons-material)) | dependencies | patch | [`7.3.6` → `7.3.7`](https://renovatebot.com/diffs/npm/@mui%2ficons-material/7.3.6/7.3.7) | [](https://securityscorecards.dev/viewer/?uri=github.com/mui/material-ui) | | [@mui/material](https://mui.com/material-ui/) ([source](https://github.com/mui/material-ui/tree/HEAD/packages/mui-material)) | dependencies | patch | [`7.3.6` → `7.3.7`](https://renovatebot.com/diffs/npm/@mui%2fmaterial/7.3.6/7.3.7) | [](https://securityscorecards.dev/viewer/?uri=github.com/mui/material-ui) | | [@mui/types](https://github.com/mui/material-ui/tree/master/packages/mui-types) ([source](https://github.com/mui/material-ui/tree/HEAD/packages/mui-types)) | devDependencies | patch | [`7.4.9` → `7.4.10`](https://renovatebot.com/diffs/npm/@mui%2ftypes/7.4.9/7.4.10) | [](https://securityscorecards.dev/viewer/?uri=github.com/mui/material-ui) | | [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node) ([source](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node)) | devDependencies | patch | [`24.10.4` → `24.10.7`](https://renovatebot.com/diffs/npm/@types%2fnode/24.10.4/24.10.7) | [](https://securityscorecards.dev/viewer/?uri=github.com/DefinitelyTyped/DefinitelyTyped) | | [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react) ([source](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react)) | devDependencies | patch | [`19.2.7` → `19.2.8`](https://renovatebot.com/diffs/npm/@types%2freact/19.2.7/19.2.8) | [](https://securityscorecards.dev/viewer/?uri=github.com/DefinitelyTyped/DefinitelyTyped) | | [i18next](https://www.i18next.com) ([source](https://github.com/i18next/i18next)) | dependencies | patch | [`25.7.3` → `25.7.4`](https://renovatebot.com/diffs/npm/i18next/25.7.3/25.7.4) | [](https://securityscorecards.dev/viewer/?uri=github.com/i18next/i18next) | --- ### Release Notes <details> <summary>mui/material-ui (@​mui/icons-material)</summary> ### [`v7.3.7`](https://github.com/mui/material-ui/blob/HEAD/CHANGELOG.md#737) [Compare Source](mui/material-ui@v7.3.6...v7.3.7) <!-- generated comparing v7.3.6..master --> *Jan 8, 2026* A big thanks to the 16 contributors who made this release possible. ##### `@mui/material@7.3.7` - \[accordion] Remove unnecessary handling of `square` prop on Accordion Root ([#​47457](mui/material-ui#47457)) [@​ZeeshanTamboli](https://github.com/ZeeshanTamboli) - \[alert] Remove unnecessary default icon mapping fallback ([#​47460](mui/material-ui#47460)) [@​ZeeshanTamboli](https://github.com/ZeeshanTamboli) - \[appbar] Fix inherit color CSS variable not getting applied ([#​47518](mui/material-ui#47518)) [@​ZeeshanTamboli](https://github.com/ZeeshanTamboli) - \[autocomplete] Fix `ArrowLeft`, `Backspace` & `Delete` behavior for multiple and single-value rendering with proper caret handling ([#​47411](mui/material-ui#47411)) [@​jnbain](https://github.com/jnbain) - \[backdrop] Remove unnecessary passing of `classes` from root slot ([#​47519](mui/material-ui#47519)) [@​ZeeshanTamboli](https://github.com/ZeeshanTamboli) - \[button-group] Fix styles when variant is `contained` ([#​47499](mui/material-ui#47499)) [@​ZeeshanTamboli](https://github.com/ZeeshanTamboli) - \[card-action-area] Remove incorrect root ref being forwarded to focus highlight component ([#​47523](mui/material-ui#47523)) [@​ZeeshanTamboli](https://github.com/ZeeshanTamboli) - \[checkbox] Fix readonly checkboxes ([#​47503](mui/material-ui#47503)) [@​mj12albert](https://github.com/mj12albert) - \[click-away-listener] Tighten the parameter type of createHandleSynthetic method ([#​47525](mui/material-ui#47525)) [@​ZeeshanTamboli](https://github.com/ZeeshanTamboli) - \[dialog] Fix backdrop theme style overrides ([#​47544](mui/material-ui#47544)) [@​ZeeshanTamboli](https://github.com/ZeeshanTamboli) - \[focus-trap] Compute `activeElement` inside `loopFocus` on every keydown ([#​47566](mui/material-ui#47566)) [@​ZeeshanTamboli](https://github.com/ZeeshanTamboli) - \[modal] Take non-integer padding-right into consideration when scroll locking ([#​47420](mui/material-ui#47420)) [@​Zache](https://github.com/Zache) - \[select] Fix dropdown width does not match trigger width on window resize ([#​47526](mui/material-ui#47526)) [@​AarishMansur](https://github.com/AarishMansur) - \[tabs] Fix passing incorrect slot name props (scrollButton → scrollButtons) ([#​47215](mui/material-ui#47215)) [@​rithik56](https://github.com/rithik56) ##### Docs - \[card] Fix key warning ([#​47524](mui/material-ui#47524)) [@​ZeeshanTamboli](https://github.com/ZeeshanTamboli) - \[dialog] Replace TranstionProps with slotProps.transition ([#​47569](mui/material-ui#47569)) [@​sai6855](https://github.com/sai6855) - \[number-field] Use stable Base UI package ([#​47504](mui/material-ui#47504)) [@​siriwatknp](https://github.com/siriwatknp) - \[snackbar] Replace TransitionComponent with slots.transition ([#​47570](mui/material-ui#47570)) [@​sai6855](https://github.com/sai6855) - Fix incorrect indentation in migration guide ([#​47571](mui/material-ui#47571)) [@​sai6855](https://github.com/sai6855) - Enable MUI chat on Material UI demos ([#​46837](mui/material-ui#46837)) [@​siriwatknp](https://github.com/siriwatknp) - Add docs and website banner for Dev survey'25 ([#​47521](mui/material-ui#47521)) [@​prakhargupta1](https://github.com/prakhargupta1) - Update Tailwind CSS v4 + Next.js Pages Router docs ([#​47546](mui/material-ui#47546)) [@​atharva3333](https://github.com/atharva3333) - Add warning callout to Sync plugin doc ([#​47511](mui/material-ui#47511)) [@​mapache-salvaje](https://github.com/mapache-salvaje) - Update typo in TailwindCSS v4 integration with Next.js docs ([#​47512](mui/material-ui#47512)) [@​TimKraemer](https://github.com/TimKraemer) - Fix link to contributing guide ([#​47473](mui/material-ui#47473)) [@​oliviertassinari](https://github.com/oliviertassinari) - Improve description of Accordion props ([#​47459](mui/material-ui#47459)) [@​ZeeshanTamboli](https://github.com/ZeeshanTamboli) ##### Core - \[blog] Whats new since MUI X v8 \[DX-51] ([#​47140](mui/material-ui#47140)) [@​joserodolfofreitas](https://github.com/joserodolfofreitas) - \[code-infra] Fix React\@​next CI job ([#​47493](mui/material-ui#47493)) [@​Janpot](https://github.com/Janpot) - \[code-infra] Move font loading to [@​mui/docs](https://github.com/mui/docs) ([#​47385](mui/material-ui#47385)) [@​Janpot](https://github.com/Janpot) - \[code-infra] Fix CI for React 18 ([#​47560](mui/material-ui#47560)) [@​Janpot](https://github.com/Janpot) - \[code-infra] Prevent legacy browsers tests from updating ([#​47496](mui/material-ui#47496)) [@​Janpot](https://github.com/Janpot) - \[code-infra] Move `@mui/internal-test-utils` to code infra repo ([#​47422](mui/material-ui#47422)) [@​Janpot](https://github.com/Janpot) - \[code-infra] Fix React\@​next CI job ([#​47493](mui/material-ui#47493)) [@​Janpot](https://github.com/Janpot) - \[examples] Update Next.js versions to v16 in Next.js examples (DX-57) ([#​47453](mui/material-ui#47453)) [@​alelthomas](https://github.com/alelthomas) - \[internal] Bump Next.js & React version to avoid security vulnerability ([#​47427](mui/material-ui#47427)) [@​oliviertassinari](https://github.com/oliviertassinari) - \[test] Use plain playwright for e2e ([#​47410](mui/material-ui#47410)) [@​mj12albert](https://github.com/mj12albert) - \[test] Fix react-18 tests ([#​47407](mui/material-ui#47407)) [@​Janpot](https://github.com/Janpot) All contributors of this release in alphabetical order: [@​AarishMansur](https://github.com/AarishMansur), [@​alelthomas](https://github.com/alelthomas), [@​atharva3333](https://github.com/atharva3333), [@​bricefrisco](https://github.com/bricefrisco), [@​Janpot](https://github.com/Janpot), [@​jnbain](https://github.com/jnbain), [@​joserodolfofreitas](https://github.com/joserodolfofreitas), [@​mapache-salvaje](https://github.com/mapache-salvaje), [@​mj12albert](https://github.com/mj12albert), [@​oliviertassinari](https://github.com/oliviertassinari), [@​prakhargupta1](https://github.com/prakhargupta1), [@​rithik56](https://github.com/rithik56), [@​siriwatknp](https://github.com/siriwatknp), [@​TimKraemer](https://github.com/TimKraemer), [@​Zache](https://github.com/Zache), [@​ZeeshanTamboli](https://github.com/ZeeshanTamboli) </details> <details> <summary>i18next/i18next (i18next)</summary> ### [`v25.7.4`](https://github.com/i18next/i18next/blob/HEAD/CHANGELOG.md#2574) [Compare Source](i18next/i18next@v25.7.3...v25.7.4) - fix: Interpolation breaks when cloning an instance [2376](https://github.com/i18next/react-i18next/issues/2376) </details> --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi43Ni41IiwidXBkYXRlZEluVmVyIjoiNDIuNzYuNSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiZGVwZW5kZW5jaWVzIiwicmVub3ZhdGUiXX0=--> See merge request swiss-armed-forces/cyber-command/cea/loom!245 Co-authored-by: Loom MR Pipeline Trigger <group_103951964_bot_9504bb8dead6d4e406ad817a607f24be@noreply.gitlab.com>
chore(deps): update frontend dependencies (patch) (patch) This MR contains the following updates: | Package | Type | Update | Change | OpenSSF | |---|---|---|---|---| | [@mui/icons-material](https://mui.com/material-ui/material-icons/) ([source](https://github.com/mui/material-ui/tree/HEAD/packages/mui-icons-material)) | dependencies | patch | [`7.3.6` → `7.3.7`](https://renovatebot.com/diffs/npm/@mui%2ficons-material/7.3.6/7.3.7) | [](https://securityscorecards.dev/viewer/?uri=github.com/mui/material-ui) | | [@mui/material](https://mui.com/material-ui/) ([source](https://github.com/mui/material-ui/tree/HEAD/packages/mui-material)) | dependencies | patch | [`7.3.6` → `7.3.7`](https://renovatebot.com/diffs/npm/@mui%2fmaterial/7.3.6/7.3.7) | [](https://securityscorecards.dev/viewer/?uri=github.com/mui/material-ui) | | [@mui/types](https://github.com/mui/material-ui/tree/master/packages/mui-types) ([source](https://github.com/mui/material-ui/tree/HEAD/packages/mui-types)) | devDependencies | patch | [`7.4.9` → `7.4.10`](https://renovatebot.com/diffs/npm/@mui%2ftypes/7.4.9/7.4.10) | [](https://securityscorecards.dev/viewer/?uri=github.com/mui/material-ui) | | [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node) ([source](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node)) | devDependencies | patch | [`24.10.4` → `24.10.7`](https://renovatebot.com/diffs/npm/@types%2fnode/24.10.4/24.10.7) | [](https://securityscorecards.dev/viewer/?uri=github.com/DefinitelyTyped/DefinitelyTyped) | | [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react) ([source](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react)) | devDependencies | patch | [`19.2.7` → `19.2.8`](https://renovatebot.com/diffs/npm/@types%2freact/19.2.7/19.2.8) | [](https://securityscorecards.dev/viewer/?uri=github.com/DefinitelyTyped/DefinitelyTyped) | | [i18next](https://www.i18next.com) ([source](https://github.com/i18next/i18next)) | dependencies | patch | [`25.7.3` → `25.7.4`](https://renovatebot.com/diffs/npm/i18next/25.7.3/25.7.4) | [](https://securityscorecards.dev/viewer/?uri=github.com/i18next/i18next) | --- ### Release Notes <details> <summary>mui/material-ui (@​mui/icons-material)</summary> ### [`v7.3.7`](https://github.com/mui/material-ui/blob/HEAD/CHANGELOG.md#737) [Compare Source](mui/material-ui@v7.3.6...v7.3.7) <!-- generated comparing v7.3.6..master --> *Jan 8, 2026* A big thanks to the 16 contributors who made this release possible. ##### `@mui/material@7.3.7` - \[accordion] Remove unnecessary handling of `square` prop on Accordion Root ([#​47457](mui/material-ui#47457)) [@​ZeeshanTamboli](https://github.com/ZeeshanTamboli) - \[alert] Remove unnecessary default icon mapping fallback ([#​47460](mui/material-ui#47460)) [@​ZeeshanTamboli](https://github.com/ZeeshanTamboli) - \[appbar] Fix inherit color CSS variable not getting applied ([#​47518](mui/material-ui#47518)) [@​ZeeshanTamboli](https://github.com/ZeeshanTamboli) - \[autocomplete] Fix `ArrowLeft`, `Backspace` & `Delete` behavior for multiple and single-value rendering with proper caret handling ([#​47411](mui/material-ui#47411)) [@​jnbain](https://github.com/jnbain) - \[backdrop] Remove unnecessary passing of `classes` from root slot ([#​47519](mui/material-ui#47519)) [@​ZeeshanTamboli](https://github.com/ZeeshanTamboli) - \[button-group] Fix styles when variant is `contained` ([#​47499](mui/material-ui#47499)) [@​ZeeshanTamboli](https://github.com/ZeeshanTamboli) - \[card-action-area] Remove incorrect root ref being forwarded to focus highlight component ([#​47523](mui/material-ui#47523)) [@​ZeeshanTamboli](https://github.com/ZeeshanTamboli) - \[checkbox] Fix readonly checkboxes ([#​47503](mui/material-ui#47503)) [@​mj12albert](https://github.com/mj12albert) - \[click-away-listener] Tighten the parameter type of createHandleSynthetic method ([#​47525](mui/material-ui#47525)) [@​ZeeshanTamboli](https://github.com/ZeeshanTamboli) - \[dialog] Fix backdrop theme style overrides ([#​47544](mui/material-ui#47544)) [@​ZeeshanTamboli](https://github.com/ZeeshanTamboli) - \[focus-trap] Compute `activeElement` inside `loopFocus` on every keydown ([#​47566](mui/material-ui#47566)) [@​ZeeshanTamboli](https://github.com/ZeeshanTamboli) - \[modal] Take non-integer padding-right into consideration when scroll locking ([#​47420](mui/material-ui#47420)) [@​Zache](https://github.com/Zache) - \[select] Fix dropdown width does not match trigger width on window resize ([#​47526](mui/material-ui#47526)) [@​AarishMansur](https://github.com/AarishMansur) - \[tabs] Fix passing incorrect slot name props (scrollButton → scrollButtons) ([#​47215](mui/material-ui#47215)) [@​rithik56](https://github.com/rithik56) ##### Docs - \[card] Fix key warning ([#​47524](mui/material-ui#47524)) [@​ZeeshanTamboli](https://github.com/ZeeshanTamboli) - \[dialog] Replace TranstionProps with slotProps.transition ([#​47569](mui/material-ui#47569)) [@​sai6855](https://github.com/sai6855) - \[number-field] Use stable Base UI package ([#​47504](mui/material-ui#47504)) [@​siriwatknp](https://github.com/siriwatknp) - \[snackbar] Replace TransitionComponent with slots.transition ([#​47570](mui/material-ui#47570)) [@​sai6855](https://github.com/sai6855) - Fix incorrect indentation in migration guide ([#​47571](mui/material-ui#47571)) [@​sai6855](https://github.com/sai6855) - Enable MUI chat on Material UI demos ([#​46837](mui/material-ui#46837)) [@​siriwatknp](https://github.com/siriwatknp) - Add docs and website banner for Dev survey'25 ([#​47521](mui/material-ui#47521)) [@​prakhargupta1](https://github.com/prakhargupta1) - Update Tailwind CSS v4 + Next.js Pages Router docs ([#​47546](mui/material-ui#47546)) [@​atharva3333](https://github.com/atharva3333) - Add warning callout to Sync plugin doc ([#​47511](mui/material-ui#47511)) [@​mapache-salvaje](https://github.com/mapache-salvaje) - Update typo in TailwindCSS v4 integration with Next.js docs ([#​47512](mui/material-ui#47512)) [@​TimKraemer](https://github.com/TimKraemer) - Fix link to contributing guide ([#​47473](mui/material-ui#47473)) [@​oliviertassinari](https://github.com/oliviertassinari) - Improve description of Accordion props ([#​47459](mui/material-ui#47459)) [@​ZeeshanTamboli](https://github.com/ZeeshanTamboli) ##### Core - \[blog] Whats new since MUI X v8 \[DX-51] ([#​47140](mui/material-ui#47140)) [@​joserodolfofreitas](https://github.com/joserodolfofreitas) - \[code-infra] Fix React\@​next CI job ([#​47493](mui/material-ui#47493)) [@​Janpot](https://github.com/Janpot) - \[code-infra] Move font loading to [@​mui/docs](https://github.com/mui/docs) ([#​47385](mui/material-ui#47385)) [@​Janpot](https://github.com/Janpot) - \[code-infra] Fix CI for React 18 ([#​47560](mui/material-ui#47560)) [@​Janpot](https://github.com/Janpot) - \[code-infra] Prevent legacy browsers tests from updating ([#​47496](mui/material-ui#47496)) [@​Janpot](https://github.com/Janpot) - \[code-infra] Move `@mui/internal-test-utils` to code infra repo ([#​47422](mui/material-ui#47422)) [@​Janpot](https://github.com/Janpot) - \[code-infra] Fix React\@​next CI job ([#​47493](mui/material-ui#47493)) [@​Janpot](https://github.com/Janpot) - \[examples] Update Next.js versions to v16 in Next.js examples (DX-57) ([#​47453](mui/material-ui#47453)) [@​alelthomas](https://github.com/alelthomas) - \[internal] Bump Next.js & React version to avoid security vulnerability ([#​47427](mui/material-ui#47427)) [@​oliviertassinari](https://github.com/oliviertassinari) - \[test] Use plain playwright for e2e ([#​47410](mui/material-ui#47410)) [@​mj12albert](https://github.com/mj12albert) - \[test] Fix react-18 tests ([#​47407](mui/material-ui#47407)) [@​Janpot](https://github.com/Janpot) All contributors of this release in alphabetical order: [@​AarishMansur](https://github.com/AarishMansur), [@​alelthomas](https://github.com/alelthomas), [@​atharva3333](https://github.com/atharva3333), [@​bricefrisco](https://github.com/bricefrisco), [@​Janpot](https://github.com/Janpot), [@​jnbain](https://github.com/jnbain), [@​joserodolfofreitas](https://github.com/joserodolfofreitas), [@​mapache-salvaje](https://github.com/mapache-salvaje), [@​mj12albert](https://github.com/mj12albert), [@​oliviertassinari](https://github.com/oliviertassinari), [@​prakhargupta1](https://github.com/prakhargupta1), [@​rithik56](https://github.com/rithik56), [@​siriwatknp](https://github.com/siriwatknp), [@​TimKraemer](https://github.com/TimKraemer), [@​Zache](https://github.com/Zache), [@​ZeeshanTamboli](https://github.com/ZeeshanTamboli) </details> <details> <summary>i18next/i18next (i18next)</summary> ### [`v25.7.4`](https://github.com/i18next/i18next/blob/HEAD/CHANGELOG.md#2574) [Compare Source](i18next/i18next@v25.7.3...v25.7.4) - fix: Interpolation breaks when cloning an instance [2376](https://github.com/i18next/react-i18next/issues/2376) </details> --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi43Ni41IiwidXBkYXRlZEluVmVyIjoiNDIuNzYuNSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiZGVwZW5kZW5jaWVzIiwicmVub3ZhdGUiXX0=--> See merge request swiss-armed-forces/cyber-command/cea/loom!245 Co-authored-by: Loom MR Pipeline Trigger <group_103951964_bot_9504bb8dead6d4e406ad817a607f24be@noreply.gitlab.com> Co-authored-by: open-source Pipeline <group_90701827_bot_ed04ae348bc5f40af9966fb8b6867e99@noreply.gitlab.com>
|
@ZeeshanTamboli This pull request introduced a bug. For example, I created a new severity level for the Alert in my project, but I only want to set the icon for that new severity level, as in the image. Now, I need to set the icon for all severities.
|
|
@joaopalopes24 I didn't understand your issue. Can you provide a minimal reproduction? |
|
@ZeeshanTamboli For example, previously, if you wanted to change the icon only for warning severity alerts, it was possible.
By doing so, the warning alert would use the new icon, and the other alert severities would retain the default MUI icon. Now, I can't change the icon for a specific alert severity unless I set all icons in the icon mapping (iconMapping), otherwise the component displays nothing. |
|
@joaopalopes24 Please provide a minimal reproduction in the form of StackBlitz or CodeSandbox. Without code reproduction, I won't be able to verify. |
|
@joaopalopes24 Thanks, created a PR to revert this: #47629. |
|
@ZeeshanTamboli Thank you. Have a good day. |




The default of
iconMappingisdefaultIconMapping, so ificonMappingisnullorundefinedit will already fallback todefaultIconMapping. So the fallback in the JSX is unnecessary and too defensive.