material-ui icon indicating copy to clipboard operation
material-ui copied to clipboard

[icons] Bring back icon testid

Open Janpot opened this issue 9 months ago • 1 comments

Avoid split brain between dev and production. It's too confusing. This brings back the testid, but allows for removing it with property legacyTestid. We can invert the default in v8.

Use the theme defaultProps to turn off this option globally:

const theme = createTheme({
  components: {
    SvgIcon: {
      defaultProps: {
        legacyTestid: false,
      },
    },
  },
});

Plan:

  • v7.x: introduce the legacyTestid prop with default true to avoid breaking change.
  • v8.0: make it default to false, the user must always explicitly turn it on in any environment.

Janpot avatar Mar 31 '25 09:03 Janpot

Netlify deploy preview

Bundle size report

Bundle Parsed Size Gzip Size
@mui/material 🔺+455B(+0.09%) 🔺+233B(+0.15%)
@mui/lab 🔺+106B(+0.08%) 🔺+51B(+0.13%)
@mui/system 0B(0.00%) 0B(0.00%)
@mui/utils 0B(0.00%) 0B(0.00%)

Details of bundle changes

Generated by :no_entry_sign: dangerJS against fb62bf1d742289e11e4e4bcabe8a7d5538074abb

mui-bot avatar Mar 31 '25 09:03 mui-bot

@Janpot We just updated to V7 and would love to have this merged. Is there any ETA :)?

p-hlp avatar Jun 30 '25 13:06 p-hlp

@Janpot would love to have this merged too. This in the only point missing to migrate from V6 to V7. Our big E2E suites are breaking due this.

leonardocouy avatar Jul 18 '25 13:07 leonardocouy

Any info on this issue ? It's break auto-test on our apps to

EtienneS76 avatar Oct 06 '25 08:10 EtienneS76