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

bootstrap.rtl.min.css FORGOTTEN #42653

Open
sinahaghparast opened this issue Jan 14, 2024 · 12 comments
Open

bootstrap.rtl.min.css FORGOTTEN #42653

sinahaghparast opened this issue Jan 14, 2024 · 12 comments

Comments

@sinahaghparast
Copy link

What needs to be fixed

bootstrap RTL version not exist in
/media/vendor/bootstrap/css
/media/vendor/bootstrap/scss
/media/vendor/joomla.asset.json

bootstrap.rtl.min.css not exist

Why this should be fixed

https://getbootstrap.com/docs/5.3/getting-started/rtl/

How would you fix it

please locate rtl version bootstrap in joomla!

Side Effects expected

@sinahaghparast
Copy link
Author

I suggest that the default templates (cassiopeia / atum) should also use the original bootstrap and provide another item in joomla.asset.json to customize the colors.

@brianteeman
Copy link
Contributor

No not forgotten at all. I suggest that you look more closely at the code before posting. Joomla works perfectly in RTL and LTR

@sinahaghparast
Copy link
Author

I suggest that instead of sending such a message, introduce the relevant file. Make it clear so that this page can be useful to other developers as well.
I am sincerely thankful

@brianteeman
Copy link
Contributor

#38412

@dgrammatiko
Copy link
Contributor

@brianteeman they talk about the ancient HTMLHelper:

public static function loadCss($includeMainCss = true, $direction = 'ltr', $attribs = []): void
{
// Load Bootstrap main CSS
if ($includeMainCss) {
Factory::getDocument()->getWebAssetManager()->useStyle('bootstrap.css');
}
}

@sinahaghparast
Copy link
Author

@brianteeman
@dgrammatiko
I said /media/vendor folder but you show me /template folder...
the /media/vendor/ folder MUST be original version of bootstrap... and the original version of bootstrap is here...RTL
for RTL bootstrap has separate files that name file contain .rtl.

When you download Bootstrap zip file from official site, you have some files...
I hope you add all of them to Vendor folder. Add these file in /media/vendor/bootstrap folder.

please imagine that you will add similar bootstrap toolkit to vendor folder... So I need original that project...

FOR EXAMPLE
I want load bootstrap via WebAssetManager and Registered Assets...
So what I type in code?
I want use bootstrap located in vendor folder...
in /media/vendor/joomla.asset.json
bootstrap defined... but NOT RTL...
ok... when I want load bootstrap RTL from vendor I can't... and I MUST load manually...

the best is:
$wa->useStyle('bootstrap') for LTR
$wa->useStyle('bootstrap.rtl') for RTL

Bootstrap version 5 support RTL but Joomla/media/vendor NOT SUPPORT RTL...
Really bootstrap in Joomla is NOT REAL...

@sinahaghparast
Copy link
Author

when use
Bootstrap::loadCss();
OR
Bootstrap::loadCss(true, 'rtl');
finally... it is EQUAL... NO different...

@ReLater
Copy link
Contributor

ReLater commented Jan 16, 2024

@sinahaghparast is right. The .rtl.css files of bootstrap are not copied during Joomla build procedure (npm install).

From my point of view it is "simple" to add them.

See: https://github.com/joomla/joomla-cms/blob/5.0.2/build/build-modules-js/settings.json#L44-L52 rtl files are missing there.

And it would be nice to have an additional WAM asset for loading: See provideAssets https://github.com/joomla/joomla-cms/blob/5.0.2/build/build-modules-js/settings.json#L62-L75

Afterwards it's trivial to fix the HTMLHelper thing by using the rtl WAM asset.

@brianteeman
Copy link
Contributor

From my point of view it is "simple" to add them.

Please submit a pull request but not for changing anything with the existing templates as they are correct

@ReLater
Copy link
Contributor

ReLater commented Jan 16, 2024

Please submit a pull request but not for changing anything with the existing templates as they are correct

The steps are just copy/paste steps with no influence on any compilation (SCSS or so). They just add some files into vendor/bootstrap/css and new assets in media/vendor/joomla.asset.json.

Please submit a pull request

Really sorry but I won't. I have just tested quickly that my proposal could/should work.

@tablighdotat
Copy link

tablighdotat commented Jan 17, 2024

I understand that in the development process, changes even though band modifications may require time and energy.

However, the mentioned case is logical and correct and is suggested as a user who is developing in the Joomla community.

It is encouraging if we show new friends the right path in Joomla development and modifications and support their logical cases, so that they can also be accompanied as future Joomla developers...


@sinahaghparast
I suggest that you officially apply to be a member of the Joomla development team (volunteer), and as a developer from the RTL community, find out and present the things that you can amend yourself so that they can be used optimally. It is natural that if we do not have the challenge of RTL and if we are not users of RTL, the necessity of its modifications is not bold for us!

@ReLater
Copy link
Contributor

ReLater commented Jan 18, 2024

From my point of view any of these files should be copied during build procedure into /medie/vendor/bootstrap/css/:

https://github.com/twbs/bootstrap/tree/v5.3.2/dist/css

and any *.css of them should get a WAM asset in /media/vendor/joomla.asset.json. Then it can be easily loaded via Web Asset Manager if there is no HTMLHelper method for it. And/or can be overriden and/or...

Now for example these questions come up when I look at https://github.com/joomla/joomla-cms/blob/5.0.2/build/build-modules-js/settings.json#L44-L52 (and following lines there):

  • why do we copy "dist/css/bootstrap-reboot.css" but have no asset for it?
  • why do we not copy dist/css/bootstrap-utilities.css which could be more helpful for some users than the reboot css?

Is it inconsistency or by purpose? Or was it just never adjusted?

A pr will end in one of these endless and annoying discussions and when the pr is RTC (which needs some testers) somebody will block/move it because of this or that.

It should be clear in advance what the goal is.

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

No branches or pull requests

5 participants