Only show number of installs if non-zero

Created on 12 July 2024, 5 months ago
Updated 14 August 2024, 4 months ago

Problem/Motivation

Recipes do not really have a concept of "number of active installs" and I don't think we'll necessarily have a way to record installs for general projects, if that's what they end up being on d.o.

Proposed resolution

I think it makes sense to solve this issue by only showing the number of installs if it's non-zero, at least for now.

I think this can easily be handled with a Svelte if statement:
https://git.drupalcode.org/project/project_browser/-/blob/2.0.x/sveltejs...

📌 Task
Status

Needs work

Version

2.0

Component

User experience

Created by

🇺🇸United States chrisfromredfin Portland, Maine

Live updates comments and jobs are added and updated live.
  • Novice

    It would make a good project for someone who is new to the Drupal contribution process. It's preferred over Newbie.

Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @chrisfromredfin
  • Assigned to sourav_paul
  • Issue was unassigned.
  • Status changed to Needs review 5 months ago
  • 🇮🇳India sourav_paul Kolkata

    Please review the MR.

  • Pipeline finished with Success
    5 months ago
    Total: 475s
    #238277
  • 🇮🇳India snehal-chibde

    Hello @sourav_paul, I have reproduced the issue successfully.
    I have tested MR 557 on the Drupal 10.3.1 version, Module version 2.0.x-dev.
    The MR is applied cleanly.

    Test Result:
    If a recipe has 0 installs, no span is added with text as '0 installs' which was appearing before.
    Added a before and after screenshot of the same.

    Moving this to review state.

  • Status changed to RTBC 4 months ago
  • Status changed to Needs work 4 months ago
  • 🇧🇪Belgium BramDriesen Belgium 🇧🇪

    Merge conflict in the generated file, needs to be re-compiled.

    Shouldn't the IF statement only work on recipes? I would imagine for regular modules/themes it's valid to know there are 0 installs.

  • 🇮🇳India prashant.c Dharamshala

    @BramDriesen

    Currently, I think the recipes are being fetched from the local directory only which is core/recipes and if that is the case then the number of installs would be either 1 or 0, which will not make sense in my opinion.

    Therefore I think it a good idea to not show this section at all in case of Recipes.

  • 🇧🇪Belgium BramDriesen Belgium 🇧🇪

    Therefore I think it a good idea to not show this section at all in case of Recipes.

    Yes sure, but I don't see that distinction being made in the code changes. I only see a counter check if 0 to hide it, meaning in my eyes this is for everything and not only recipes.

  • 🇺🇸United States chrisfromredfin Portland, Maine

    I actually would prefer that the behavior be the same across all, not just for recipes.

  • Pipeline finished with Canceled
    3 months ago
    Total: 405s
    #294324
  • Pipeline finished with Success
    3 months ago
    Total: 491s
    #294338
  • Pipeline finished with Failed
    3 months ago
    Total: 368s
    #294429
  • Pipeline finished with Failed
    3 months ago
    Total: 475s
    #294442
  • Pipeline finished with Canceled
    3 months ago
    Total: 119s
    #294470
  • Pipeline finished with Failed
    3 months ago
    Total: 386s
    #294472
  • Pipeline finished with Success
    3 months ago
    Total: 319s
    #294517
  • Pipeline finished with Skipped
    3 months ago
    #294546
  • 🇺🇸United States chrisfromredfin Portland, Maine

    nice little UI improvement

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

Production build 0.71.5 2024