Make the "add to cart" threshold configurable

Created on 21 November 2024, 4 months ago

Problem/Motivation

Right now, Project Browser has an "add to cart" user experience flow. You choose the projects you want to install, then click a single button to "check out" and install them all at once.

Given how Package Manager works, this is much better for performance. Unfortunately, it has been determined by the Starshot UX designers to be a confusing experience for users. I'm surprised by that, but we gotta respect that decision.

I think that we can keep all of the good (and hard) work that we did to make the add-to-cart experience possible; we can just dial it back to restore the "install one thing at once flow" by doing the following:

  • The the ProjectBrowser render element, add support for a new property: #max_selections, which can be an non-zero integer, or NULL. It should default to 1. This setting should be injected into drupalSettings.project_browser.
  • On the front end:
    • if max_selections is null or greater than 1, the current user experience stays as-is.
    • if max_selections is 1, then the moment a user presses the "Queue" button (we'll need to rename that, but we can do it another time), the "checkout" process begins and the chosen thing is immediately installed. The "Install N projects" button never appears.
Feature request
Status

Active

Version

2.0

Component

User experience

Created by

🇺🇸United States phenaproxima Massachusetts

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

Merge Requests

Comments & Activities

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

    I don’t love the fundamental assumption here, but I do not want to stand in the way of Drupal CMS.

    I think the experience should be to assume a default of NULL (the experience we have today), but anyone doing a custom render element can set it to what they want (like the post-install recipe picker).

    I might go so far as to someday allow a user to choose. If I think about Drupal CMS as a “way in” for ambitious site builders, I still think that shortly after settling on Drupal as a platform, they’ll want to be able to batch-add modules and/or batch apply recipes, and I think we need to consider their journey a little bit deeper.

  • 🇦🇺Australia pameeela

    I agree that this is much less likely to be confusing for an experienced user! But if you think about someone visiting the page for the first time, or first few times, it's different. The first time *I* saw the change, I was pretty thrown. Granted the queue / dequeue terminology was a big part of that, and we will fix that up. The overall UX of this pattern could be improved (hello, floating button!) and that is definitely part of the reaction to it currently.

    If you think about the user's expectation, they see the module they want and then they expect to install it. After they choose one module, they may continue browsing and find another one, and another. I don't think the mental model for this is a shopping cart, because that's not how plugins or apps work anywhere else AFAIK. Maybe this is a queue behind the scenes but that's somewhat of a technical term that users probably don't really care about.

    I completely understand the technical considerations and concerns about performance and we have to balance that. My opinion on the tradeoff right now is that it's probably better to align with the user's expectation for the behaviour (click install and it installs) rather than optimising for a performance concern that then makes the UX confusing.

  • 🇺🇸United States chrisfromredfin Portland, Maine

    I know a lot of this is UX, but there IS a lot of precedent for batch actions in Drupal - see the content page, for example. We do want/intend to change the UI from the floating button to something that matches the content page batch actions. And Queue/Dequeue language was the only thing stopping us from putting in a substantial feature that was truly often-requested in our listening sessions (granted, by more-experienced users).

    But again, I'm not opposed to it behaving slightly differently in slightly different contexts.

    📌 Change UI for the install queue to match bulk operations Active
    📌 [PP-1] Decide on naming Queue/Dequeue button text Postponed

  • 🇦🇺Australia pameeela

    I think if the UI matched other bulk operations, it would be a lot less confusing.

    But I also think part of the issue with this UX is that it's not clear that the reason for the queue is performance. I would guess that many new users would click Queue and then immediately click Install anyway. If I didn't have the context, I think I would certainly click Install before I did a new search, or went to a new page, since there's no indication that my selection would persist.

    For my part I don't find that I am often installing a lot of contrib modules at once, other than early on in the project, and generally I know what these are so I wouldn't use d.o or even PB; I would just install them via composer. It's hard for me to picture someone frequently using PB to install a bunch of modules at once. Not saying it wouldn't happen, but it seems like it would be less common.

  • 🇺🇸United States phenaproxima Massachusetts
  • First commit to issue fork.
  • Merge request !644Resolve #3489054 "Add to cart threshold" → (Merged) created by narendraR
  • 🇮🇳India narendraR Jaipur, India

    The functionality is complete, but tests are failing due to changes in functionality. I will update the tests if the changes in the MR align with the requirements specified in the issue.

  • Pipeline finished with Failed
    3 months ago
    Total: 453s
    #373672
  • Pipeline finished with Failed
    3 months ago
    Total: 486s
    #374624
  • 🇮🇳India narendraR Jaipur, India

    Test failures seems not related to this issue. Other feedback addressed. It is ready for review again.

  • 🇺🇸United States phenaproxima Massachusetts

    Looks like this needs to be synced with HEAD.

  • Pipeline finished with Failed
    3 months ago
    Total: 528s
    #376819
  • Pipeline finished with Failed
    3 months ago
    Total: 633s
    #376919
  • Pipeline finished with Failed
    3 months ago
    Total: 1065s
    #376970
  • 🇮🇳India narendraR Jaipur, India
  • While testing this MR i found one issue with the current state of the MR.
    When we click on install(when max_selection is set to 1 by default) the other button's label on the module cards toggle to select .Attaching the SS for the same.

    While the captcha module is being installed you can see the other module's cards have select as the button's label.

  • Pipeline finished with Failed
    2 months ago
    Total: 453s
    #383609
  • Fixed the issue outlined in #18.Marking it NR.

  • 🇺🇸United States phenaproxima Massachusetts

    Looks like this needs to be re-synced with HEAD. :(

  • Rebased with latest changes form HEAD.Marking it NR again.

  • Pipeline finished with Failed
    2 months ago
    Total: 546s
    #387010
  • 🇺🇸United States phenaproxima Massachusetts

    The changes make sense to me but I found a few things that need to be changed. Nothing too serious, though.

  • Pipeline finished with Failed
    2 months ago
    Total: 463s
    #387574
  • Pipeline finished with Failed
    2 months ago
    Total: 448s
    #387601
  • 🇮🇳India narendraR Jaipur, India
  • Pipeline finished with Failed
    2 months ago
    Total: 497s
    #388055
  • Pipeline finished with Failed
    2 months ago
    Total: 389s
    #388067
  • 🇺🇸United States phenaproxima Massachusetts

    Looks okay to me. No new test failures. Ship it.

  • 🇺🇸United States chrisfromredfin Portland, Maine

    NW for making configurable

  • Pipeline finished with Failed
    2 months ago
    Total: 341s
    #388753
  • Pipeline finished with Canceled
    2 months ago
    Total: 144s
    #388760
  • Pipeline finished with Canceled
    2 months ago
    Total: 132s
    #388763
  • Pipeline finished with Failed
    2 months ago
    Total: 936s
    #388766
  • 🇺🇸United States phenaproxima Massachusetts

    It's a bit gauche of me to do this, but the circumstances are extenuating (we need this for Drupal CMS). Restoring RTBC.

  • Pipeline finished with Skipped
    2 months ago
    #389021
  • 🇺🇸United States chrisfromredfin Portland, Maine

    Yeah, this rocks.

  • Pipeline finished with Failed
    2 months ago
    Total: 566s
    #389013
  • 🇩🇪Germany rkoller Nürnberg, Germany

    i've pulled the latest changes in 2.0.x but i wonder where is the threshold set introduced with this MR?

  • 🇺🇸United States phenaproxima Massachusetts

    It's developer-facing. It's a property of the project_browser render element. The default behavior for users is unchanged.

  • Status changed to Fixed about 2 months ago
  • Automatically closed - issue fixed for 2 weeks with no activity.

  • Pipeline finished with Failed
    about 1 month ago
    Total: 1388s
    #421597
  • Pipeline finished with Success
    29 days ago
    Total: 1245s
    #423156
  • Pipeline finished with Canceled
    29 days ago
    Total: 1163s
    #423249
  • Pipeline finished with Success
    29 days ago
    Total: 1925s
    #423269
  • Pipeline finished with Failed
    29 days ago
    Total: 2923s
    #423312
  • Pipeline finished with Success
    28 days ago
    Total: 1222s
    #423911
Production build 0.71.5 2024