-
Notifications
You must be signed in to change notification settings - Fork 36
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
[VO-1035 & VO-1034 & VO-1036] fix(AppSections): Some fixes linked to additional apps on cozy-store #2697
Conversation
fcd06ca
to
d35fa79
Compare
* @param {object} locales - Locales sorted by lang `{ fr: {...}, en: {...} }` | ||
* @returns {void} | ||
*/ | ||
export const useExtendI18n = locales => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
l'export ici ne sert à rien, il y a déjà l'export par défaut
react/providers/I18n/translation.jsx
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
attention ici il y a un BC car on ne peut plus faire import { useExtend... } from "react/providers/i18n/translation"
... mais à vérifier dans la base de code si c'est utilisé ou non. Si non, je pense qu'on peut se passer du BC... ou alors dans le doute on ne fait pas se refacto ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
J'ai vérifié checker on l'utilise toujours via react/providers/I18n
(code) donc je pense que je vais me passer du BC
react/AppSections/Sections.jsx
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
juste pour info #1807, si jamais on trouve un cas similaire suite à ce refacto
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bien vu 👍 il faudrait peut-être corriger le titre du commit "more than once quoi ?" et ajouter un commentaire sur le commit pour expliquer le correctif
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
J'ai rajouté un commentaire pour être plus explicite
Before this commit, we used a global variable to avoid rendering too often. However, this had the disadvantage that the effects of the hook were only applicable once. Now, each application has its own state, so it's possible to extend the locales of an application several times.
The text is shortened at the same time to fit into a small space
The properties are adapted only once in the app that consumes the component, to be less specific. This is a revert of a part of the PR : #2680
d35fa79
to
9d87df2
Compare
🎉 This PR is included in version 111.13.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
No description provided.