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

fix(deps): update and pin react-i18next to 14.0.2 #7364

Merged
merged 1 commit into from
Aug 13, 2024

Conversation

runeb
Copy link
Member

@runeb runeb commented Aug 13, 2024

Description

Our dependency for translations, react-i18next has an open performance regression caused by multiple re-renders from useTranslation

i18next/react-i18next#1756

As one maintainer mentiones, this issue was fixed in version 14.0.2 of that library, a fix they later rolled back because it broke changing of languages at runtime:
i18next/react-i18next#1756 (comment)

Since we currently do not support changing languages, I suggest we pin to 14.0.2 until the library is fixed properly in more current versions.

What to review

That the version we upgraded to is still compatible with the way we use their API. They seem to bump major versions for fixes and type changes.

https://github.com/i18next/react-i18next/blob/master/CHANGELOG.md

Testing

I manually profiled the application and found that random re-renders due to useTranslation hook were not present in the same way they were before this version change.

Notes for release

Pin react-i18next to version 14.0.2 to address potential performance regression in that library

@runeb runeb requested a review from a team as a code owner August 13, 2024 01:00
@runeb runeb requested review from ricokahler and removed request for a team August 13, 2024 01:00
Copy link

vercel bot commented Aug 13, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
page-building-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 13, 2024 1:01am
performance-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 13, 2024 1:01am
test-compiled-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 13, 2024 1:01am
test-next-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 13, 2024 1:01am
test-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 13, 2024 1:01am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
studio-workshop ⬜️ Ignored (Inspect) Aug 13, 2024 1:01am

@runeb runeb changed the title fix(core): Update react-i18next to 14.0.2 fix(core): Update and pin react-i18next to 14.0.2 Aug 13, 2024
Copy link
Contributor

No changes to documentation

Copy link

New dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/react-i18next@14.0.2 None +3 638 kB adrai

View full report↗︎

Copy link
Contributor

Component Testing Report Updated Aug 13, 2024 1:17 AM (UTC)

File Status Duration Passed Skipped Failed
comments/CommentInput.spec.tsx ✅ Passed (Inspect) 45s 15 0 0
formBuilder/ArrayInput.spec.tsx ✅ Passed (Inspect) 9s 3 0 0
formBuilder/inputs/PortableText/Annotations.spec.tsx ✅ Passed (Inspect) 30s 6 0 0
formBuilder/inputs/PortableText/copyPaste/CopyPaste.spec.tsx ✅ Passed (Inspect) 36s 11 7 0
formBuilder/inputs/PortableText/copyPaste/CopyPasteFields.spec.tsx ✅ Passed (Inspect) 0s 0 12 0
formBuilder/inputs/PortableText/Decorators.spec.tsx ✅ Passed (Inspect) 17s 6 0 0
formBuilder/inputs/PortableText/DisableFocusAndUnset.spec.tsx ✅ Passed (Inspect) 10s 3 0 0
formBuilder/inputs/PortableText/DragAndDrop.spec.tsx ✅ Passed (Inspect) 3m 0s 0 0 0
formBuilder/inputs/PortableText/FocusTracking.spec.tsx ✅ Passed (Inspect) 44s 15 0 0
formBuilder/inputs/PortableText/Input.spec.tsx ✅ Passed (Inspect) 1m 47s 21 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 1m 14s 18 0 0
formBuilder/inputs/PortableText/PresenceCursors.spec.tsx ✅ Passed (Inspect) 8s 3 9 0
formBuilder/inputs/PortableText/RangeDecoration.spec.tsx ✅ Passed (Inspect) 25s 9 0 0
formBuilder/inputs/PortableText/Styles.spec.tsx ✅ Passed (Inspect) 18s 6 0 0
formBuilder/inputs/PortableText/Toolbar.spec.tsx ❌ Failed (Inspect) 1m 23s 20 0 1
formBuilder/tree-editing/TreeEditing.spec.tsx ✅ Passed (Inspect) 1m 48s 30 0 0
formBuilder/tree-editing/TreeEditingNestedObjects.spec.tsx ✅ Passed (Inspect) 19s 3 0 0

@rexxars rexxars changed the title fix(core): Update and pin react-i18next to 14.0.2 fix(deps): update and pin react-i18next to 14.0.2 Aug 13, 2024
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