chartes / lettres-vue

Site de l’application Ecco (Édition Collaborative de COrrespondances)
https://dev.chartes.psl.eu/ecco/
1 stars 3 forks source link

fix: ensure that each mirador instance has its own namespace for classnames #138

Closed fbessou closed 4 months ago

fbessou commented 4 months ago

Mirador defines its styles as json and delegate classnames generation to the @material-ui/core/styles library. In production, the generated class names are deterministic and unique into a given StylesContext. Each mirador instance creates a new StylesContext, leading to classnames not being unique accross several Mirador instances. Mirador exposes the MUI's createGenerateClassNameOptions which allows tweaking the generation of class names. Here we add a unique prefix to every Mirador instances through the use of a counter.

vicpsl commented 4 months ago

Integrated in commit 1c5500912135799ab25ca63fd026f8f37f6c3dfb. Closes #131.