? Pending

User tests: Successful: Unsuccessful:

avatar impressionestudio
impressionestudio
26 Dec 2021

Pull Request for Issue #35342.

Summary of Changes

The proposed changes affect the class names that relate to an article. The purpose is to have simple, short and easy to remember class names in order to create more complex article layouts in an easier way (with the help of a few changes that I will also propose for custom fields).

Specifically:

Notes:

  • Personally, I would not suggest keeping the old and not useful classes, but some guys want backward compatibility.
  • Some guys recommended to use BEM for naming the classes and initially I was using BEM in the proposed changes. But I cancelled using BEM because I don't find it useful. Using BEM, the class names would remain complex and very long.
    Also, I think that BEM changed a little some of the naming rules and I think that there are some inconsistencies in the documentation. For example, the class "search-form__button_size_m" should be "search-form__button_size-m".

For many years, I create websites having high quality templates from scratch (only with Joomla of course) and I don't use purchased templates. So I have faced many cases and requirements and I believe that the proposed changes make things way much better.

avatar impressionestudio impressionestudio - open - 26 Dec 2021
avatar impressionestudio impressionestudio - change - 26 Dec 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 26 Dec 2021
Category Front End com_content
avatar impressionestudio impressionestudio - change - 26 Dec 2021
Labels Added: ?
avatar impressionestudio impressionestudio - change - 26 Dec 2021
The description was changed
avatar impressionestudio impressionestudio - edited - 26 Dec 2021
avatar impressionestudio impressionestudio - change - 26 Dec 2021
The description was changed
avatar impressionestudio impressionestudio - edited - 26 Dec 2021
avatar impressionestudio impressionestudio - change - 26 Dec 2021
The description was changed
avatar impressionestudio impressionestudio - edited - 26 Dec 2021
avatar impressionestudio impressionestudio - change - 26 Dec 2021
Title
Simple class names in articles (1)
Simple class names in articles (1 - default.php)
avatar impressionestudio impressionestudio - edited - 26 Dec 2021
avatar joomla-cms-bot joomla-cms-bot - change - 26 Dec 2021
Category Front End com_content Front End com_content Layout
avatar impressionestudio impressionestudio - change - 26 Dec 2021
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2021-12-26 13:33:51
Closed_By impressionestudio
avatar impressionestudio impressionestudio - close - 26 Dec 2021
avatar impressionestudio impressionestudio - change - 26 Dec 2021
Title
Simple class names in articles (1 - default.php)
Simple class names in articles
avatar impressionestudio impressionestudio - edited - 26 Dec 2021
avatar impressionestudio impressionestudio - change - 26 Dec 2021
The description was changed
avatar impressionestudio impressionestudio - edited - 26 Dec 2021
avatar impressionestudio impressionestudio - change - 26 Dec 2021
The description was changed
avatar impressionestudio impressionestudio - edited - 26 Dec 2021
avatar brianteeman
brianteeman - comment - 26 Dec 2021

using the two classes will create confusion and not provide the backwards compatibility you expect. The pipe character does not do anything. Both classes are applied

image

avatar impressionestudio
impressionestudio - comment - 26 Dec 2021

I know both classes are applied. That is the purpose. The pipe is there only to separate the new classes from the old ones (or deprecated) without the need of a documentation. The point is for developers to know the meaning of the pipe and to start using the classes before the pipe and ignore the classes after it. Adding many classes does not mean that all will apply a style to the element. The template will decide which one will use. Of course, at the beginning, the already created templates (like Cassiopeia) will keep using the classes after the pipe but as they update they will use the classes before the pipe.

avatar brianteeman
brianteeman - comment - 26 Dec 2021

Why would they even bother. Seems to me that the only reason for this change is to satisfy your own personal design ideas and as had been said by many people before - that is why we have template overrides.

avatar impressionestudio
impressionestudio - comment - 26 Dec 2021

Actually, the changes I suggest are not only different class names. There are many cases where classes do not exist at all, or even more, there are no tags for adding the class. For example, in the info block, there are parts that need special css tricks in order to modify. I guess your answer will be still the same: "override the template", but I keep facing these disadvantages so often and I don't feel good to see the new Joomla 4 to continue having these disadvantages. It is like having a Ferrari engine inside a white old car of 80s. Furthermore, the overrides are good for special needs and not for everyday styling and also for not so many files.

All I want is to propose something that I consider good for Joomla. If the rest Joomlers don't agree, then at least I will have tried for what I believe is better for Joomla.

avatar brianteeman
brianteeman - comment - 26 Dec 2021

I dont understand why you dont want to use the tools provided - template overrides?
Nor do I see any advantages of these changes? The only changes proposed here are renaming

avatar impressionestudio
impressionestudio - comment - 26 Dec 2021

What I understand from your side is that you don't want some random strangers (like me) to suggest crazy ideas and ruin Joomla. I agree with that. But on the other hand, who would come here to use this Github thing and mess with the code of many files and spend time if at least it was not for serious reason?

avatar brianteeman
brianteeman - comment - 26 Dec 2021

But you dont explain the reasons

avatar impressionestudio
impressionestudio - comment - 27 Dec 2021

Here are some reasons:

  1. Joomla 4 is a general improvement of Joomla 3. Why an improvement to the HTML code (including some bad class names, some missing classes and some missing tags) not to be included in this improvement?
  2. When I create a simple website that doesn't need overriding but simple CSS styling, I don't want to see these inconsistent classes like: com-content-article__body, page-header, item-image, article-info... Sometimes it is article, sometimes it is page, sometimes it is item!
  3. I believe that overrides are for special and hard cases and I have done overrides many times with great result and satisfaction. But I don't want to create permanent overrides on maybe 15 files just for using them in a simple website. I would like the new version of Joomla to provide the basic needs.
  4. Finally, how can I be sure that during all these years of Joomla 4 life, there will be no code change/upgrade to all these overridden files? I want the override to be an exception, so the other files to keep upgrading.

Add a Comment

Login with GitHub to post a comment