Problem/Motivation

When using upgrade_status module to prepare a D8 website for D9 upgrade, it provides an initial list (even before scanning any project), that shows if this website using the latest version of each contrib module, or if there's a newer version available.

That requires a lot of additional manual work, going to each contrib module's project page and see if that newer available version is ready for Drupal9 or not.

The current version of installed modules also might be ready for Drupal9, but that information is not displayed until it will be scanned (which maybe can be skipped if the module declared that this version support Drupal9)

Proposed resolution

Fetch the information of each module's version and display it on upgrade_status report page.
I will know if my current installed version of a contrib module is already compatible with Drupal9, or if the suggested available newer version is compatible with Drupal9.

It would be awesome to have the composer command that I can run in order to do the upgrade, perhaps a command for each module upgrade, and maybe 1 long command that will upgrading all D9-compatible contrib modules that are available?

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Comments

shaal created an issue. See original summary.

heddn’s picture

My recent pet complaint w/ D9 compatible modules is many don't have a tagged release. This means for my 30 or 40 contrib modules on a site, I'm stuck with using a 1.x-dev, 2.x-dev, dev-master, etc, as version for the module. For a handful of modules, that's not a big deal. But when I have half of my contrib modules all needing a dev-master version, that makes keeping stability for the module an issue. It would be _really_ nice if this, "I'm D9 compatible" column would spit out if it is on the dev branch or a tagged release. And somehow incentivize contrib authors to get a red X turn into a green checkbox and show the module has a tagged D9 release.

gábor hojtsy’s picture

@heddn: Upgrade Status only gets data from Update module in core, which uses update XML from drupal.org which will contain only tagged releases. So we can only do the data gathering for update recommendations either way with tagged releases.

heddn’s picture

Is there a way to put a red X then if the module doesn't have D9 support? That way it incentives people to switch from red x to a green checkbox?

Gábor Hojtsy credited dww.

gábor hojtsy’s picture

Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new1.55 KB
new79.83 KB

Testing welcome on this :D Also UI suggestions for making it brief. This will use a lot of screen real estate applying to various projects.

Thanks @dww for pointing to the simplest solution to base this off of data we already have. Whew!

heddn’s picture

+++ b/src/Form/UpgradeStatusForm.php
@@ -349,15 +350,24 @@ class UpgradeStatusForm extends FormBase {
+          $drupal9Compatible = [];

It would make things more complex, but could we have a red "Not Drupal 9 compatible" too? That would make me want to get from Red to Green.

shaal’s picture

@Gábor Hojtsy #6 works great!

I updated the patch so it adds Drupal9 compatibility label for newer versions that are available as well as versions that are already installed (up-to-date).

Screenshot:

gábor hojtsy’s picture

StatusFileSize
new1.91 KB
new2.24 KB

I don't think we should make "Up to date" a link because when you are up to date, there is no need to go to the get informed about the release. Here is a slight rework where the "Up to date" remains a simple text item. Also swapped the !Semver to Semver because we were testing the opposite condition :D Thanks @shaal for pointing that out yesterday on chat.

gábor hojtsy’s picture

Issue summary: View changes
StatusFileSize
new131.16 KB
new6.14 KB

Ok I realized that this brings in a competing status thing into the table. Normally the whole row is colored based on the local result and an icon is displayed based on the local result. That is not really the primary information I guess once/if there is a Drupal.org sourced update that fixes it for you. Then you would not really care for the problems found locally. So this puts unneeded emphasis on the status icon and row color. So I decided to unify the status icon usage and made rector be a column as well for consistency. I also updated the column labels from "Available update" and "Status" to "Drupal.org update" and "Local status". The patch would also be local status of sorts, so not sure how to express that properly, this is a work in progress. Then I made the Drupal 9 readiness of the update available a primary information. You don't really care about the version number of it I guess, but that it would be 9 compatible. So made that the primary info:

The upgrade rector counterpart is at #3150871: Re-integrate with Upgrade Status, since the 3.x form is not supported, it moves the patch result from a badge/label that does not necessarily look like a link that does something to a proper table column.

heddn’s picture

Status: Needs review » Reviewed & tested by the community

Beautiful!!!

gábor hojtsy’s picture

Status: Reviewed & tested by the community » Needs review

Discussing this with Shaal on slack. We both realized that it is not shown without a scan if your current version is already Drupal 9 compatible or not. That should also be mostly available from the extension info that we are using, so we can display it. At that point the data will become even more unwieldy so we'll need to figure out how to approach this on the UI. I would love to take another holistic look at how to make the UI useful instead of just dumping a bunch more data at you. One thing Shaal suggested is to implement a "Suggested next step" as the primary UI element on projects and let the user see the supporting data if they desire. That would dramatically simplify the UI but also dramatically redesign it :D

I think with the new realities of usually remote updates available to projects as well as likely existing issues on the projects (from rector, etc), we should direct people towards those. Local scanning is still a very important piece but should not be the primary driver as much work is already done on drupal.org either as an updated release or work in issues.

gábor hojtsy’s picture

Priority: Normal » Major
shaal’s picture

A few ideas that we discussed at Palantir.net with the UX team:

In #10 screenshot, there's a lot of text that doesn't need to be there anymore (ie. not scanned - doesn't have to be displayed if it wasn't scanned yet, or display it somewhere else and not in the column where it is now)

We should make the interface more action-oriented, and start with low hanging fruits.
Every module that is installed locally and already compatible with D9 as is - would appear at the bottom, in something greenish Ready for D9.
On top - We'll have a list of all the modules that are locally not ready for D9, but a version that is D9 compatible is available to download from d.o Upgrade modules
Then we'll have a section of Not scanned yet (modules that do not appear on top or bottom lists).
Once you run the scan, You have a new section, below the "Upgrade modules" section,
That section will have 2 parts -

  • Rector can fix all deprecations in the module
  • Rector can fix some deprecation + manual fixes needed

So visually the list is organized from top - the easiest action to the most complex

  • Upgrade to D9 version of module
  • Rector can create a patch
  • Manual work needed
  • And at the bottom:
  • Ready for D9 (no action needed)

For the modules that need manual fixes - maybe display simple line item, and all the details details of what deprecations need fixing - collapsed by default

Custom module would have their own area, that follow the same flow of contrib modules:

  • Ready and nothing need to be fixed
  • Can be fixed by rector
  • Manual fixes needed
gábor hojtsy’s picture

StatusFileSize
new117.75 KB
new6.51 KB
new723 bytes

Here is the missing feature of checking the local version first. Did not bother too much with the UI part, just adding a party popper for now as we are discussing how to redo the whole UI. I think this now has all the checks we need, but the UI reorganization is still to be done.

gábor hojtsy’s picture

Title: Display modules' own D9 readiness status » Display local and remote Drupal 9 readiness status (based on update and info.yml info)
Version: 8.x-2.x-dev » 3.0.x-dev
gábor hojtsy’s picture

Version: 3.0.x-dev » 8.x-3.x-dev

  • Gábor Hojtsy committed f9080bf on 8.x-3.x
    Issue #3150603 by Gábor Hojtsy, shaal, dww: Display local and remote...
gábor hojtsy’s picture

Status: Needs review » Fixed

Committed this to a new 3.x branch, so we can iterate on it instead of in one issue/patch. Thanks!

dww’s picture

Surprised you didn't use 3.0.x for the new branch. ;)

gábor hojtsy’s picture

We don't need to rule out people using Drupal 8.7 to get the benefit of this tool.

dww’s picture

Ahh, right. Good point.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.