Skip to content

Use ag-grid in data viewer#708

Merged
renkun-ken merged 23 commits into
REditorSupport:masterfrom
renkun-ken:ag-grid
Jul 20, 2021
Merged

Use ag-grid in data viewer#708
renkun-ken merged 23 commits into
REditorSupport:masterfrom
renkun-ken:ag-grid

Conversation

@renkun-ken

@renkun-ken renkun-ken commented Jul 15, 2021

Copy link
Copy Markdown
Member

What problem did you solve?

Closes #506

This PR replaces DataTables with ag-grid in the data viewer.

(If you have)Screenshot

Kapture.2021-07-15.at.23.03.56.mp4

(If you do not have screenshot) How can I check this pull request?

View any data.frame or matrix and the data viewer will use ag-grid to present the table with the following features:

  • Sortable columns (hold shift for multi-sort)
  • Filterable columns (filter number, date, text by conditions)
  • Resizable columns
  • Movable columns
  • Pagination
  • Great performance
  • Dark theme

@danielbasso

Copy link
Copy Markdown
Contributor

Looking great! By any chance "Pagination" means dynamic loading? It would be perfect.

@renkun-ken

Copy link
Copy Markdown
Member Author

Looking great! By any chance "Pagination" means dynamic loading? It would be perfect.

It's not dynamic loading here.

@acarril acarril mentioned this pull request Jul 15, 2021
@ElianHugh

Copy link
Copy Markdown
Collaborator

Is there another setup requirement in addition to running yarn? I'm getting several errors due to missing files, e.g.:

(Error: Unable to resolve non-existing file 'vscode-remote://wsl+ubuntu-20.04/vscode-resource?{"requestResourcePath":"/home/elian/coding/VS/vscode-R/dist/resources/ag-grid-community.min.noStyle.js"}')

@renkun-ken

renkun-ken commented Jul 16, 2021

Copy link
Copy Markdown
Member Author

We need those js css resources to be copied from node_modules to dist/resources as specified in webpack.config.js. You might need to run node .github/scripts/enableWebpack.js and run.

Comment thread src/session.ts Outdated
Comment thread src/session.ts Outdated
@renkun-ken renkun-ken requested a review from ElianHugh July 19, 2021 04:01
@ElianHugh

Copy link
Copy Markdown
Collaborator

Lists and data.frames work nicely both locally and on live share! Not a must, but do you think it would be worth using some custom css to better fit the vscode theme? I threw a little css together for an example:

image
image

Otherwise, LGTM

@renkun-ken

Copy link
Copy Markdown
Member Author

Lists and data.frames work nicely both locally and on live share! Not a must, but do you think it would be worth using some custom css to better fit the vscode theme? I threw a little css together for an example:

Looks great! Would you like to provide a better css here?

- May necessitate a .css file?
Comment thread src/session.ts
Comment thread src/session.ts
@renkun-ken

Copy link
Copy Markdown
Member Author

I've done some changes to make it also work with high-contrast theme. Now everything looks good.

@renkun-ken renkun-ken merged commit 545ddd8 into REditorSupport:master Jul 20, 2021
@ElianHugh

Copy link
Copy Markdown
Collaborator

Looks good and works well, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enhance the data viewer

3 participants