Problem/Motivation

This is a follow up to #3024682: Migrate UI - add human-friendly module names to the Review form.
Here we want to "make the styling 10,000% better and match the Upgrade Status module" , as webchick said in comment #54 of that issue.

I am setting the status to Major since this will be a big improvement to the review form.

Proposed resolution

The details of the suggestion by webchick, from #45 are:
We could handle that bit like Upgrade Status module does (https://www.drupal.org/files/project-images/UpgradeStatus8UI.png), which is:
1) A full table of all modules in alphabetical order (could indeed group sub-modules under package if you'd like; Update Status module does that: https://www.drupal.org/files/issues/2019-10-09/d8-update-manager.png)
2) Colour + icon the table rows according to their statuses
3) Allow filtering the table to show only rows with a problem

Remaining tasks

  1. Decide if the table should have 2 or 3 columns?
  2. Modules grouped by project. Functional but needs work from front-end folks.
  3. Add colour + icon. Functional but needs work from front-end folks
  4. Add a filter to show only rows with a problem.

User interface changes

Yes, the Migrate UI review page /upgrade/review

Screenshots

Before

 Drupal 6 module name, Drupal 6 machine name, Drupal 8

After

API changes

Data model changes

Release notes snippet

Comments

quietone created an issue. See original summary.

quietone’s picture

Status: Active » Needs review
StatusFileSize
new23.47 KB

This is the patch from #50 of the parent issue.

Status: Needs review » Needs work

The last submitted patch, 2: 3088215-2.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

quietone’s picture

Status: Needs work » Needs review
StatusFileSize
new48.64 KB
new26.26 KB

Let's see if I can fix some of the failing tests.

This brings in patch #63 from #3024682: Migrate UI - add human-friendly module names to the Review form, which although still at NR it should be RTBC on the next review (hopefully).

Status: Needs review » Needs work

The last submitted patch, 4: 3088215-4.patch, failed testing. View results

quietone’s picture

That fixes all the migration related tests. The remaining test is about the css files and outside my area of knowledge. This needs some front end folks to fix and improve.

1) Drupal\KernelTests\Core\Theme\StableLibraryOverrideTest::testStableLibraryOverrides
css/migrate_drupal_ui.admin.theme.css from the migrate_drupal_ui/migrate_drupal_ui.admin library is overridden in Stable.
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'core/modules/migrate_drupal_ui/css/migrate_drupal_ui.admin.theme.css'
+'core/themes/stable/css/migrate_drupal_ui/migrate_drupal_ui.admin.theme.css'
quietone’s picture

Issue summary: View changes
damienmckenna’s picture

That's quite a nice improvement!

benjifisher’s picture

Issue summary: View changes

We discussed this issue briefly in the Usability meeting. Mostly we were talking about #3024682: Migrate UI - add human-friendly module names to the Review form.

I am updating the issue summary with the most recent screenshot from that issue.

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

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now 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.

quietone’s picture

hardik_patel_12’s picture

Assigned: Unassigned » hardik_patel_12

working on it.

hardik_patel_12’s picture

Assigned: hardik_patel_12 » Unassigned
Status: Needs work » Needs review
StatusFileSize
new27.23 KB
new14.63 KB

Reroll for 9.1.x-dev and solving coding standard error also.

Status: Needs review » Needs work

The last submitted patch, 13: 3088215-13.patch, failed testing. View results

ridhimaabrol24’s picture

Status: Needs work » Needs review
StatusFileSize
new27.37 KB
new1.12 KB
quietone’s picture

Status: Needs review » Needs work

