Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable self-contained tables in rendered quarto documents #14

Open
machow opened this issue Aug 27, 2024 · 2 comments
Open

Enable self-contained tables in rendered quarto documents #14

machow opened this issue Aug 27, 2024 · 2 comments
Labels

Comments

@machow
Copy link
Owner

machow commented Aug 27, 2024

It appears that when rendering Reactable in quarto, ipyreact (or something else in the process) attempts to fetch require.min.js and embed-amd.js from a CDN. Let's investigate whether it's possible to output fully self-contained Reactable tables--either as a default, or by setting an option.

Some key considerations:

  • output should appear in notebook or rendered quarto document
  • it's okay if output is only self contained when using quarto, etc..
  • we should be mindful of file size (e.g. when self-contained flag is off)

Useful code paths:

Note that it sounds like migrating from ipyreact to directly using anywidgets is a common approach (as ipyreact is a lightweight wrapper around anywidgets, which is useful for prototyping!).

@machow
Copy link
Owner Author

machow commented Aug 29, 2024

Here is a helpful issue on how to wire up react with anywidget: manzt/anywidget#97

@machow
Copy link
Owner Author

machow commented Oct 31, 2024

Looking at the network requests, it appears ipyreact first looks for the javascript code off the relative path. E.g. if the table lives at example.com/my_table.html, it looks for example.com/@widgetti/jupyter-react.js.

I wonder if this can be customized at all? (e.g. to always point to example.com/assets/jupyter-react.js etc..)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant