-
Notifications
You must be signed in to change notification settings - Fork 323
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
Use AG Grid instead of the old table.js rendering #5915
Conversation
I hope you haven't spent too much time on it, as the table visualization will be replaced anyway in #5806 with a completely different take on rendering tables. I don't think it's compatible with AG Grid. Surely, we cannot rely on its filtering/sorting, as those need cooperation with the engine. |
A small piece of work to get closer to the functionality we need for now. Once the rust-based grids can do everything we need we can swap. Filtering and sorting indeed is limited to only the cases when we show the whole set. |
a84b0e5
to
db5c93d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For a long time I was thinking that it may be easiest to visualize objects by their to_text
/to_display_text
representation - what is the benefit on relying on JSON for the cell contents? So I'm thinking if the new Date
handling is needed - IMO we should just rely on our Text representation.
As for the 1-indexed rows - OK, but let's add a note to the documentation of places where there will now be inconsistency.
Looks good overall, cool that we are getting this cool table vis!
Approving, but please make sure we are not displaying a wrong timezone on the date visualization - this is something that I think we must avoid.
app/gui/view/graph-editor/src/builtin/visualization/java_script/table.js
Outdated
Show resolved
Hide resolved
app/gui/view/graph-editor/src/builtin/visualization/java_script/table.js
Outdated
Show resolved
Hide resolved
distribution/lib/Standard/Visualization/0.0.0-dev/src/Table/Visualization.enso
Outdated
Show resolved
Hide resolved
The grid will disable filter/sort if the row set is truncated (1000 rows limit currently). There will also be a pinned row added to tell the user this and the total row count. |
b517397
to
484d8f1
Compare
app/gui/view/graph-editor/src/builtin/visualization/java_script/table.js
Show resolved
Hide resolved
loadStyle('https://cdn.jsdelivr.net/npm/ag-grid-community/styles/ag-grid.css') | ||
loadStyle('https://cdn.jsdelivr.net/npm/ag-grid-community/styles/ag-theme-alpine.css') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a note here. Nothing to fix here, as we are doing it wrongly in other places as well, but basically this is bad, as it makes the app not working without internet connection. We need to fix this and other similar places one day. CC @sylwiabr
app/gui/view/graph-editor/src/builtin/visualization/java_script/table.js
Outdated
Show resolved
Hide resolved
app/gui/view/graph-editor/src/builtin/visualization/java_script/table.js
Outdated
Show resolved
Hide resolved
app/gui/view/graph-editor/src/builtin/visualization/java_script/table.js
Outdated
Show resolved
Hide resolved
app/gui/view/graph-editor/src/builtin/visualization/java_script/table.js
Outdated
Show resolved
Hide resolved
app/gui/view/graph-editor/src/builtin/visualization/java_script/table.js
Outdated
Show resolved
Hide resolved
app/gui/view/graph-editor/src/builtin/visualization/java_script/table.js
Outdated
Show resolved
Hide resolved
Only allow sorting and filtering if complete set.
39a4e40
to
962443d
Compare
Pull Request Description
Expanded view:
Truncated view:
Replaces the code generating the JS Table visualization with AG Grid Community.
Important Notes
To switch to the Enterprise edition, we would need to solve the licensing issues. This would add:
Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:
Scala,
Java,
and
Rust
style guides. In case you are using a language not listed above, follow the Rust style guide.
./run ide build
.