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

Use ag-grid in data viewer #708

Merged
merged 23 commits into from
Jul 20, 2021
Merged

Conversation

renkun-ken
Copy link
Member

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

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
Contributor

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

@renkun-ken
Copy link
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
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
Copy link
Member Author

renkun-ken commented Jul 16, 2021

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.

src/session.ts Outdated Show resolved Hide resolved
src/session.ts Outdated Show resolved Hide resolved
@renkun-ken renkun-ken requested a review from ElianHugh July 19, 2021 04:01
@ElianHugh
Copy link
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
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?
@renkun-ken
Copy link
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
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