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

fix: Set toolbar direction based on toolbar language #7902

Merged
merged 27 commits into from May 12, 2024

Conversation

fsbraun
Copy link
Sponsor Member

@fsbraun fsbraun commented May 2, 2024

Description

@sakhawy

This PR sets the toolbar text direction based on the toolbar language and not based on the document language.

This needs a "polyfill" to work with Chrome before 120 which is added at least in a basic version.

rtl

Related resources

  • #...
  • #...

Checklist

  • I have opened this pull request against develop-4
  • I have added or modified the tests when changing logic
  • I have followed the conventional commits guidelines to add meaningful information into the changelog
  • I have read the contribution guidelines and I have joined #workgroup-pr-review on Slack to find a “pr review buddy” who is going to review my pull request.

@fsbraun fsbraun changed the title Fix: Set toolbar direction based on toolbar language fix: Set toolbar direction based on toolbar language May 2, 2024
Copy link
Contributor

@sakhawy sakhawy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aside from the small comment, LGTM! I tested it on a <120 chrome and the rtl patch is working perfectly!

cms/static/cms/sass/components/_toolbar.scss Show resolved Hide resolved
@fsbraun
Copy link
Sponsor Member Author

fsbraun commented May 2, 2024

The patch is minimal, though. We might find places with weird layout. I'll try to add a few more lines later.

@fsbraun fsbraun requested review from sakhawy and marksweb and removed request for sakhawy May 2, 2024 15:34
@sakhawy
Copy link
Contributor

sakhawy commented May 2, 2024

Alright, I'll do some manual tests later!

@fsbraun
Copy link
Sponsor Member Author

fsbraun commented May 2, 2024

@sakhawy So, the polyfill should be complete ;-)

@fsbraun
Copy link
Sponsor Member Author

fsbraun commented May 2, 2024

Once, we have this merged, I'll chery-pick it into #7901

@fsbraun fsbraun requested a review from sakhawy May 4, 2024 07:04
@fsbraun
Copy link
Sponsor Member Author

fsbraun commented May 5, 2024

@sakhawy Can you give this a final check, so we can merge it. I would love to backport it to 3.11 and include it in 3.11.6 which I am about to release...

@fsbraun fsbraun added the 4.1 label May 8, 2024
Copy link
Contributor

@sakhawy sakhawy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested the changes on Firefox 125 and Chrome 110. I also compared it against django-cms 4.1.1. Aside from the small changes, LGTM!

cms/static/cms/sass/components/_modal.scss Show resolved Hide resolved
cms/static/cms/sass/components/_modal.scss Show resolved Hide resolved
@fsbraun
Copy link
Sponsor Member Author

fsbraun commented May 11, 2024

Well spotted, thank you!

@fsbraun
Copy link
Sponsor Member Author

fsbraun commented May 12, 2024

@sakhawy Fixed both resize cursor and missing polyfill patch. If you're good to go, let me know by approving the PR :-)

Copy link
Contributor

@sakhawy sakhawy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGMT, thanks!

cms/static/cms/sass/libs/_rtl_patch.scss Outdated Show resolved Hide resolved
Copy link
Member

@marksweb marksweb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy to approve with Moe's approval in place 👏

@fsbraun fsbraun merged commit 650f31a into django-cms:develop-4 May 12, 2024
80 checks passed
@fsbraun fsbraun deleted the fix/toolbar-language-rtl branch May 12, 2024 17:45
fsbraun added a commit to fsbraun/django-cms that referenced this pull request May 12, 2024
fsbraun added a commit that referenced this pull request May 12, 2024
…7902) (#7914)

* feat: Add RTL support to toolbar (#7871)

* feat: Add RTL support to toolbar

* fix: Add logical text-align value for toolbar dropdown

* fix: Correctly calculate available width of toolbar

* fix: Fix weird floating bug with toolbar more buttons

* feat: Add RTL support to modal header and related components (#7863)

* fix: structure board on the right for ltr

* Fix: also use key-length of 200 for the actual cache-key of placeholders

- missing "functionality" for changes of #7595 and #7657

* fix: Set toolbar direction based on toolbar language (#7902)

* Fix: Merge remnant

* Update make-release script

---------

Co-authored-by: Moe <mohammadalsakhawy@gmail.com>
Co-authored-by: Wolfgang Fehr <24782511+wfehr@users.noreply.github.com>
fsbraun added a commit to fsbraun/django-cms that referenced this pull request May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants