Add confirmation page when installing module

Created on 22 February 2023, almost 2 years ago
Updated 11 July 2024, 5 months ago

Problem/Motivation

At present the UI launches straight into the install process when "Add and Install" is clicked. This may not garner user trust, since the user doesn't know if the correct version is being installed until it's finished.

The user also isn't told if additional required modules are being installed.

I think it ought to be possible to pause the install when Composer has determined the versions that will be installed, and present a summary of:

  • The exact version of the module that will be installed.
  • Any required modules that will also be installed, and their versions.

The user should be given the option of accepting the configuration and proceeding with the install, or aborting the install process.

Steps to reproduce

Proposed resolution

Remaining tasks

  • ✅ File an issue about this project
  • ☐ Manual Testing
  • ☐ Code Review
  • ☐ Accessibility Review
  • ☐ Automated tests needed/written?
Feature request
Status

Active

Version

1.0

Component

User experience

Created by

🇮🇪Ireland lostcarpark

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @lostcarpark
  • 🇺🇸United States chrisfromredfin Portland, Maine

    I think our target audience probably doesn't care so much that this needs to be core-mvp, but I did tag it core-post-mvp because I think it would be good to inform users (either before OR even after) about what was installed and what to do next. This could dovetail on that issue.

  • 🇺🇸United States chrisfromredfin Portland, Maine
  • 🇺🇸United States chrisfromredfin Portland, Maine
  • 🇺🇸United States chrisfromredfin Portland, Maine

    This might be a duplicate; feel free to check against the related issues and see if it's covered there, and if so, close as dupe.

  • 🇮🇪Ireland lostcarpark

    I definitely agree this is post MVP, but a "what next" stage after installing a new module would be a great feature to help new users. For example, displaying a link to the modules configuration page would be extremely useful. I would think this would need to be something that the module provides, since not all modules have a configuration page, and I don't believe it's possible to predict where the configuration page for a module would be. Perhaps a hook or plugin service could be added to allow the module to provide "after successful install" text.

  • 🇺🇸United States chrisfromredfin Portland, Maine
  • First commit to issue fork.
  • 🇺🇸United States phenaproxima Massachusetts

    For example, displaying a link to the modules configuration page would be extremely useful.

    Some (all?) of the backend infrastructure for this now exists. The new ActivatorInterface has an activate() method (which is what actually installs the module), and it can optionally return a Response object, which could be instructions for what to do next, or maybe a redirect to a configuration page, or...what-have-you.

    We'd still need some changes in the frontend JS to make sure those responses are actually respected, but that could be the scope of this issue.

  • 🇺🇸United States warped

    In Linux, when you install a new package, it shows you the dependencies that will be added to the install, and optional modules that would enhance your experience. Those would require additional install commands later.

    I have aborted installs just because I didn't realize how many additional packages would be installed. Having a preview page would definitely give new to Drupal the confidence that they are more in control. More information makes it understandable, rather than wondering what it is going to do. Think about someone that sees a module for credit card processing and doesn't realize this will install commerce.

    On the preview page, it could also indicate if it was going to download the module, upgrade an existing module, that maybe wasn't enabled, or just enable a module. After all, a module could have been uninstalled previously and not removed, but they didn't know or remember. Or one of the dependencies might be to enable a core module.

    This adds to the idea that the button can just be a "Install" button, instead of a "Download & Install", or "Add and Install", because the exact procedure is detailed in the status and you don't have to know up front.

    I also like @lostcarpark 's idea of a post install display. Not only can it include setup/config links, but if an upgrade had change notes, or requirements to manually make changes because of an update, that would be a great time to inform them, rather than leaving them to wonder why it isn't working. And a great confirmation page for a screen print to document their setup, and steps they used to get there.

    While project browser is a feature all may use, the intent is to make it easier and more comfortable for those with little knowledge of Drupal. Maybe an opt-out config would help those more knowledgeable to disable features they don't want.

  • 🇺🇸United States phenaproxima Massachusetts

    What #10 suggests could be done, but would take some significant refactoring. We'd probably need to introduce a new method to InstallerController which evaluates the state of the sandbox (staging area) and reports back, before allowing the user to confirm what's going to be done.

    That also means we'd be implicitly moving to a "shopping cart" type of user experience, where you add a bunch of packages to your sandbox, then review what you did before you apply the changes to the live site. That's a pretty big change.

  • 🇺🇸United States warped

    Aren't you adding a bunch of packages when you add the dependencies?

    At some point, it must have what is going to be done. Jumping to a display, and then returning to the point where it evaluates, if there are any changes, sounds like minimal intrusion. But I don't know the process is.

  • 🇺🇸United States phenaproxima Massachusetts

    Sure, it knows what will happened (well, actually what's already happened over in the staging area where Composer operations are done), but Project Browser's UI and backend controllers are not currently built for displaying a confirmation before the sandbox is copied to the live site. It's a Project Browser problem, not a Package Manager problem.

    That's why I said it would need substantial refactoring. :)

  • 🇮🇪Ireland lostcarpark

    I'm not sure that we want to go the whole "shopping cart" route. I think "App store" is more appropriate.

    I like the Linux analogy. You ask it to install a package, and it finds all the dependencies it requires, and asks you to confirm.

    The actual mechanism would behave slightly differently. Linux figures out what it's going to do, then asks you before it attempts it. Package manager applies the change to the staging area, then lets you confirm before applying to the site.

    Automatic Updates already has this, so hopefully we can do something similar. I don't doubt @phenaproxima that it will be a big refactor, but at least we have a model to follow.

    I have ideas for post-install, but I would suggest we focus on confirmation during install for this issue.

Production build 0.71.5 2024