gosling-lang / gosling-widget

MIT License
0 stars 0 forks source link

Move to latest `gosling.js` #1

Open manzt opened 2 years ago

manzt commented 2 years ago

We are currently "stuck" on v0.9.16 for unknown reasons. Bumping gosling.js to the latest (v0.9.17) causes the jupyter widget to fail in the browser. All build steps work appropriately, but the final bundle fails when loaded in Jupyter Notebook (via require.js) and JupyterLab.

Steps to reproduce:

npm install goslings.js@latest
npm run build:nb
jupyter notebook .

Error in the browser: https://requirejs.org/docs/errors.html#mismatch

cc: @sehilyi

manzt commented 2 years ago

Additionally, using react@17 and react-dom@17 leads to some confusing React errors? I forgot to take a screenshot, but will at a later time.

sehilyi commented 2 years ago

Seeing the changes between 0.9.16 and 0.9.17 (https://github.com/gosling-lang/gosling.js/compare/v0.9.16...v0.9.17), I see that css-element-queries is added to the dependency list while any other changes do not seem to affect on the packaging of the Gosling.js module.

manzt commented 2 years ago

The PR in gosling.js fixes this error, but now the screen is blank:

image
manzt commented 2 years ago

There is a warning printed to the console:

Warning WebGL warning: drawElementsInstanced: Drawing to a destination rect smaller than the viewport rect. (This warning will only be given once)

any thoughts, @sehilyi ?

sehilyi commented 2 years ago

I am not familiar with the warning message. Could you check if the size of the GoslingComponent container in the output cell (through the browser developer tool) is too small and different from how it is defined in the spec?

Odd that this 'empty output' issue did not seem to happen in gosling/gos when tested with the latest gosling.js.