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

Feat/#2123 upgrade dependencies client #2173

Merged
merged 39 commits into from
Jul 22, 2024

Conversation

kaaloo
Copy link
Contributor

@kaaloo kaaloo commented Jul 10, 2024

Sorry this is a big PR. Was originally going to split up into separate PRs but combined to get dependency upgrade done and move on to other work. Commits take this step by step and are a good source of information on the issues involved.

  • upgrade all client patch dependencies
  • major styledcomponents upgrade and update codebase by typing calls to styled.div and updating all test snapshots. Notice styledcomponents v6 no longer supports vendor prefixes by default since no longer required in modern browsers
  • major lexical upgrade and update of codebase use of deprecated api which is now removed
  • major upgrade of i18next related dependencies and update of codebase where two parameter call of the t function now requires three parameters, the key, default value and options.
  • major upgrade of redux related dependencies
  • majore upgrade of axios and typing issue fix
  • major typescript upgrade and fix for typing issue
  • fix linting issues related to scss modules in vscode
  • major upgrade of testing library dependencies
  • move to @testing-library from react-test-renderer
  • update snapshots

Remaining Major Dependency Upgrades:

Copy link
Collaborator

@revolunet revolunet left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@matthieu-fesselier matthieu-fesselier left a comment

Choose a reason for hiding this comment

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

Indeed this is a big one! This is almost all good to me.
I noticed a few bugs and added some comments in the PR.

I agree that we should use the next router for the backoffice. This was the plan but still not done because we could not find the time for it

client/src/__tests__/__snapshots__/index.test.tsx.snap Outdated Show resolved Hide resolved
@@ -84,7 +84,7 @@ const UserContributions = (props: Props) => {
);
}
window.scrollTo(0, 0);
}, [dispatch]);
}, [dispatch, userStructure]);
Copy link
Collaborator

Choose a reason for hiding this comment

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

It seems that this one is causing an infinite loop which fetch data all the time (this is probably more a bug in the code of the effect)
You can experience it by going in the backoffice, in the "Fiches" tab

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 can't reproduce this 🤔 I checked the Network tab in developer tools and it just get's the data once (twice because running in dev mode actually)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ok maybe something wrong with my local db. Let's try it on staging then!

@@ -56,7 +56,7 @@ export const UserStructureComponent = (props: Props) => {
);
}
window.scrollTo(0, 0);
}, [dispatch]);
}, [dispatch, userStructure]);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Like for the userContributions, this is causing an infinite loop.
You can see it by going to the Structure tab of the backoffice (you need to be a user with a structure for this)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Again I can't reproduce this locally.

client/package.json Show resolved Hide resolved
@kaaloo kaaloo merged commit 5ced926 into dev Jul 22, 2024
1 check passed
@kaaloo kaaloo deleted the feat/#2123-Upgrade-Dependencies-client branch July 22, 2024 09:35
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.

3 participants