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

[VO-1035 & VO-1034 & VO-1036] fix(AppSections): Some fixes linked to additional apps on cozy-store #2697

Merged
merged 7 commits into from
Sep 25, 2024

Conversation

cballevre
Copy link
Contributor

No description provided.

@cballevre cballevre requested a review from JF-Cozy September 23, 2024 16:03
@cballevre cballevre changed the title fix(AppSections): A few fixes linked to the alternative store [] fix(AppSections): A few fixes linked to the alternative store Sep 23, 2024
@cballevre cballevre changed the title [] fix(AppSections): A few fixes linked to the alternative store [VO-1035 & ] fix(AppSections): A few fixes linked to the alternative store Sep 23, 2024
@cballevre cballevre changed the title [VO-1035 & ] fix(AppSections): A few fixes linked to the alternative store [VO-1035 & VO-1034 &] fix(AppSections): A few fixes linked to the alternative store Sep 23, 2024
@cballevre cballevre changed the title [VO-1035 & VO-1034 &] fix(AppSections): A few fixes linked to the alternative store [VO-1035 & VO-1034 & VO-1036] fix(AppSections): A few fixes linked to the alternative store Sep 23, 2024
@cballevre cballevre changed the title [VO-1035 & VO-1034 & VO-1036] fix(AppSections): A few fixes linked to the alternative store [VO-1035 & VO-1034 & VO-1036] fix(AppSections): A few fixes linked to additional apps on cozy-store Sep 23, 2024
@cballevre cballevre changed the title [VO-1035 & VO-1034 & VO-1036] fix(AppSections): A few fixes linked to additional apps on cozy-store [VO-1035 & VO-1034 & VO-1036] fix(AppSections): Some fixes linked to additional apps on cozy-store Sep 23, 2024
@cballevre cballevre force-pushed the fix/additional-apps-in-app-section branch from fcd06ca to d35fa79 Compare September 23, 2024 16:31
@JF-Cozy
Copy link
Collaborator

JF-Cozy commented Sep 24, 2024

j'ai pas review je me suis arrêté à Argos, à mon avis on a un souci :D
image

ah non mince ma faute, j'ai lu Argos à l'envers 🤦

* @param {object} locales - Locales sorted by lang `{ fr: {...}, en: {...} }`
* @returns {void}
*/
export const useExtendI18n = locales => {
Copy link
Collaborator

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

Copy link
Collaborator

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 ;)

Copy link
Contributor Author

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

Copy link
Collaborator

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

Copy link
Collaborator

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

Copy link
Contributor Author

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
@cballevre cballevre force-pushed the fix/additional-apps-in-app-section branch from d35fa79 to 9d87df2 Compare September 25, 2024 12:47
@cballevre cballevre merged commit ff428f8 into master Sep 25, 2024
12 checks passed
@cballevre cballevre deleted the fix/additional-apps-in-app-section branch September 25, 2024 12:59
@cozy-bot
Copy link

🎉 This PR is included in version 111.13.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants