-
Notifications
You must be signed in to change notification settings - Fork 7.9k
adds rtl for admin ui #30965
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
adds rtl for admin ui #30965
Conversation
part of: keycloak#29974 Signed-off-by: Erik Jan de Wit <[email protected]>
| } | ||
| }); | ||
| if (RTL_LOCALES.includes(this.#me.locale)) { | ||
| document.getElementsByTagName("html")[0].setAttribute("dir", "rtl"); |
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.
I believe the preferred locale is already known when index.ftl is rendered, so you could also handle this at the template level.
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.
That's not true atm, we could introduce it in the template though, but why would that be better?
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.
Ah, you are right, we only have this for the account console, but not the admin console. The benefit would be that it would be present on initial render, so the browser knows everything about the locale right away.
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.
right, but it's almost instant as this will get triggered once the user is logged in
jonkoops
left a comment
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.
LGTM, let's work on handling this consistently in all themes as a follow up.
part of: keycloak#29974 Signed-off-by: Erik Jan de Wit <[email protected]>
part of: #29974
Signed-off-by: Erik Jan de Wit [email protected]