mwouts / itables

Pandas DataFrames as Interactive DataTables
https://mwouts.github.io/itables/
MIT License
723 stars 54 forks source link

Add Quarto to supported editors #179

Closed paniterka closed 4 months ago

paniterka commented 1 year ago

Hi, thanks a lot for developing this tool, itables are super useful! I am using Quarto to generate websites and interactive articles basing on ipynb files and it looks like itables is working fine at least in its basic functionality, and Quarto-generated html is generating a warning, but preserving the interactivity nevertheless (as of Quarto 1.3.340). What kind of tests do you require in order to add Quarto to the list of supported editors?

mwouts commented 1 year ago

Hey @paniterka , thank you for reaching out!

Yes I expect itables to work with Quarto, at least when the output document is html or revealjs.

I mostly use revealjs so I have not seen the warning you mention for html, could you cite what the warning says?

And yes, it would be a great idea to add Quarto to the list of supported editors, but we should mention the supported output types (and e.g. test what happens in the other output types). Maybe I let you do some more testing, or I do it when I am back (now travelling)?

mwouts commented 1 year ago

Hey @paniterka , I have posted to examples of quarto documents that use itables at https://github.com/quarto-dev/quarto-cli/discussions/5878. Re the revealjs format I think that some more research is needed to find out what is the appropriate scale for the table, let's see how the discussion goes and then I will add this to the documentation.

paniterka commented 1 year ago

Thanks a lot! and sorry for disappearing. In the end I didn't have that much time to play with it further. I will let you know once I have some insights on my side :)

paniterka commented 11 months ago

Hi there, refreshing this thread :) We are currently typesetting a report using Quarto where we incorporate itables. We have noticed that when an itable is rendered inside a Quarto callout block, the header becomes misaligned with the rest of the table upon the first render (column widths don't match). When the reader clicks on the header to sort the contents, it suddenly becomes aligned with the rest. Do you know if this is something that is fixable within itables, or is this a Quarto problem?

image

mwouts commented 11 months ago

Hey @paniterka , I think I will need to add support for data-quarto-disable-processing='true' as mentioned in this comment.

I might not be able to do so before a few weeks. Meanwhile, would you like to give a try to the document_quarto branch? You can install it with

pip install git+https://github.com/mwouts/itables.git@document_quarto
paniterka commented 11 months ago

No worries, for now I will look for a workaround for this using the latest stable version of itables. Meanwhile I have found some other conflicts - I will post them here for the future reference, if it's ok for you (if not, let me know). They are also not a dealbreaker so far and don't require urgent attention. I'll look into the document_quarto branch when the time allows!

But just to say it again: overall I'm super happy with how the two tools integrate :)

mwouts commented 11 months ago

Oh yes, sure, please report the other issues you are aware of! I'll be happy to address them when time permits.