8000 adds rtl for admin ui by edewit · Pull Request #30965 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content

adds rtl for admin ui - #30965

Merged
edewit merged 1 commit into
keycloak:mainfrom
edewit:issue-29974
Jul 23, 2024
Merged

edewit merged 1 commit into
keycloak:mainfrom
edewit:issue-29974

Conversation

@edewit
@edewit edewit commented Jul 1, 2024
Copy link
Copy Markdown
Contributor

part of: #29974

Signed-off-by: Erik Jan de Wit erikjan.dewit@gmail.com

part of: keycloak#29974

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
@edewit
edewit requested a review from a team as a code owner July 1, 2024 10:30
@edewit edewit self-assigned this Jul 1, 2024
}
});
if (RTL_LOCALES.includes(this.#me.locale)) {
document.getElementsByTagName("html")[0].setAttribute("dir", "rtl");
Copy link
Copy Markdown
Contributor

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.

Copy link
Copy Markdown
Contributor Author

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?

Copy link
Copy Markdown
Contributor

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.

Copy link
Copy Markdown
Contributor Author

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 jonkoops left a comment
Copy link
Copy Markdown
Contributor

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.

@edewit
edewit merged commit b215e64 into keycloak:main Jul 23, 2024
stianst pushed a commit to stianst/keycloak that referenced this pull request Jul 25, 2024
part of: keycloak#29974

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
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.

2 participants

0