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

[UX] Fix RTL in the Manage blocks page #3637

Closed
shabibalm opened this issue Mar 30, 2019 · 7 comments
Closed

[UX] Fix RTL in the Manage blocks page #3637

shabibalm opened this issue Mar 30, 2019 · 7 comments

Comments

@shabibalm
Copy link

shabibalm commented Mar 30, 2019

url page admin/structure/layouts/manage/home
before
fix rtl layout admin

after
fix rtl layout admin-1

edit core\modules\layout\css\layout.admin.css

[dir="rtl"] .layout-editor-region-title .label {
  padding-right: 4px;
  padding-left: 12px;

to

[dir="rtl"] .layout-editor-region-title .label {
  float:right;	
  padding-right: 4px;
  padding-left: 12px;
}

after

.layout-editor-region-title .dropbutton-wrapper {
  float: left;
  width: 140px;
  margin: 4px 0 10px
}

add

[dir="rtl"] .layout-editor-region-title .dropbutton-wrapper {
  float: right;
}

and edit file core\misc\dropbutton.css

[dir="rtl"].js .dropbutton li,
[dir="rtl"].js .dropbutton a {
  text-align: left;
}

to

[dir="rtl"].js .dropbutton li,
[dir="rtl"].js .dropbutton a {
  text-align: right;
}

PR: backdrop/backdrop#2561

@klonos
Copy link
Member

klonos commented Mar 31, 2019

Thanks once again @shabibalm 👍 ...can you please check the PR I have filed and see if it works for you?

PS: I have made some small additions to your proposed code, and I have not included the text-align: right; for the drop buttons, as it seemed to me that they are properly aligned (the opposite of LTR).

@shabibalm
Copy link
Author

hello @klonos text-align need edit file core\misc\dropbutton.css
Here is the same problem (admin/structure/views)
fix rtl layout admin-2

@klonos
Copy link
Member

klonos commented Apr 1, 2019

Hey @shabibalm, I omitted that change intentionally, because I thought that it works as expected.

Here's how it looks in LTR (dropbutton text aligned left):

Screen Shot 2019-04-01 at 6 22 48 pm

...and here it is in RTL (dropbutton text aligned right):

Screen Shot 2019-04-01 at 6 24 01 pm

Am I missing something?

@shabibalm
Copy link
Author

hey @klonos its working fine just in the page admin/structure/layouts/manage/home
but dropbutton text aligned right need edit other pages
look
admin/structure/types
admin-structure-types

admin/structure/block
admin-structure-block

fix all pages RTL dropbutton text aligned right

edit file core\misc\dropbutton.css
[dir="rtl"].js .dropbutton li, [dir="rtl"].js .dropbutton a { text-align: left; }
to
[dir="rtl"].js .dropbutton li, [dir="rtl"].js .dropbutton a { text-align: right; }

@klonos
Copy link
Member

klonos commented Apr 1, 2019

Thanks for clarifying @shabibalm 👍 ...I have created a separate issue for this here: #3642. The reason is that changing this will affect all core + if we define text-align: right for this RTL block, then I don't see the need to have it at all, since there is a LTR block of css just before it, which defines text-align: right.

If you are happy with the rest of the changes in this PR, then please mark this as "pr - works for me", so that the fix can be included in the next bug release of Backdrop 😉

@shabibalm
Copy link
Author

thanks @klonos it's ok

@quicksketch
Copy link
Member

Merged backdrop/backdrop#2561 into 1.x and 1.12.x. Thanks @klonos and @shabibalm!

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

No branches or pull requests

4 participants