Problem/Motivation

If you install a module that depends on other modules, the module you explicitly installed gets the "Installed" badge right away, but the dependencies don't, even though they're also installed. It would be cool if the frontend reflected the actual backend status as closely as possible.

Proposed resolution

Not sure yet.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

phenaproxima created an issue. See original summary.

phenaproxima’s picture

EDIT: Never mind, this idea won't work.

narendrar’s picture

Earlier all projects were re-rendered on installing project. Adding related issue #3509242: [Svelte] Remove the $updated key

phenaproxima’s picture

Assigned: Unassigned » phenaproxima

#3 gives me an idea: we could add a new AJAX command that forces all visible instances of Project Browser to reload their data, using the previously known set of query parameters.

Activators which know that dependencies were enabled -- and we could add a trait for activators to easily figure this out -- could return this command, and that would get everything that was installed, to show up as installed.

It's a bit brute force, but I'm not sure there's a cleaner way to do this. I've been puzzling over this one for days and the current (solid) architecture just doesn't allow it to be done using RefreshProjectsCommand, at least not without some very complicated contortions.

Assigning to myself to see if this can work at all.

phenaproxima’s picture

Discussed this with @chrisfromredfin in Slack and what we decided is that the smartest way to do this is for the frontend to explicitly request a refresh of all visible projects, since it (and only it) knows what projects are visible to the user.

Basically what I proposed in #3. I'm okay with it.

phenaproxima’s picture

Issue tags: +Needs tests

The PHP and JavaScript side of this wasn't hard, but this will need an explicit test.

phenaproxima’s picture

Version: 2.0.x-dev » 2.1.x-dev
Status: Active » Needs review
Issue tags: -Needs tests +stable blocker, +backport

Writing a test was surprisingly quick!

phenaproxima’s picture

chrisfromredfin made their first commit to this issue’s fork.

chrisfromredfin’s picture

Status: Needs review » Patch (to be ported)

merged to 2.1.x

chrisfromredfin’s picture

Status: Patch (to be ported) » Fixed

backport complete

Status: Fixed » Closed (fixed)

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