Problem/Motivation

Project Browser's activation system defines three states that a project can have:

  • Absent: not in the code base.
  • Present: in the code base, but not "active" (i.e., recipe not applied; module not installed)
  • Active: having some effect on the Drupal site (recipe was applied; module is installed)

The UI doesn't consistently handle these three states. It's a very confusing experience when some things show an "Install" button vs. "View Commands", and what these mean, because it can vary by project type!

Proposed resolution

Handle these three states consistently, regardless of activator opinion or project type:

  • Absent: you need Package Manager to download the project. If Package Manager is available and allowed by Project Browser's settings, show the "Install" button. Otherwise, "View Commands".
  • Present: always show the "Install" button. Clicking it activates the project. This will introduce a minor behavior change for modules, which in some circumstances will link you to the Extend page. We will simply remove this confusing UX; if the module is present, there's no reason we can't activate it inline.
  • Active: show whatever tasks are exposed by the activator (this is the current behavior).

This is something we'd change in ActionButton.svelte, which is where the button's logic is done.

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

Issue summary: View changes
chrisfromredfin’s picture

+1 for this; linking to the extend page is vestigial from a before-time, when enabling inline wasn't possible, methinks. (That is, they used to link to the d.o project page for contrib, but to the Extend page for core modules, etc.)