Thanks for the rerolls.

  1. +++ b/core/modules/migrate_drupal_ui/src/Form/ReviewForm.php
    @@ -123,128 +123,163 @@ public function buildForm(array $form, FormStateInterface $form_state) {
         $display = $this->migrationState->getUpgradeStates($version, $this->systemData, $migrations);
    +    $display = $this->migrationState->getUpgradeStates($version, $this->systemData, $migrations);
    

    Duplicate line

  2. +++ b/core/modules/migrate_drupal_ui/src/Form/ReviewForm.php
    @@ -123,128 +123,163 @@ public function buildForm(array $form, FormStateInterface $form_state) {
    +          '#type' => 'html_tag',
    +          '#tag' => 'span',
    +          '#value' => $project,
    +          '#attributes' => ['class' => $source_module_class],
    

    These are supposed to be in an 'source_module' array.

              'source_module' => [
                '#type' => 'html_tag',
                '#tag' => 'span',
                '#value' => $project,
                '#attributes' => ['class' => $source_module_class],
              ],
ridhimaabrol24’s picture

StatusFileSize
new27.09 KB
new1.98 KB
quietone’s picture

Status: Needs work » Needs review
StatusFileSize
new2.47 KB
new27.09 KB

Just trying to fix coding standard errors.

Status: Needs review » Needs work

The last submitted patch, 18: 3088215-18.patch, failed testing. View results

jyotimishra-developer’s picture

Assigned: Unassigned » jyotimishra-developer
quietone’s picture

@jyotimishra123, my apologies. I completely missed that this was assigned to you.

jyotimishra-developer’s picture

Assigned: jyotimishra-developer » Unassigned
jyotimishra-developer’s picture

Hi @quieton, Hope you fine!!
no issues, you can continue working on this issue.

quietone’s picture

I don't know how to fix these errors, they are about themes and static overrides, and I know nothing about themes. And not enough about css to fix the coding standard errors. Can someone point me to the docs where I should start?

quietone’s picture

One of the errors is from Drupal\KernelTests\Core\Theme\StableDecoupledTest and there is an issue to remove that test. #3138652: Remove StableDecoupledTest

lauriii’s picture

Drupal\KernelTests\Core\Theme\Stable9LibraryOverrideTest is failing because the patch is adding a new library without having a copy of that in Stable. I'm wondering if some of the CSS should be added in Seven / Claro since the screenshots are only showing Seven. If we want to keep the CSS in the module, we should add a copy of the file to Stable which should make the test pass.

vsujeetkumar’s picture

Assigned: Unassigned » vsujeetkumar
vsujeetkumar’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll
StatusFileSize
new38.22 KB
new10.63 KB

Fixed test, Please review.

steinmb’s picture

Assigned: vsujeetkumar » Unassigned
vsujeetkumar’s picture

benjifisher’s picture

Status: Needs review » Needs work

I will review the changes to ReviewForm.php later, but for now I have a few requests that will simplify this patch.

  1. We do not need to add copies of the SVG files. The patch already includes this in a context line, referring to the existing copies:

     +++ b/core/modules/migrate_drupal_ui/css/components/upgrade-analysis-report-tables.css
     @@ -21,3 +21,13 @@
      .upgrade-analysis-report__status-icon--error:before {
        background-image: url(../../../../misc/icons/e32700/error.svg);
      }

    We should do the same in the new CSS files instead of this:

     +++ b/core/modules/migrate_drupal_ui/css/migrate_drupal_ui.admin.theme.css
     @@ -0,0 +1,219 @@
     ...
     +.migrate-drupal-ui-summary tr.known-errors > td.status-info {
     +  background-image: url(../icons/error.svg);
     +}
  2. Do we really need a 219-line CSS file to style this table? Can’t we reuse some existing CSS rules?

  3.   +++ b/core/modules/migrate_drupal_ui/src/Batch/MigrateUpgradeImportBatch.php
      @@ -225,10 +225,10 @@ public static function run($initial_ids, $config, &$context) {
               $migration = \Drupal::service('plugin.manager.migration')->createInstance($migration_id);
               $migration_name = $migration->label() ? $migration->label() : $migration_id;
               $context['message'] = (string) new TranslatableMarkup('Currently upgrading @migration (@current of @max total tasks)', [
      -            '@migration' => $migration_name,
      -            '@current' => $context['sandbox']['current'],
      -            '@max' => $context['sandbox']['max'],
      -          ]) . "<br />\n" . $context['message'];
      +          '@migration' => $migration_name,
      +          '@current' => $context['sandbox']['current'],
      +          '@max' => $context['sandbox']['max'],
      +        ]) . "<br />\n" . $context['message'];
             }
           }
           else {

    The indentation should be fixed, but not as part of this issue. In other words, this change is out of scope.

  4. Same comment here:

     +++ b/core/modules/migrate_drupal_ui/src/Form/OverviewForm.php
     @@ -35,9 +35,9 @@ public function buildForm(array $form, FormStateInterface $form_state) {
    
          $form['info_header'] = [
            '#markup' => '<p>' . $this->t('Upgrade a site by importing its files and the data from its database into a clean and empty new install of Drupal @version. See the <a href=":url">Drupal site upgrades handbook</a> for more information.', [
     -          '@version' => $this->destinationSiteVersion,
     -          ':url' => 'https://www.drupal.org/upgrade/migrate',
     -        ]),
     +        '@version' => $this->destinationSiteVersion,
     +        ':url' => 'https://www.drupal.org/upgrade/migrate',
     +      ]),
          ];
    
          $form['legend']['#markup'] = '';
  5. Same comment here. All this does is fix a missing EOL.

     +++ b/core/modules/migrate_drupal_ui/tests/src/Functional/d6/files/core/tests/fixtures/files/html-1.txt
     @@ -1 +1 @@
     -<h1>SimpleTest HTML</h1>
     \ No newline at end of file
     +<h1>SimpleTest HTML</h1>
  6. Out of scope:

     +++ b/core/modules/migrate_drupal_ui/tests/src/Kernel/MigrationLabelExistTest.php
     @@ -28,7 +28,7 @@ public function testLabelExist() {
    
          /** @var \Drupal\migrate\Plugin\MigrationPluginManager $plugin_manager */
          $plugin_manager = $this->container->get('plugin.manager.migration');
     -    // Get all the migrations
     +    // Get all the migrations.
          $migrations = $plugin_manager->createInstances(array_keys($plugin_manager->getDefinitions()));
          /** @var \Drupal\migrate\Plugin\Migration $migration */
          foreach ($migrations as $migration) {
quietone’s picture

Status: Needs work » Needs review
StatusFileSize
new4.79 KB
new31.62 KB

@benjifisher, thanks for the review.

#31. 1, 3, 4, 5, 6,. Fixed. It is a shame I didn't notice the out of scope changes way back in my review in #16.
#31.2. Can't answer that. I know extremely little css. I just ported what was in the Upgrade Status Project.

benjifisher’s picture

Issue summary: View changes

Now that #3024682: Migrate UI - add human-friendly module names to the Review form has been fixed, we do not need to include caveats about it, so I am updating the issue summary. The question about two or three columns is also obsolete.

benjifisher’s picture

Issue summary: View changes
Status: Needs review » Needs work

@quietone:

Thanks for addressing the points I made in #31. That simplifies the patch quite a bit.

I think there are several things we need to do before this issue can go in, so I am setting the status back to NW. I will try to start with the most important points.

  1. There are still some things undone in the Remaining tasks section of the issue summary. (There are also some things that have been done, and I am updating that section.) In particular, the filtering has not been implemented. In the summary row at the top (X modules will not upgrade … Y modules will upgrade) there are "Details" links that do not do anything.
  2. Possibly related to the first item: I am worried about the accessibility of having to search through long tables for the few "Will not upgrade" among the many "Will upgrade" (or vice versa). Personally, I can easily scan the table thanks to the color coding, but someone who uses a screen reader or is red/green color blind will have more trouble. If the proposed solution is a step backwards for some users from the current two tables (one table each for will/will not be upgraded) then we cannot accept it.
  3. As the Remaining tasks list points out, we need some input from a designer. Personally, I do not like the way the table is embedded in the details element, with two gray headers and a little bit of white space at the edges.
  4. Is the Upgrade status page (/admin/reports/updates/update) the best model to follow? It does not have any details elements (a.k.a. collapsible fieldsets). Maybe a better model is the Extend page (/admin/modules). That already has a table inside a details element. The main differences are that the header row of the Extend page table is visually hidden and that the column widths are closer to equal on the review form. (On the Extend page, the first column is so narrow, containing just a checkbox, that you might call it a two-column table.)
  5. Now that #3024682: Migrate UI - add human-friendly module names to the Review form has been fixed, we have an extra column: the machine name of the D6/D7 module.
  6. We should not hard-code the version number (Drupal 8) in the table header.
  7. With all of that horizontal space available, I would consider making the detail summary (e.g., "Core: 2 of 32 will not upgrade") a single line instead of two.
  8. Take into account the simplifications discussed in #3134300: Simplify ReviewForm::buildForm() and the resulting markup. In the current patch on this issue, we already have CSS classes on the rows, which was one of my suggestions on that issue. I think the additional classes on the cells in the Status row (and the extra span used to add those classes) are now obsolete.
benjifisher’s picture

We discussed this issue at the #3156568: Drupal Usability Meeting 2020-07-07. (It may be a while before a recording of the meeting is posted to that issue.)

Others at that meeting confirmed my concern in #34.2. That is, the existing organization into two tables (modules that will be updated and modules that will not be updated) is more accessible/usable than the reorganization in the current patch.

FWIW, the contrib Upgrade Status module, which we are using as a model for this issue, is planning to change the way it presents its information. See #3153862: [META] Improve user interface, so it drives what people need to do rather than merely display data.

In short, I think that we should narrow the scope of this issue. Make the tables prettier, but do not reorganize them.

Also, pay attention to the changes in #3134300: Simplify ReviewForm::buildForm() and the resulting markup, which is already RTBC. I am adding that as a related issue. Perhaps, as part of this issue, we can implement the suggestion I made there to move the CSS classes from a table cell to the table row.

quietone’s picture

Thanks for taking this Usability meeting.

I'm fine with limiting the scope on this. Note, I am also fine with making no changes to the form. Coloring the rows doesn't make sense to me if they are already split into two groups.

So, what should be done here? Are there any recommendations?

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

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

quietone’s picture

Priority: Major » Normal

Rereading #35, particularly, "in short, I think that we should narrow the scope of this issue. Make the tables prettier, but do not reorganize them." Changing to status to Normal.

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

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.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.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.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.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now 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.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now 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: 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.

quietone’s picture

Status: Needs work » Postponed

The Migrate Drupal UI Module was approved for removal in #3371229: [Policy] Migrate Drupal and Migrate Drupal UI after Drupal 7 EOL.

This is Postponed. The status is set according to two policies. The Remove a core extension and move it to a contributed project and the Extensions approved for removal policies.

The deprecation work is in #3463321: Deprecate Migrate Drupal UI and the removal work in #3522601: [meta] Tasks to remove Migrate Drupal UI module.

Migrate Drupal UI will not be moved to a contributed project. It will be removed from core after the Drupal 12.x branch is open.

quietone’s picture

Status: Postponed » Closed (won't fix)

The Migrate Drupal and Migrate Drupal UI modules are deprecated and will be removed from Drupal 12. For these modules, effort is now focused on bug fixes and necessary tasks. Therefore, this task is closed as won't fix.

Thanks to all for working on this!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.