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

ITables Version 2.0 #235

Merged
merged 19 commits into from
Mar 16, 2024
Merged

ITables Version 2.0 #235

merged 19 commits into from
Mar 16, 2024

Conversation

mwouts
Copy link
Owner

@mwouts mwouts commented Mar 5, 2024

This PR transitions to datatables-net==2.0.1. It also provides support for the a series of extension and JS bigints.

Closes #50
Closes #121
Closes #172
Closes #178
Closes #207
Closes #208
Closes #231

TODO

@codecov-commenter
Copy link

codecov-commenter commented Mar 5, 2024

Codecov Report

Attention: Patch coverage is 88.13559% with 7 lines in your changes are missing coverage. Please review.

Project coverage is 96.24%. Comparing base (a970712) to head (6ac9c55).

Files Patch % Lines
itables/javascript.py 75.00% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #235      +/-   ##
==========================================
- Coverage   96.90%   96.24%   -0.66%     
==========================================
  Files          26       26              
  Lines        1001     1013      +12     
==========================================
+ Hits          970      975       +5     
- Misses         31       38       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

import dt from 'https://cdn.datatables.net/1.12.1/js/jquery.dataTables.mjs';
dt($);
import 'https://code.jquery.com/jquery-3.7.1.min.js';
import 'https://cdn.datatables.net/v/dt/jszip-3.10.1/dt-2.0.1/b-3.0.0/b-html5-3.0.0/datatables.min.js';
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AllanJard, this works in a web browser and in Jupyter, but unfortunately not in VS Code (which complains that DataTable below is not defined). Would you have .mjs extensions for the bundles ? Or do you think you could export DataTable explicitly in the .js file? Thanks!

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am moving this conversation to #237

setup.py Outdated Show resolved Hide resolved
@AllanJard
Copy link

There are no plans for a single combined file with ESM exports at this time. But each individual module does have an ESM file - e.g.:

So just the same as the UMD loader file names with with .mjs rather than .js.

@mwouts
Copy link
Owner Author

mwouts commented Mar 8, 2024

There are no plans for a single combined file with ESM exports at this time. But each individual module does have an ESM file (....)

Thanks @AllanJard , I'll try that, then!

Build a bundled version that includes buttons with esbuild
@mwouts mwouts force-pushed the latest_dt_use_imports branch 14 times, most recently from 1555786 to e380c2c Compare March 8, 2024 23:22
@mwouts mwouts force-pushed the latest_dt_use_imports branch 2 times, most recently from 5cafb92 to 2be85d1 Compare March 11, 2024 00:19
@mwouts mwouts changed the title ITables Version 2.0rc0 ITables Version 2.0 Mar 11, 2024
Add support for Python 3.12
Update .github/workflow
@mwouts
Copy link
Owner Author

mwouts commented Mar 13, 2024

An exciting overview of what we can do with the v2 / the datatable extensions is available in the future documentations, on binder: https://mybinder.org/v2/gh/mwouts/itables/latest_dt_use_imports?urlpath=lab/tree/docs/extensions.md. I love the SearchBuilder and SearchPanes extensions!

Unfortunately there is one major issue upholding this release: #238 . Now that we have a rc (thanks @mahendrapaipuri) I will reach out to the Quarto maintainers.

Re #237 I am not yet sure what to do: I think import maps are not an option, reverting to datatables==1.12.1 is not an option neither, and I don't have the know-how to host esm bundles 😉

@mwouts mwouts merged commit 73e6fa4 into main Mar 16, 2024
13 checks passed
@mwouts mwouts deleted the latest_dt_use_imports branch March 16, 2024 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants