Support from Acquia helps fund testing for Drupal Acquia logo

Comments

LewisNyman’s picture

FileSize
992 bytes
LewisNyman’s picture

Issue summary: View changes
crazyrohila’s picture

Assigned: Unassigned » crazyrohila
Status: Active » Needs review
FileSize
15.05 KB

Adding initial patch for feedback.

idebr’s picture

Status: Needs review » Needs work

@crazyrohila Thanks for working on this!

  1. +++ b/core/modules/locale/src/Form/TranslationStatusForm.php
    @@ -167,7 +170,9 @@ public function buildForm(array $form, FormStateInterface $form_state) {
    +    // Add "package-group-list" class to form that can be reused on
    +    // module list page.
    +    $form ['#attributes']['class'][] = 'list-item-group';
    

    The comment and class name don't match

  2. +++ b/core/modules/system/css/system.admin.css
    @@ -79,21 +79,7 @@ small .admin-link:after {
    +.list-item-group label {
    

    Let's use .list-item-group__label instead

  3. +++ b/core/modules/system/css/system.admin.css
    @@ -116,46 +102,52 @@ small .admin-link:after {
    +.list-item__checkbox {
    

    The checkbox is a modifier of the list-item__column, so you could write list-item__column--checkbox instead

  4. +++ b/core/modules/system/css/system.admin.css
    @@ -116,46 +102,52 @@ small .admin-link:after {
    +.list-item__title {
    

    Following the previous logic, this would be .list-item__column--title

  5. +++ b/core/modules/system/css/system.admin.css
    @@ -116,46 +102,52 @@ small .admin-link:after {
    +  .list-item__description {
    

    And .list-item__column--description

  6. +++ b/core/modules/system/src/Form/ModulesListForm.php
    @@ -232,7 +232,8 @@ public function buildForm(array $form, FormStateInterface $form_state) {
    +    // Add "list-item-group" class to form.
    

    Let's leave out this comment as adding an attribute to the renderable array is very common.

  7. +++ b/core/modules/system/src/Form/ModulesListForm.php
    @@ -232,7 +232,8 @@ public function buildForm(array $form, FormStateInterface $form_state) {
    +    $form ['#attributes']['class'][] = 'list-item-group';
    

    There's an unexpected space after $form

  8. +++ b/core/modules/system/src/Form/ModulesListForm.php
    @@ -261,6 +262,9 @@ protected function buildRow(array $modules, Extension $module, $distribution) {
    +    // Add "list-item" class to rows.
    

    Let's leave out this comment as well, adding an attribute to a renderable array is very common.

  9. +++ b/core/modules/system/system.admin.inc
    @@ -225,26 +225,26 @@ function theme_system_modules_details($variables) {
    +    $row[] = array('class' => array('checkbox', 'list-item__column', 'list-item__checkbox'), 'data' => drupal_render($module['enable']));
    

    The original class .checkbox can be removed, as it is no longer used.

  10. +++ b/core/themes/seven/css/components/modules-page.css
    @@ -17,31 +14,22 @@
    -.system-modules tr.even,
    -.system-modules tr.odd,
    

    These styling is removed but never reapplied. This changes the module overview on the 'Extend' page quite a bit.

crazyrohila’s picture

Status: Needs work » Needs review
FileSize
15.72 KB
6.82 KB

@idebr, Thanks for review.

9. .checkbox was used to apply text-align: center that was being applied by system.theme.css (td.checkbox). I have removed checkbox class and applied text-align: center to list-item__column--checkbox.

10. Selector changed to `.list-item`.

1-8.
Updated code.

idebr’s picture

Status: Needs review » Needs work

@crazyrohila Thanks for working on this issue! I did a manual test to check for visual regressions as well as a code review:

  1. +++ b/core/modules/locale/src/Form/TranslationStatusForm.php
    @@ -167,7 +170,7 @@ public function buildForm(array $form, FormStateInterface $form_state) {
    +    $form ['#attributes']['class'][] = 'list-item-group';
    

    There is a space after $form that can be removed.

  2. +++ b/core/modules/system/css/system.admin.css
    @@ -79,21 +79,7 @@ small .admin-link:after {
    -.system-modules label,
    

    This selector was also used for the label 'Search' above the module filter on the 'Extend' page, so now this label has been reduced in size. Let's add a new selector for this label to make sure we don't introduce a usability regression.

  3. +++ b/core/modules/system/src/Form/ModulesUninstallForm.php
    @@ -154,7 +154,8 @@ public function buildForm(array $form, FormStateInterface $form_state) {
    -
    +    // Add "list-item-group" class to form.
    +    $form ['#attributes']['class'][] = 'list-item-group';
    

    Adding an attribute is very common, so I don't think a comment is necessary here. Let's remove it from the patch.

  4. +++ b/core/modules/system/system.admin.inc
    @@ -225,26 +225,26 @@ function theme_system_modules_details($variables) {
    +    $col2 = '<label id="' . $id . '" for="' . $module['enable']['#id'] . '" class="list-item-group__label module-name table-filter-text-source">' . drupal_render($module['name']) . '</label>';
    

    Are the classes module-name and table-filter-text-source still needed? If these are only used for javascript, the class names should be prefixes with .js- according to the css coding standards.

  5. +++ b/core/modules/system/system.admin.inc
    @@ -225,26 +225,26 @@ function theme_system_modules_details($variables) {
    -    $description .= '<div class="requirements">';
    -    $description .= '<div class="admin-requirements">' . t('Machine name: !machine-name', array('!machine-name' => '<span dir="ltr" class="table-filter-text-source">' . $key . '</span>')) . '</div>';
    +    $description .= '<div class="list-item__requirements">';
    

    The selector .system-modules .requirements in system.admin.css should be updated to the new selector.

  6. +++ b/core/modules/system/system.admin.inc
    @@ -264,7 +264,7 @@ function theme_system_modules_details($variables) {
    +    $row[] = array('class' => array('list-item__column', 'list-item__column--description', 'expand'), 'data' => $col4);
    

    Is the class 'expand' necessary here? If it is only used for javascript, the class should be prefixed with .js- per the CSS coding standards.

crazyrohila’s picture

Status: Needs work » Needs review
FileSize
5.43 KB
16.37 KB

1,2,3. Done
4. Yes, class was being used by js, so added .js- to class name.
5. This is already done in last patch.
6. Class was not in use, removed.

Class names are generic now and being used by other pages (eg. translation-update, modules uninstall), I think we should change file name too. current file name is modules-page.css. I am not sure if breaking this file into component files can be covered in this issue or we should create new one.

idebr’s picture

Issue summary: View changes
Status: Needs review » Needs work
FileSize
48.92 KB

@crazyrohila Thanks, this is looking great! The module page is done, but I found one regression on the Locale translation status page (/admin/reports/translations) with manual testing:

+++ b/core/themes/seven/css/components/modules-page.css
@@ -17,31 +14,22 @@
-.system-modules tr.even,
-.system-modules tr.odd,
-.locale-translation-status-form tr.even,
-.locale-translation-status-form tr.odd {
-  background: #f3f4ee;
+.list-item {

The locale translation status (/admin/reports/translations) has no .list-item on its rows, so this styling is never applied:

crazyrohila’s picture

Status: Needs work » Needs review
FileSize
200.38 KB
16.8 KB
1.41 KB

Added list-item class to rows of table.

I noticed some visual problems with translation table, when we have some data there. but I think that is out of scope of this issue. attached screenshots.

crazyrohila’s picture

Screenshot...
locale table theme

Status: Needs review » Needs work

The last submitted patch, 9: refactor-module-page-css-2408505-9.patch, failed testing.

crazyrohila’s picture

Assigned: crazyrohila » Unassigned
Status: Needs work » Needs review
FileSize
16.62 KB

updated for latest HEAD.

Status: Needs review » Needs work

The last submitted patch, 12: refactor-module-page-css-2408505-12.patch, failed testing.

crazyrohila’s picture

I have added languages, but all are showing "updated" or "No update found". So I am not able to check this manually and not sure why this testInterface() Test is failing.

Can anyone point somethings here?

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.

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.

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.

Version: 9.5.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. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.