Problem/Motivation

See #3494672-15: Expose each source as a regular local task, replacing the tabs managed by the Svelte app.

We need to start handling the concept of having several Project Browser instances, each with their own set of configuration, on the same page. To do this, let's assign each project browser render element a unique ID, and keep its settings in drupalSettings.project_browser.instances.INSTANCE_ID.

Command icon 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

phenaproxima created an issue. See original summary.

phenaproxima’s picture

Status: Active » Needs review
phenaproxima’s picture

Issue summary: View changes
iamdroid’s picture

Assigned: Unassigned » iamdroid
Issue tags: +ContributionWeekend2025

Hi Folks, I am going to review it as part of ContributionWeekend2025.

iamdroid’s picture

Assigned: iamdroid » Unassigned
Status: Needs review » Reviewed & tested by the community

I have reviewed the code and tested the actual behavior before and after the changes:

  1. The changes were tested on Drupal CMS 1.0.1 and Project Browser 2.0.x
  2. The changes were applied by obtaining the module version from the issue fork.
  3. The module installation process went fine
  4. There were no issues in Drupal log and browser console
  5. The Project Browser is working as expected
  6. drupalSettings.project_browser object contains instances property with these values:
    "99b82b7e-c68d-41b5-a323-17df55fd2646": {
      "source": "drupalorg_jsonapi",
      "filters": {
        "categories": {
          "_type": "multiple_choice",
          "name": "Categories",
          "group": null,
          "choices": {
            "24830916-5c07-4446-89de-960915f87bf6": "Access control",
            "3df293b3-c9a1-4232-962b-3c8169e8e6e3": "Accessibility",
            "abf23828-f269-4d39-8589-b731209eb154": "Administration tools",
            "81212413-80b0-44d6-84fb-9078baa7ab25": "Automation",
            "754c04cb-6da2-42ba-9032-d64307f68f45": "Content display",
            "86237004-3801-40cf-96b5-fe7d60efccb5": "Content editing experience",
            "f1ca6464-1608-47fd-be11-1a398e6c9424": "Decoupled",
            "086cebcf-200f-4c34-886e-f9921919b292": "Developer tools",
            "0cd80c8e-5c20-43a8-aa3e-ec701007d443": "E-commerce",
            "cfef5e6a-b77b-4a2b-b669-e87b1266f3ac": "Import and export",
            "3322058a-a158-4806-ac5b-9bcabc95edac": "Integrations",
            "68428c33-1db7-438d-b1b3-e23004e0982b": "Media",
            "3cf38e0a-d4b1-426d-9b8e-008e7a41cf8d": "Multilingual",
            "d1322ab4-e2be-4f21-9e01-8c19b3da8bea": "Performance",
            "01df2105-2397-4a0e-b34c-80da1c3b1208": "Search engine optimization (SEO)",
            "8117d8b0-f171-414d-b384-0bafa81bef9f": "Security",
            "8d7b9b34-6ae2-4e9b-b3a2-f0bb3109500a": "Site search",
            "dcb48e9f-6afa-4842-8ef6-44b90b083fcc": "Site structure",
            "7c5db130-79b8-4130-a09c-c197333e7d13": "User engagement"
          },
          "value": []
        },
        "securityCoverage": {
          "_type": "boolean",
          "name": "Security advisory coverage",
          "group": null,
          "value": true,
          "on_label": "Show projects covered by a security policy",
          "off_label": "Show all"
        },
        "maintenanceStatus": {
          "_type": "boolean",
          "name": "Maintenance status",
          "group": null,
          "value": true,
          "on_label": "Show actively maintained projects",
          "off_label": "Show all"
        },
        "developmentStatus": {
          "_type": "boolean",
          "name": "Development status",
          "group": null,
          "value": false,
          "on_label": "Show projects under active development",
          "off_label": "Show all"
        }
      }
    }
    

Everything looks good to me, thanks, RTBC.

phenaproxima’s picture

Assigned: Unassigned » phenaproxima
Status: Reviewed & tested by the community » Needs work

I spoke to @tim.plunkett about this and we agreed that this should probably actually get used by the Svelte code, at least a little bit, before we merge it. Self-reassigning to implement that.

phenaproxima’s picture

Assigned: phenaproxima » Unassigned
Status: Needs work » Needs review

Alright -- it's a start, but now the boolean filters (maintenance status, development status, security coverage) are using the filter definition from drupalSettings.

I wanted to do it for the category filter too, but that code is very messy and needs to be heavily refactored in another issue.

phenaproxima’s picture

chrisfromredfin made their first commit to this issue’s fork.

chrisfromredfin’s picture

Status: Needs review » Fixed

step in the right direction...

Status: Fixed » Closed (fixed)

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