datalayer / jupyter-ui

⚛️ React.js components 💯% compatible with 🪐 Jupyter - Storybook on https://jupyter-ui-storybook.datalayer.tech
https://jupyter-ui.datalayer.tech
Other
333 stars 46 forks source link

CSS stylesheets are not deduplicated #131

Open fcollonval opened 10 months ago

fcollonval commented 10 months ago

Description

Stylesheets are duplicated in some examples - maybe in other places too:

image

Reproduce

Execute the example packages/react/src/examples/Notebook.tsx.

Open the style applied on a cell.

Expected behavior

Lumino and JupyterLab stylesheets are deduplicated (this is known to be not trivial).

Context

Browser Output
Paste the output from your browser Javascript console here.
echarles commented 10 months ago

Tip: @fcollonval says to import the js and not the css

echarles commented 9 months ago

@fcollonval I have pushed https://github.com/datalayer/jupyter-ui/commit/5db5420581aa646377de2c005374dec576865891 to use the index.js instead of the css when available. It is still functional and looks to me like it has less duplicates. Could you please check based on your previous experiment? Thx!

Screenshot from 2023-12-29 09-48-40