C2DH / journal-of-digital-history

frontend app for our Digital Journal
GNU General Public License v3.0
20 stars 4 forks source link

integrate react-thebe for testing purposes only #552

Closed danieleguido closed 1 year ago

danieleguido commented 1 year ago

Thebe moved to React, so it's time to actually play with it! https://github.com/executablebooks/thebe/blob/0a62e506afa5f966ee6e4b33dbaa6c424516a8d1/apps/demo-react/src/WidgetsPage.tsx#L8

Thebe however expects a jupyterhub or jupyterlite kernel available somewhere.

danieleguido commented 1 year ago

see issue https://github.com/C2DH/journal-of-digital-history/issues/280 React-thebe is still 0.x library, so this would be just a test to check the future integration of Thebe ecosystem

eliselavy commented 1 year ago

Test the branch https://github.com/C2DH/journal-of-digital-history/tree/feature/thebe with following libraries defined

"thebe-core": "^0.2.3",
"thebe-react": "^0.2.3",

test with a Jupyter Lab locally

Screenshot 2023-09-05 at 17 31 11 Screenshot 2023-09-05 at 17 48 08 Screenshot 2023-09-05 at 17 50 58
eliselavy commented 1 year ago

To test pass in parameter the version of the parser: http://localhost:3001/en/article/m5GhKrrErgfE?v=3

Start a jupyterLab locally Screenshot 2023-09-12 at 15 22 33

But no signal in case of jupyter down , need to resfresh via browser

eliselavy commented 1 year ago

Strange by retesting following message appears @danieleguido utils.js:3474 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self' 'wasm-unsafe-eval' 'inline-speculation-rules'". Either the 'unsafe-inline' keyword, a hash ('sha256-GzRV2PUHYsZTLUlGz3fajqv/1+S6bxWf0IR3nP6PWGg='), or a nonce ('nonce-...') is required to enable inline execution.