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

[Panel] Writing direction of panel fields is based on user language not content language #6350

Closed
mlthrk opened this issue Mar 18, 2024 · 1 comment · Fixed by #6352
Closed
Assignees
Labels
type: bug 🐛 Is a bug; fixes a bug
Milestone

Comments

@mlthrk
Copy link

mlthrk commented Mar 18, 2024

Description

The content of panel fields (Text, Textarea, Writer) is not displayed in the writing direction of the selected content language. Instead, the writing direction of the selected user language is used, with the effect that 'rtl' lanugages are shown 'ltr' and vice versa, if the writing direction of the content language and of the user language do not match.

Expected behavior

Display correct writing direction for editing texts when switching content language in panel, independent of the selected user language.

To reproduce

  1. Set up languages with 'rtl' and 'ltr' writing directions.
  2. Add text content in Text, Textarea or Writer fields in both languages.
  3. Displayed writing direction does not change when switching content languages.
  4. Change user language in user account settings: writing direction of fields now matches user language writing direction.

Your setup

Kirby Version
4.1.2 (seems to have started in 3.6, though, see below)

Additional context
User vandelay decribes the problem with screenshots in the Kirby forum

@afbora afbora added the type: bug 🐛 Is a bug; fixes a bug label Mar 20, 2024
@afbora
Copy link
Member

afbora commented Mar 20, 2024

Team summary

Actually this is a regression but we can accept a bug since exists in long while.

Issue

:dir="$panel.direction" is provided from direction() method:
https://github.com/getkirby/kirby/blob/4.1.2/panel/src/panel/panel.js#L158-L160

And translation.direction is provided from user language:
https://github.com/getkirby/kirby/blob/4.1.2/src/Panel/View.php#L299-L301

Seems $direction prop doesn't work/run:
https://github.com/getkirby/kirby/blob/4.1.2/src/Panel/View.php#L149-L160

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug 🐛 Is a bug; fixes a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants