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

RTL: remaining tasks #32330

Open
10 of 20 tasks
ffoodd opened this issue Dec 4, 2020 · 33 comments
Open
10 of 20 tasks

RTL: remaining tasks #32330

ffoodd opened this issue Dec 4, 2020 · 33 comments

Comments

@ffoodd
Copy link
Member

ffoodd commented Dec 4, 2020

Mostly around cheatsheet automation.

Questions

  • Move cheatsheet from examples to main docs?
    • Allow main docs to be passed a direction in the front matter and have that automatically toggle LTR to RTL CSS inclusion
    • The above items should resolve most of this, but... De-dupe the RTL CSS once moved
    • Convert page content to Markdown
    • And Add RTL support #30980 (comment) :
      • Does our doc layout need to be converted to RTL too?
      • Or do we only embed RTL content in our current LTR doc layout?
      • What about translations, if we manage to automate cheatsheet content?
  • consider to show utilities in the cheatsheet?

Need help

Docs improvements

Chore

Personal note, as I'm getting exhausted by all those naming/aliasing/restoring utilities discussions:

  • fork v5 personally and simply add some $utilities override to provide a solid and oldish v5 using v4 utilities (and dropping RTL support).
@FaridAghili
Copy link

FaridAghili commented Dec 4, 2020

#32327

Great job, noticed this issues so far.

@XhmikosR XhmikosR changed the title RTL: remaining tasks for Beta 2 RTL: remaining tasks Dec 4, 2020
@XhmikosR XhmikosR added this to Inbox in v5.0.0-beta2 via automation Dec 4, 2020
@XhmikosR XhmikosR moved this from Inbox to TODO in v5.0.0-beta2 Dec 4, 2020
@XhmikosR XhmikosR mentioned this issue Dec 7, 2020
3 tasks
@pau1phi11ips
Copy link

Is there a discussion somewhere for the huge amount of work it's going to add to migrations changing l/r to s/e?

@ffoodd
Copy link
Member Author

ffoodd commented Dec 9, 2020

@pau1phi11ips You may open a discussion if you need; regarding migration, I'd suggest you have a look at our migration guide.

@pau1phi11ips
Copy link

I've checked out the migration guide. Moving from 4 to 5 didn't look like it's be that much work until the left/right to start/end bombshell. I was just surprised I couldn't find any existing discussions on the change.

@FaridAghili
Copy link

It's still not much work as a couple of find/replace commands will do the work.

It's a huge step forward to support RTL languages since many modern UI frameworks have support for it, it worth the effort.

@ffoodd
Copy link
Member Author

ffoodd commented Dec 9, 2020

Well @pau1phi11ips, the PR itself is probably the biggest discussed PR in Bootstrap history, and its description links to dozens of previous discussions—with the latest one #30918 helping to choose the way we wanted to implement RTL. It's been announced several times on Twitter and on our blog (in our alpha releases announcements).

I don't know what more we could've done, but any suggestion is welcome since we can improve our docs and communication before we hit stable release, to prevent anyone from being surprised like you were.

This is a major release because of those breaking changes. And as @FaridAghili said, changes are 1:1 for class names, so it's really straightforward.

@pau1phi11ips
Copy link

Thanks for the links @ffoodd, that's what I was after in the first place. Sorry I missed the news about this before.

I appreciate having RTL support is good for Bootstrap. Just not sure it's method is the best for what must be over 95% of current Bootstrap 4 users. Maybe memories of updating all our frontend pages from Bootstrap 3 to 4 is making me react more severely to breaking changes in 4 to 5 though 😏 Migrating Bootstrap 3 to 4 took frickin' ages to complete.

@arafalov
Copy link

arafalov commented Dec 9, 2020

Is it fair to say that the RTL approach chosen is all or nothing? Is it possible to have a website (e.g. CMS-generated) where an article or slideshow content in English is mixed with another in Arabic?
I did not dig into this super deep, but the initial documentation seems to indicate that. And, in cheatsheet, I did not see things like bdi element and I did see related issues with elements like "...browse" because of neutral nature of "." character in native input elements.

This may be quite important limitation to help people understand what is actually possible. Mixed content is a messy reality for multilingual organizations, so if you have position (or workarounds or even just thoughts), it would be great to know.

@ffoodd
Copy link
Member Author

ffoodd commented Dec 11, 2020

@arafalov You're right, our approach (currently) is to have two separate files: one for LTR and one for RTL—meaning you can't use both at the same time. And it seems legit since your document has a main language.

However everything still works, so regarding mixed contents you'd do like you did before: using our utilities to layout things (and dir & lang attributes, obviously). We may add a dedicated example with mixed contents, that could help?

My hope is that logical properties will eventually be supported enough when we'll start v6, so that we drop RTLCSS and separate files. That would solve the mixed content case :)

BTW, are you aware of any tool or framework that handles mixed languages contents in another way? Every source and inspiration is good to know.

@ffoodd ffoodd mentioned this issue Dec 11, 2020
3 tasks
@arafalov
Copy link

@ffoodd Thank you for the clarification. Yes, I think a dedicated example with mixed content would really help. The bidi is a hard topic, so extra level of clarification early on and demo examples would really simply developers' life and understanding the level of built-in/additional support/effort required.

I am not aware of any other framework doing this better, unfortunately. Drupal does try to support mixed languages content, but that probably does not qualify as framework.

@XhmikosR XhmikosR added this to Inbox in v5.0.0-beta3 via automation Dec 14, 2020
@XhmikosR XhmikosR moved this from Inbox to TODO in v5.0.0-beta3 Dec 14, 2020
@ffoodd
Copy link
Member Author

ffoodd commented Jan 4, 2021

@omoridi What issue are you solving? Please open a pull request if you have any patch to submit.

@omoridi
Copy link

omoridi commented Jan 4, 2021

Hi, why this block is remarked in rtl file?

/* rtl:raw:
[type="tel"],
[type="url"],
[type="email"],
[type="number"] {
direction: ltr;
}
*/

always these must be ltr

@ffoodd
Copy link
Member Author

ffoodd commented Jan 5, 2021

@omoridi And this is exactly what it does: ensure direction is ltr even in RTL file. Could you please read our docs, RTLCSS' one and check our RTL cheatsheet example? That way you'll see what's the real result.

@omoridi
Copy link

omoridi commented Jan 7, 2021

@omoridi And this is exactly what it does: ensure direction is ltr even in RTL file. Could you please read our docs, RTLCSS' one and check our RTL cheatsheet example? That way you'll see what's the real result.

Hi, excuse me for late answering,
I write a simple application with .net core, that's convert bootstrap.rtl.css to another file.
why? because!
1- You can have rtl and ltr bootstrap objects at same time on the one page!
2- The rtl file too simple and small.
.rtl dd { margin-right: 0; }
3- every where if you like you can use rtl class as class='rtl' in body, in div or anywhere else.

I test it, it's okay but, some class must be changed in main bootstrap,
where? like you set margin-left and rtlcss changed to marign-right and my simpler application only used marign-right and div have to class margin-left:some value and margin-right:same value.
if main bootstrap we must set both value or add some fixer class to fixed that issue.

so what we can? i try to fixed on bootstrap or add helper class for rtl?
if you want the rtl sample css, let me say or wait to completed.

@ffoodd
Copy link
Member Author

ffoodd commented Jan 7, 2021

@omoridi If I understand correctly, you'd need bidi stylesheets, not simply RTL and LTR side-by-side. This is not what we've done currently—and it's explained in another issue's comment. You're the one who opened the said issue, I answered with a precise code sample and solution.

I even added to the current tasks list an item to document this solution—so please consider answering in your previous issue because for now we're only polluting this one.

@aqeelat
Copy link
Contributor

aqeelat commented Feb 19, 2021

Converting Markdown to HTML should surround rtl text with a <bdi dir="rtl"> tag

XhmikosR added a commit that referenced this issue Feb 22, 2021
Fixes a bug mentionned in [#32330](#32330 (comment)).

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
@ffoodd
Copy link
Member Author

ffoodd commented Feb 22, 2021

@aqeelat I'm not sure to understand your last comment, would you have an example where surrounding would be mandatory?

@aqeelat
Copy link
Contributor

aqeelat commented Feb 22, 2021

@ffoodd For some weird reason, RTL text is arranged from left to right, and then displayed as such. Imagine it this way:
the sentence: "hello world" becomes "dlrow olleh" and then written in cursive in this order.

This explains it.
link to the page.
https://imgur.com/0yNj9n6.png

@ffoodd
Copy link
Member Author

ffoodd commented Feb 23, 2021

Wow @aqeelat thanks for finding this, I had no idea! Need to check if Hugo allows some tweaks for such cases, but I'll add this to the to-do list.

Thanks again for your contributions, I'm learning a lot ❤️

@omoridi
Copy link

omoridi commented Feb 23, 2021

Dir is not good idea!
if you want to support right direction use start end properties not left and right.
but this is have an issue chrome version 89 and above support it firefox version 66 and above other browser do not support.
https://developer.mozilla.org/en-US/docs/Web/CSS/border-end-end-radius

but I like this and I will use it.

@XhmikosR XhmikosR added this to Inbox in v5.0.0 via automation Mar 23, 2021
@XhmikosR XhmikosR removed this from TODO in v5.0.0-beta3 Mar 23, 2021
@XhmikosR XhmikosR moved this from Inbox to TODO in v5.0.0 Mar 23, 2021
@mdo mdo added this to Inbox in v5.0.1 via automation May 5, 2021
@XhmikosR XhmikosR moved this from Inbox to TODO in v5.0.1 May 5, 2021
@XhmikosR XhmikosR removed this from TODO in v5.0.1 May 13, 2021
@XhmikosR XhmikosR added this to Inbox in v5.0.2 via automation May 13, 2021
@XhmikosR XhmikosR moved this from Inbox to TODO in v5.0.2 May 13, 2021
@SafaAlfulaij
Copy link

Bug: Offcanvas close button doesn't switch place:

margin: ($offcanvas-padding-y / -2) ($offcanvas-padding-x / -2) ($offcanvas-padding-y / -2) auto;

@ffoodd
Copy link
Member Author

ffoodd commented Jun 14, 2021

@SafaAlfulaij Would you mind opening a dedicated issue, please? This one is more docs related now. Thanks!

@XhmikosR XhmikosR removed this from TODO in v5.0.2 Jun 22, 2021
@XhmikosR XhmikosR added this to TODO in v5.1.0 via automation Jun 22, 2021
@mdo mdo removed this from TODO in v5.1.0 Aug 4, 2021
@mdo mdo added this to To do in v5.1.1 via automation Aug 4, 2021
@mdo mdo removed this from To do in v5.1.1 Sep 7, 2021
@XhmikosR XhmikosR added this to To do in v5.2.0 Sep 7, 2021
@mdo mdo added this to To do in v5.2.0-stable via automation May 13, 2022
@mdo mdo removed this from To do in v5.2.0 May 13, 2022
@WEBPerformace
Copy link

My hope is that logical properties will eventually be supported enough when we'll start v6, so that we drop RTLCSS and separate files. That would solve the mixed content case :)

Hey hey! Hello from the future! Today logical properties are supported widely enough to finally consider this question! 😉

https://caniuse.com/css-logical-props

@aqeelat
Copy link
Contributor

aqeelat commented May 12, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
v5.0.0
  
TODO
v5.0.0-beta2
  
TODO
v5.2.0-stable
  
To do
Status: To do
Development

No branches or pull requests

9 participants