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

⬆️(frontend) upgrade react-query to @tanstack/react-query #2340

Merged
merged 4 commits into from
Aug 1, 2023

Conversation

AntoLC
Copy link
Contributor

@AntoLC AntoLC commented Jul 19, 2023

Purpose

Upgrade react-query to @tanstack/react-query

Proposal

  • upgrade
  • adapt files
  • remove setLogger
  • adapt tests

Doc followed

https://tanstack.com/query/v4/docs/react/guides/migrating-to-react-query-4

@AntoLC AntoLC self-assigned this Jul 19, 2023
@AntoLC AntoLC force-pushed the feature/anthony/upgrade-react-query branch 2 times, most recently from 3516d3a to cdb0811 Compare July 20, 2023 12:38
@AntoLC AntoLC force-pushed the feature/anthony/upgrade-react-query branch 2 times, most recently from b631095 to 7118c83 Compare July 31, 2023 13:54
@AntoLC AntoLC marked this pull request as ready for review July 31, 2023 14:05
@@ -77,7 +77,6 @@ const Dashboard = () => {

let content: JSX.Element = <Fragment />;
switch (useFileDepositoryStatus) {
case 'idle':
Copy link
Member

Choose a reason for hiding this comment

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

idle does not exist anymore ? Is it replace by something else ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But yes you're right, it is replaced actually.
fixup! 🚨(frontend) react-query fix left errors

@@ -85,7 +85,7 @@ describe('<TranscriptReader />', () => {
expect(fetchMock.calls(transcript.url).length).toEqual(1),
);
// Both cues are inactive
screen.getByText('-Bonjour. Bonjour à tous.');
await screen.findByText('-Bonjour. Bonjour à tous.');
Copy link
Member

Choose a reason for hiding this comment

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

why did you replace in this commit all these getByText by findByText ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I guess the upgrade created a small state latency, getByText didn't assert.

@AntoLC AntoLC force-pushed the feature/anthony/upgrade-react-query branch from edba992 to d40ddca Compare August 1, 2023 09:04
Upgrade apps and packages to use @tanstack/react-query.
We follow this doc:
https://tanstack.com/query/v4/docs/react/guides/migrating-to-react-query-4

- rename the import name
- replace key transformation
- eslint automated fixes (prettier / order)
setLogger is not available anymore, we remove it from test files.
We add our custom logger directly in the instance of the queryClient.
- remove status idle
- adapt key transformation
- replace refetchActive by refetchType
@AntoLC AntoLC force-pushed the feature/anthony/upgrade-react-query branch from 4b3e428 to dac4863 Compare August 1, 2023 10:02
@AntoLC AntoLC enabled auto-merge (rebase) August 1, 2023 10:02
@AntoLC AntoLC merged commit 03367e3 into master Aug 1, 2023
31 checks passed
@AntoLC AntoLC deleted the feature/anthony/upgrade-react-query branch August 1, 2023 10:39
lunika added a commit that referenced this pull request Aug 29, 2023
Added

- Create a default playlist for new shibboleth user
- Add Cunningham design system (#2297)
- Lifecycle rule on source bucket to expire uploaded
  object after 21 days.
- Add P2p feature on videojs player
- Webtorrent tracker for P2P video feature
- eslint sort the modules name (#2338)
- Add retention date and s3 lifecycle rules to classroom / video
- Add a command to delete expired classrooms / videos
- Add retention duration on playlist form
- Add retention date widget to video and classroom
- Add a download-video widget directly in the video player
- Configure sentry in the webtorrent application
- Add custom frontend site management
- Manage multiple ingresses
- Manage shibboleth config per site config
- Add a shared media widget directly in the video player
- Add a transcript plugin to the video player
- Add a link to LTI resources to retrieve them in the standalone website
- Add Language Picker in the standalone website (#2366)
- Add xapi statements cache to avoid duplicate statements
- Add variable to override PVC in arnold deployment

Changed

- Upgrade frontend to React 18 (#2280)
- Upgrade to django 4.2
- `DJANGO_STATICFILES_STORAGE` environment variable is replaced by
  `DJANGO_STORAGES_STATICFILES_BACKEND`
- Use alpine for installing mediainfo in lambda docker images
- Add compatibility with docker compose 2
- tslint is replaced by eslint in lti app (#2321)
- refactor videojs id3 tags handling as videojs plugin
- refactor videojs xapi handling as videojs plugin
- upgrade react-query to @tanstack/react-query (v4) (#2340)
- Replace component SortableTable by Cunningham DataGrid (#2311)
- Replace grommet DatePicker by Cunningham DatePicker (#2359)

Fixed

- Video player reset when attributes update (#2300)
- Fix panel closing and resizing on live video player chat (#2310)
- Fix download video button when video is not downloadable
@lunika lunika mentioned this pull request Aug 29, 2023
lunika added a commit that referenced this pull request Aug 30, 2023
Added

- Create a default playlist for new shibboleth user
- Add Cunningham design system (#2297)
- Lifecycle rule on source bucket to expire uploaded
  object after 21 days.
- Add P2p feature on videojs player
- Webtorrent tracker for P2P video feature
- eslint sort the modules name (#2338)
- Add retention date and s3 lifecycle rules to classroom / video
- Add a command to delete expired classrooms / videos
- Add retention duration on playlist form
- Add retention date widget to video and classroom
- Add a download-video widget directly in the video player
- Configure sentry in the webtorrent application
- Add custom frontend site management
- Manage multiple ingresses
- Manage shibboleth config per site config
- Add a shared media widget directly in the video player
- Add a transcript plugin to the video player
- Add a link to LTI resources to retrieve them in the standalone website
- Add Language Picker in the standalone website (#2366)
- Add xapi statements cache to avoid duplicate statements
- Add variable to override PVC in arnold deployment

Changed

- Upgrade frontend to React 18 (#2280)
- Upgrade to django 4.2
- `DJANGO_STATICFILES_STORAGE` environment variable is replaced by
  `DJANGO_STORAGES_STATICFILES_BACKEND`
- Use alpine for installing mediainfo in lambda docker images
- Add compatibility with docker compose 2
- tslint is replaced by eslint in lti app (#2321)
- refactor videojs id3 tags handling as videojs plugin
- refactor videojs xapi handling as videojs plugin
- upgrade react-query to @tanstack/react-query (v4) (#2340)
- Replace component SortableTable by Cunningham DataGrid (#2311)
- Replace grommet DatePicker by Cunningham DatePicker (#2359)

Fixed

- Video player reset when attributes update (#2300)
- Fix panel closing and resizing on live video player chat (#2310)
- Fix download video button when video is not downloadable
lunika added a commit that referenced this pull request Aug 30, 2023
Added

- Create a default playlist for new shibboleth user
- Add Cunningham design system (#2297)
- Lifecycle rule on source bucket to expire uploaded
  object after 21 days.
- Add P2p feature on videojs player
- Webtorrent tracker for P2P video feature
- eslint sort the modules name (#2338)
- Add retention date and s3 lifecycle rules to classroom / video
- Add a command to delete expired classrooms / videos
- Add retention duration on playlist form
- Add retention date widget to video and classroom
- Add a download-video widget directly in the video player
- Configure sentry in the webtorrent application
- Add custom frontend site management
- Manage multiple ingresses
- Manage shibboleth config per site config
- Add a shared media widget directly in the video player
- Add a transcript plugin to the video player
- Add a link to LTI resources to retrieve them in the standalone website
- Add Language Picker in the standalone website (#2366)
- Add xapi statements cache to avoid duplicate statements
- Add variable to override PVC in arnold deployment

Changed

- Upgrade frontend to React 18 (#2280)
- Upgrade to django 4.2
- `DJANGO_STATICFILES_STORAGE` environment variable is replaced by
  `DJANGO_STORAGES_STATICFILES_BACKEND`
- Use alpine for installing mediainfo in lambda docker images
- Add compatibility with docker compose 2
- tslint is replaced by eslint in lti app (#2321)
- refactor videojs id3 tags handling as videojs plugin
- refactor videojs xapi handling as videojs plugin
- upgrade react-query to @tanstack/react-query (v4) (#2340)
- Replace component SortableTable by Cunningham DataGrid (#2311)
- Replace grommet DatePicker by Cunningham DatePicker (#2359)

Fixed

- Video player reset when attributes update (#2300)
- Fix panel closing and resizing on live video player chat (#2310)
- Fix download video button when video is not downloadable
lunika added a commit that referenced this pull request Aug 30, 2023
Added

- Create a default playlist for new shibboleth user
- Add Cunningham design system (#2297)
- Lifecycle rule on source bucket to expire uploaded
  object after 21 days.
- Add P2p feature on videojs player
- Webtorrent tracker for P2P video feature
- eslint sort the modules name (#2338)
- Add retention date and s3 lifecycle rules to classroom / video
- Add a command to delete expired classrooms / videos
- Add retention duration on playlist form
- Add retention date widget to video and classroom
- Add a download-video widget directly in the video player
- Configure sentry in the webtorrent application
- Add custom frontend site management
- Manage multiple ingresses
- Manage shibboleth config per site config
- Add a shared media widget directly in the video player
- Add a transcript plugin to the video player
- Add a link to LTI resources to retrieve them in the standalone website
- Add Language Picker in the standalone website (#2366)
- Add xapi statements cache to avoid duplicate statements
- Add variable to override PVC in arnold deployment

Changed

- Upgrade frontend to React 18 (#2280)
- Upgrade to django 4.2
- `DJANGO_STATICFILES_STORAGE` environment variable is replaced by
  `DJANGO_STORAGES_STATICFILES_BACKEND`
- Use alpine for installing mediainfo in lambda docker images
- Add compatibility with docker compose 2
- tslint is replaced by eslint in lti app (#2321)
- refactor videojs id3 tags handling as videojs plugin
- refactor videojs xapi handling as videojs plugin
- upgrade react-query to @tanstack/react-query (v4) (#2340)
- Replace component SortableTable by Cunningham DataGrid (#2311)
- Replace grommet DatePicker by Cunningham DatePicker (#2359)

Fixed

- Video player reset when attributes update (#2300)
- Fix panel closing and resizing on live video player chat (#2310)
- Fix download video button when video is not downloadable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants