bug
avatar sinahaghparast
sinahaghparast
14 Jan 2024

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

avatar sinahaghparast sinahaghparast - open - 14 Jan 2024
avatar sinahaghparast
sinahaghparast - comment - 14 Jan 2024

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.

avatar brianteeman
brianteeman - comment - 14 Jan 2024

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

avatar sinahaghparast
sinahaghparast - comment - 15 Jan 2024

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

avatar brianteeman
brianteeman - comment - 15 Jan 2024
avatar dgrammatiko
dgrammatiko - comment - 15 Jan 2024

@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');
}
}

avatar sinahaghparast
sinahaghparast - comment - 15 Jan 2024

@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...

avatar sinahaghparast
sinahaghparast - comment - 15 Jan 2024

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

avatar ReLater
ReLater - comment - 16 Jan 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.

avatar brianteeman
brianteeman - comment - 16 Jan 2024

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

avatar ReLater
ReLater - comment - 16 Jan 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.

avatar tablighdotat
tablighdotat - comment - 17 Jan 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!

avatar ReLater
ReLater - comment - 18 Jan 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.

avatar Hackwar Hackwar - change - 24 Mar 2024
Status New Closed
Closed_Date 0000-00-00 00:00:00 2024-03-24 12:21:47
Closed_By Hackwar
avatar Hackwar Hackwar - close - 24 Mar 2024
avatar Hackwar
Hackwar - comment - 24 Mar 2024

I created the PR #43133 to fix this. Please test. Since we have a PR, I'm closing this one.

avatar Hackwar Hackwar - change - 22 Nov 2024
Status Closed New
Closed_Date 2024-03-24 12:21:47
Closed_By Hackwar
avatar Hackwar Hackwar - reopen - 22 Nov 2024
avatar Hackwar
Hackwar - comment - 22 Nov 2024

The PR wasn't enough to properly fix this issue. So, opening the issue again.

avatar Hackwar Hackwar - change - 23 Nov 2024
Labels Added: bug
avatar Hackwar Hackwar - labeled - 23 Nov 2024

Add a Comment

Login with GitHub to post a comment