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

[docs][table] Stabilize random series in virtualized table demo

Open Janpot opened this issue 1 year ago • 2 comments

Make sure we always generate the same list so that we can use it for screenshot testing as well. Is this acceptable as part of a demo?

Before: https://deploy-preview-43740--material-ui.netlify.app/material-ui/react-table/#virtualized-table After: https://deploy-preview-43744--material-ui.netlify.app/material-ui/react-table/#virtualized-table

Janpot avatar Sep 13 '24 12:09 Janpot

Netlify deploy preview

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

Bundle size report

No bundle size changes (Toolpad) No bundle size changes

Generated by :no_entry_sign: dangerJS against ac90b9fdf13fe782434e53d5845354be71a46158

mui-bot avatar Sep 13 '24 12:09 mui-bot

would be nice to have this abstracted, but compared to what I wrote here, it feels a bit excessive to pull in as a dependency in the docs 🤔

Edit: There's an open issue for quite some time 🙂

I'll update the test, not going to do DISABLE_CHANCE_RANDOM, we can just seed the random number generator, there is no harm doing this always.

Janpot avatar Sep 13 '24 18:09 Janpot

True, chance.js a big dependency but look at that https://bundlephobia.com/package/@faker-js/[email protected]. God 3MB https://esm.sh/v135/@faker-js/[email protected]/es2022/faker.mjs at that point it's a joke 😂.

Looks good

oliviertassinari avatar Sep 18 '24 13:09 oliviertassinari