element-hq / element-web

A glossy Matrix collaboration client for the web.
https://element.io
GNU Affero General Public License v3.0
11.27k stars 2.02k forks source link

Prevent CSS Modules class names from Compound rolling all snapshots #26224

Open germain-gg opened 1 year ago

germain-gg commented 1 year ago

The CSS module hash should be linked to the file name and not tied to the content of the file.

Investigate why https://github.com/matrix-org/matrix-react-sdk/pull/11634 spams the snapshots...

germain-gg commented 1 year ago

This is actually the intended behaviour of CSS modules. Changes to the inner of the CSS will generate a new hash. We might want to change how to remove that from snapshots in the future

t3chguy commented 1 year ago

Updated issue to match your findings @germain-gg - also worth noting that Compound itself does this via vitest stubbing out CSS modules classname generation