Problem/Motivation

While I was dealing with #2560231: Replace a class in forum-list.html.twig with a BEM class. I noticed that all but the first cell of the forum list table use the .forum__[element] naming convention. The first cell has the class .forum-list__forum which differs from its siblings naming pattern.

Proposed resolution

Add the .forum__info class to Classy's template to replace .forum-list__forum . Check that no other CSS exists styles the forum name with the current selector in HEAD.

Remaining tasks

User interface changes

none

API changes

none

Data model changes

none

Beta phase evaluation

Reference: https://www.drupal.org/core/beta-changes
Issue category Task because it does not creates visual issues.
Issue priority Not critical because the forum functions fine.
Unfrozen changes Unfrozen because it only changes markup
Prioritized changes The main goal of this issue is to make coherent the class names of a component in Core.
Disruption Non-disruptive it fixes a DX issue.
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

thamas created an issue. See original summary.

thamas’s picture

Issue summary: View changes
thamas’s picture

Here is the patch.

thamas’s picture

Status: Active » Needs review
thamas’s picture

I did not find any CSS that themes the forum with the current class of .forum-list__forum anywhere in Core.

csakiistvan’s picture

It works, thx

LewisNyman’s picture

Status: Needs review » Needs work

I'm not sure about this, because the this element doesn't contain the forum info. It contains the entire forum. Is that right? That's why it's described as a forum inside a forum-list

thamas’s picture

@LewisNyman The element is the first cell in a table row in which all cells contain information about the same forum. The cells ar siblings in html and their content also related. The only difference that the first cell has some divs in it. These are the icon, the name and the discription of the forum which is information about the forum--this is the source of my name suggestion. Of course the other cells also contain info about the forum so if you have a better name suggestion feel free to add it.

Otherwise the tr and table elements have different names also so we could have a longer discussion about if we have only one component with elements inside it or we have a component with other components in it.

Drupal 8 forum screenshot

I'm sure that the current naming is not OK.

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Vidushi Mehta’s picture

Adding a patch

Vidushi Mehta’s picture

Status: Needs work » Needs review

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.8.x-dev

Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.2.x-dev

Drupal 8 is end-of-life as of November 17, 2021. There will not be further changes made to Drupal 8. Bugfixes are now made to the 9.3.x and higher branches only. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.15 was released on June 1st, 2022 and is the final full bugfix release for the Drupal 9.3.x series. Drupal 9.3.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.4.x-dev branch from now on, and new development or disruptive changes should be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

smustgrave’s picture

Component: Classy theme » Claro theme
Status: Needs review » Needs work

classy has been removed in D10 but this could apply to claro theme also which may need some work.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.9 was released on December 7, 2022 and is the final full bugfix release for the Drupal 9.4.x series. Drupal 9.4.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.5.x-dev branch from now on, and new development or disruptive changes should be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Nitin shrivastava’s picture

Suresh Prabhu Parkala’s picture

Status: Needs work » Needs review
FileSize
1.18 KB
444 bytes

Tried to fix the CCF issues of patch from #24. Please review!

Status: Needs review » Needs work

The last submitted patch, 25: 2568457-25.patch, failed testing. View results

smustgrave’s picture

Version: 9.5.x-dev » 10.1.x-dev
Issue tags: +Needs change record

Also tagging for change record.

smustgrave’s picture

Issue tags: -Needs change record +Novice

+ * {@inheritDoc}
Out of scope

Added a change record

Tagging for novice as the reroll should be simple.

lucassc’s picture

Status: Needs work » Needs review
FileSize
615 bytes

reroll for 10.1.x

sahilgidwani’s picture

Status: Needs review » Reviewed & tested by the community

I have reviewed and applied #29 patch and it works fine for me with drupal 10.1.x.

bnjmnm’s picture

Component: Claro theme » theme system
Status: Reviewed & tested by the community » Needs work

If this change is going to happen, it should also happen with the other themes doing this: Olivero and Umami

I'd like to suggest changing this to "won't fix" If this landed when the issue was created in 2015 (Drupal 8 was still in beta) I'd be all for it. ~7 years in, the risks of disrupting an existing site with the classname change (however unlikely) still seems to outweigh the benefits of changing the class name many years later.

smustgrave’s picture

@bnjmnm could this almost be a policy that we should avoid adding new classes to core templates? Will post to #frontend to get a theme API maintainer thought.

lauriii’s picture

Component: theme system » other

I don't think this is actually a theme system issue so moving to the other component. I agree that benefits of the change would be minimal. Regardless of that, to me, it seems fine to fix this in the product themes (Claro, Olivero, and Umami). It's allowed by the BC policies of these themes. Also, based on the contrib search, it doesn't seem like this would break anything in contrib.

bnjmnm’s picture

could this almost be a policy that we should avoid adding new classes to core templates

We do want the flexiblity to change stuff in the product themes. Starterkit (and Stable/Stable9) exist to provide markup predictability for sites that need it so we have freedom in Claro/Olivero/etc. My reservations are specific to this specific use case because I'm not convinced there's any noticeable benefit to making such a change in 2023, yet there's a slight chance this being an unwelcome disruption to someone.

But ultimately, if another committer and/or FEFM thinks it fine and this lands, I'm fine with it. While it's true I'm expressing an opinion regarding where this issue goes, that opinion is positioned much closer to indifference than it is "strongly agree"

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.