Certain filters should only be shown if they are actually defined

Created on 29 July 2024, 3 months ago
Updated 5 September 2024, about 2 months ago

Problem/Motivation

Right now, the development status, maintenance status, and security coverage filters are hard-coded in the UI; they are always shown, even if they're not relevant to a particular source.

Rather than being hard-coded, they should only be displayed if they are actually defined.

Proposed resolution

Only show these filters if the corresponding keys actually exist in the $filters writable store. (That is, $filters.developmentStatus, $filters.maintenanceStatus, and $filters.securityCoverage.)

โœจ Feature request
Status

Fixed

Version

2.0

Component

Code

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States phenaproxima Massachusetts

Live updates comments and jobs are added and updated live.
  • Starshot blocker

    A potential blocker for Drupal Starshot. More information: http://www.drupal.org/project/starshot

Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @phenaproxima
  • Status changed to Needs work 3 months ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States phenaproxima Massachusetts
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia kunal.sachdev

    kunal.sachdev โ†’ made their first commit to this issueโ€™s fork.

  • Merge request !556#3464450: "Certain filters should" โ†’ (Merged) created by kunal.sachdev
  • Pipeline finished with Failed
    3 months ago
    Total: 411s
    #238141
  • Pipeline finished with Failed
    3 months ago
    Total: 508s
    #238363
  • Pipeline finished with Failed
    3 months ago
    Total: 410s
    #240343
  • Pipeline finished with Failed
    3 months ago
    Total: 367s
    #240355
  • Pipeline finished with Failed
    3 months ago
    Total: 386s
    #244378
  • Pipeline finished with Failed
    3 months ago
    Total: 429s
    #244389
  • Pipeline finished with Failed
    3 months ago
    Total: 489s
    #244409
  • Pipeline finished with Failed
    3 months ago
    Total: 586s
    #244559
  • Pipeline finished with Failed
    3 months ago
    Total: 412s
    #244575
  • Pipeline finished with Failed
    3 months ago
    Total: 411s
    #244583
  • Pipeline finished with Failed
    3 months ago
    Total: 431s
    #244616
  • Pipeline finished with Failed
    3 months ago
    Total: 455s
    #245425
  • Pipeline finished with Failed
    3 months ago
    Total: 475s
    #245443
  • Pipeline finished with Failed
    3 months ago
    Total: 384s
    #246555
  • Pipeline finished with Failed
    3 months ago
    Total: 375s
    #246557
  • Pipeline finished with Failed
    3 months ago
    Total: 452s
    #247636
  • Pipeline finished with Failed
    3 months ago
    Total: 351s
    #247757
  • Pipeline finished with Failed
    3 months ago
    Total: 333s
    #248663
  • Pipeline finished with Success
    3 months ago
    Total: 421s
    #248844
  • Status changed to Needs review 3 months ago
  • Status changed to Needs work 3 months ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States phenaproxima Massachusetts

    This looks really good to me. I'm honestly pretty low on complaints, but there a few small things that could be improved here. Can't wait to RTBC!

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia prashant.c Dharamshala

    The changes are working really well.

    However, I found 1 other issue for which I was going to file a new issue but I thought that seemed mostly related to this and perhaps could be handled in this issue itself.

    In case of the "Recipes" source we do not have the Categories as well so in the case "Filter by category" filter is appearing with empty dropdown and which is of no use and gives bad UX/DX.

  • Pipeline finished with Failed
    3 months ago
    Total: 340s
    #251439
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia prashant.c Dharamshala

    Not sure whether we want to reload the page on tab change @phenaproxima please suggest.

  • Pipeline finished with Failed
    2 months ago
    Total: 446s
    #260306
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia prashant.c Dharamshala

    Tested with all the 3 sources and seems working as expected, only those filters are displayed per source that is available or relevant.

    The branch needs a rebase.

  • Pipeline finished with Failed
    2 months ago
    Total: 716s
    #262417
  • Pipeline finished with Failed
    2 months ago
    Total: 467s
    #262439
  • Pipeline finished with Failed
    2 months ago
    Total: 463s
    #264686
  • Pipeline finished with Failed
    2 months ago
    Total: 547s
    #264909
  • Pipeline finished with Success
    2 months ago
    Total: 1724s
    #265007
  • Status changed to Needs review 2 months ago
  • Status changed to Needs work 2 months ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States phenaproxima Massachusetts

    Seems pretty much correct to me! A few points of feedback and then we can continue on to the next step...

  • Pipeline finished with Failed
    2 months ago
    Total: 439s
    #267112
  • Pipeline finished with Failed
    2 months ago
    Total: 371s
    #267130
  • Pipeline finished with Failed
    about 2 months ago
    Total: 1169s
    #268198
  • Status changed to Needs review about 2 months ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States phenaproxima Massachusetts

    I see nothing to complain about in this MR. Granted, I wrote part of it, so I don't know if I want to RTBC, but consider this a soft RTBC if tests pass. I'd ideally like a Svelte expert (@bnjmnm would be my first choice) to give it a look, just to see if there are any major problems I wouldn't have noticed, since I don't know Svelte that well. But as far as I can tell, the changes make sense.

  • Pipeline finished with Failed
    about 2 months ago
    Total: 415s
    #269329
  • Status changed to RTBC about 2 months ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States bnjmnm Ann Arbor, MI

    Svelte part looks solid and this is a nice step towards the presentation layer not making decisions about what a source does.

  • Status changed to Needs work about 2 months ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States chrisfromredfin Portland, Maine

    Manual testing - if I choose a filter (say, the "Access Control" category), it works and I get results. Recipes tab still shows 28 results. Then I click over to the Recipes and it shows 0 after a flash. And there are no filters to get my way out of it. If I go back to the Drupal.org tab and clear the filter, then back to recipes, it works and shows all the recipes.

    Perhaps we're not clearing the stores between tab switches?

    If categories IS a valid filter for recipes, but we're just not seeing it, then that's perhaps the issue (not showing a filter that it should?).

    On subsequent loads it behaves a little better; it seems to be the first time you choose a filter.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia prashant.c Dharamshala

    @chrisfromredfin I have also experienced this bug sometimes while working with PB but I think this is not related to the current issue and for this, we can create a separate issue.

    Thank you!

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia kunal.sachdev

    Yes, this issue is pre-existing. Create a separate issue for this ๐Ÿ› The functionality of showing results behaves abnormally on tab switch sometimes Active

  • Status changed to RTBC about 2 months ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States phenaproxima Massachusetts

    If the bug is confirmed pre-existing, then I think this can go back to RTBC.

  • Pipeline finished with Skipped
    about 2 months ago
    #274725
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States chrisfromredfin Portland, Maine

    Thanks, Kunal, for opening the related issue!

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States chrisfromredfin Portland, Maine

    was still in RTBC for some reason. moving back to fixed.

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

Production build 0.71.5 2024