Skip to content

Update Data viewer dependencies #1659

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

Closed
jgutman opened this issue Oct 21, 2023 · 2 comments
Closed

Update Data viewer dependencies #1659

jgutman opened this issue Oct 21, 2023 · 2 comments
Labels
area: data explorer Issues related to Data Explorer category.
Milestone

Comments

@jgutman
Copy link
Contributor

jgutman commented Oct 21, 2023

The rest of Positron uses React 18, but the dataviewer extension uses React 17. Ideally, it would be nice to have the dataviewer using the same React as the rest of the application (the dataviewer is an extension, so it has its own package.json file).

React Query also had a major update to v5 recently. This introduces some breaking changes to the API, but includes helpful bug fixes and performance improvements, and our current implementation of React Query is buggy and in need of refactoring anyway. From the docs:

v5 is currently available as a release-candidate. We don't anticipate any major API changes from here on out. We encourage you to try it out and report any issues you find.

Also react query appears to require react 18, so these 2 upgrades are closely related

@jgutman jgutman self-assigned this Oct 21, 2023
@jgutman
Copy link
Contributor Author

jgutman commented Oct 23, 2023

We are currently blocked on the upgrade to V5 of React Query.
We also are blocked on the React 18 upgrade as well

V5 removed the umd directory from the builds, and converted the module type from common JS module to ES module. This isn't a problem for production mode where we use a bundler, but in development mode, we don't have a bundler and so we have some hacks for reading in the local source files created when we build. We can't do this with react query v5, and if any other tanstack libraries do a similar change, we won't be able to upgrade them either.

I think we will ultimately have to solve this by having a bundler run in watch mode for development purposes

If there are API changes that are compatible with both v4 and v5, we can make some of those ahead of time to ease the pain of an eventual v5 upgrade if and when we do sort this out.

@juliasilge
Copy link
Contributor

juliasilge commented Oct 30, 2023

This change is more about building Positron than any specific user behavior, but I can confirm that as of build 1453 the viewer still works as expected:

viewer

@wesm wesm added the area: data explorer Issues related to Data Explorer category. label Feb 29, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: data explorer Issues related to Data Explorer category.
Projects
None yet
Development

No branches or pull requests

3 participants