-
Notifications
You must be signed in to change notification settings - Fork 213
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) Locale switcher should default to user's defaultLocale or the session locale #783
Conversation
f47b707
to
e1f257c
Compare
Size Change: -2.23 MB (-44%) 🎉 Total Size: 2.84 MB
ℹ️ View Unchanged
|
Hi @ibacher @denniskigen , looking forward for your review. |
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.
Thanks @vasharma05! Couple of small things to adjust.
}, | ||
ac | ||
); | ||
postSessionLocale(newLocale, ac); |
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.
We'd still want to change the session locale if only that value changed, right?
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.
What do you recommend?
...esm-primary-navigation-app/src/components/navbar-header-panels/user-menu-panel.component.tsx
Show resolved
Hide resolved
…aultLocale in user properties on change
As I checked @ibacher , after updating the user prop defaultLocale, the session locale was the same as the defaultLocale. So, the session locale, which is same as the user defaultLocale, can be considered as a source of truth. I'll put a recording of the same. |
I guess if it works, that's great. Saves us a network request. Basically, as long as we're always reading the session locale, it should be fine. |
Hi @ibacher @denniskigen ! |
Requirements
For changes to apps
If applicable
Summary
Continuation to #757
The locale switcher was getting the session properties from the props, but props no props were passed into the component.
Screenshots
Before: Selected language is
en
but it showsam
instead.Related Issue
Other