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...
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | after.png | 336.3 KB | snehal-chibde |
| #5 | before.png | 283.63 KB | snehal-chibde |
Issue fork project_browser-3461037
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
Comment #2
sourav_paulComment #4
sourav_paulPlease review the MR.
Comment #5
snehal-chibde commentedHello @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 RTBC state.
Comment #6
snehal-chibde commentedComment #7
bramdriesenMerge 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.
Comment #8
prashant.c@BramDriesen
Currently, I think the recipes are being fetched from the local directory only which is
core/recipesand 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.
Comment #9
bramdriesenYes 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.
Comment #10
chrisfromredfinI actually would prefer that the behavior be the same across all, not just for recipes.
Comment #12
chrisfromredfinnice little UI improvement