Problem/Motivation

Once a user installs a module, or applies a recipe in the Project Browser they have no indication that configuration might be needed before they can actually use it. In a recipe's application you may not need to configure it, but get direction on how to use your new features.

Users may not know they need to go to admin/config or admin/modules to find the new module and see if it has a configuration page.

Proposed resolution

If a module has a configure link in its info file, you should see a "Configure" link in a drop-down menu below the "Installed" badge in Project Browser.

That's being implemented in #3502666: Replace install/select button with a Drupal-standard drop button generically, but we need the backend to expose the links to show. This issue takes care of that part -- it changes the module activator so that, if the module in question is installed, the activator returns a link to its configuration page, if it defines one.

This makes no changes to the frontend; that'll happen in the blocked issue. This just does the backend piece.

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

leslieg created an issue. See original summary.

tim.plunkett’s picture

Issue tags: +core-post-mvp

chrisfromredfin’s picture

Issue summary: View changes
chrisfromredfin’s picture

Added credit for Adam since this was an idea from him at NEDCamp 2022. And I think it's a great one, but would require additional module maintainer contributions, such as adding "now what" steps in the info.yml or to a known help file or something. core-post-mvp is perfect.

thejimbirch’s picture

Title: Add instuctions for configuring installed modules » Add instuctions for configuring installed modules and applied recipes
Issue summary: View changes
yesct’s picture

Title: Add instuctions for configuring installed modules and applied recipes » Add instructions for configuring installed modules and applied recipes link to config/settings page
Issue summary: View changes

I fixed some typos in the issue summary.

I added keywords like settings and link.

I also expanded the scope, by suggesting we link to the module config page.

Do folks think linking should be a separate issue?? Maybe it's not dependent on module maintaining writing text. And so linking might get implemented faster?

yesct’s picture

Issue tags: +User interface, +user experience, +UX
matthieuscarset’s picture

StatusFileSize
new145.2 KB

+1 for a solution to give instruction to the user once a recipe is applied.

I had this issue after installing the "Search" recipe on a fresh Drupal CMS install.

The installation works because the recipe's button now says "Installed" but - as a site builder - I have no idea what to do next.

Recipes should provide a way to display message and/or redirect the users to another page.

phenaproxima’s picture

I think I see a path forward here: let recipes optionally define a set of follow-up tasks, which are then exposed in the Project Browser UI as items in a drop button.

Recipes would be able to have something like this in their recipe.yml -- a set of follow-up links:

follow_up:
  project_browser:
    -
      text: Configure
      route_name: some_module.settings
      route_parameters:
        foo: bar
      options:
        query:
          hello: goodbye
    -
      # Another struct like the one above...

Astute readers will recognize that repeatable struct as a dehydrated \Drupal\Core\Link object. So the recipe could define as many follow-up links as it wanted, in that format. Project Browser would then display those links in a drop-button, probably in the project detail modal, once the recipe was in the \Drupal\project_browser\ActivationStatus::Active state.

There are two blockers to this.

  1. Core needs to allow recipe.yml to contain a follow_up field. Rather than formalize that structure in core right now, I propose we simply relax the validation in \Drupal\Core\Recipe\Recipe::parse() so that recipes could expose additional data to specialist modules like Project Browser. This would be a one-line change in core (apart from test coverage); no other validation constraints would change. Think of it as the recipe equivalent of the extra field of composer.json. This will be added in #3503190: Allow recipes to contain an "extra" property with arbitrary information for specific modules to use.
  2. #3502666: Replace install/select button with a Drupal-standard drop button would be the other blocker; we'd need the ability for a project to present a set of action links to the Svelte app, which then get rendered in a drop button.

Thoughts?

phenaproxima’s picture

Title: Add instructions for configuring installed modules and applied recipes link to config/settings page » [PP-1] Add instructions for configuring installed modules and link to config/settings page
Status: Active » Postponed

Postponed on #3505159: Allow recipes to expose additional follow-up tasks to Project Browser, which is the overarching plan for implementing #10.

phenaproxima’s picture

Title: [PP-1] Add instructions for configuring installed modules and link to config/settings page » Add instructions for configuring installed modules and link to config/settings page
Assigned: Unassigned » phenaproxima
Status: Postponed » Active

Blocker is in!

phenaproxima’s picture

Assigned: phenaproxima » Unassigned
Status: Active » Needs review
Issue tags: +Needs tests

This is ready for an initial review. Probably needs test coverage, but that could be a kernel test covering ModuleActivator.

phenaproxima’s picture

Issue tags: -Needs tests

Test written, pretty straightforward.

phenaproxima’s picture

Title: Add instructions for configuring installed modules and link to config/settings page » Make ModuleActivator expose a Configure follow-up task for modules which have one
Version: 1.0.x-dev » 2.0.x-dev
Status: Needs review » Needs work
Issue tags: -Project Browser Initiative, -core-post-mvp, -User interface, -user experience, -UX +Needs issue summary update

Tagging for an IS update.

phenaproxima’s picture

Issue summary: View changes
phenaproxima’s picture

Status: Needs work » Needs review
Issue tags: -Needs issue summary update

tim.plunkett changed the visibility of the branch 3322601-pp-1-add-instructions to hidden.

tim.plunkett changed the visibility of the branch 3322601-pp-1-add-instructions to active.

chrisfromredfin’s picture

Status: Needs review » Fixed

Thanks, all! For contributions great and small :)

Status: Fixed » Closed (fixed)

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