-
Notifications
You must be signed in to change notification settings - Fork 73
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
epic: Support interactivity for HTML output #370
Comments
I have also been meditating on the fact that this would be an incredible feature. Assuming this is running on a webserver, the interactivity would be at least somewhat tied to the framework that a user chooses (e.g. Flask or Django). One interesting possibility I've daydreamed about is to provide htmx attributes to different table components that correspond to actions to be performed on the dataframe. This way, great-tables has to incorporate very little (if any) JS and can instead rerender the parts of the table updated by the change using the already existing layout framework. I would be interested in helping to make this a reality :) |
I think this should theoretically be doable without a webserver, in fact, I think I wouldn't want this feature if it required a webserver. It should be all doable clientside. Even supporting SQL theoretically can be done clientside (though I think some minimal interactivity is usually all that's needed). |
Thanks for opening this--we're definitely eager to support something like this! Right now, we're syncing with the shiny team (cc @schloerke) on potentially...
AFAIK they're using the tanstack table. Building on the tanstack tableThe R version of Great Tables (gt) uses a wrapper around the tanstack table, called reactable, to generate interactive tables. If we could create a similar wrapper in python, it shouldn't be too hard to wire up Great Tables to it. Here are some examples of the gt packages interactive tables. Building on something elseIf anyone knows of something better, we're open to it! I know there are a lot of interactive table tools out there that we've probably overlooked! Potential requirements
|
I've seen an example from |
Oh cool! Here's the panel Tabulator page, which seems to be similar to reactable |
We are still wrapping this piece up, but now have a draft of interactive tables using a package called reactable-py |
Looks pretty cool, curious if it's possible to make it work with a static html? I think having an interactive table that can work without any backend would be a killer feature. Even better if you can "sidecar" a parquet file or something that is the source of the data. |
Oh shoot -- I think it might not be too crazy to remove the pieces that are not self-contained. It looks like some of the javascript pieces are currently downloaded via CDN. Opened an issue to track on the repo: |
I'm considering whether it might be possible to implement the interactivity request using HTMX. The examples provided are impressive, and it seems like you just need to include the JS file in the header to get started. |
Prework
Proposal
Support interactivity for html output of great tables. This might be a big ask, I don't know how technically involved it would be, but it would be great to allow basic interactivity like sorting by column, filtering.
I think you'd then want to support a new param in
as_raw_html
withinteractive=True
which would then enable these features. Or perhaps it could be a bunch of method calls on table to enable piecemeal interactivity.This would be a killer feature personally.
Some inspiration could be the level of interactivity of https://docs.datapane.com/blocks/display-blocks/#tables-and-data
The text was updated successfully, but these errors were encountered: