healthyregions / SDOHPlace

Landing page and data discovery application for SDOH Place Project.
https://sdohplace.org
GNU General Public License v3.0
1 stars 1 forks source link

Add matched theme icon and enable all subject filters #304

Closed pengyin-shan closed 2 months ago

pengyin-shan commented 2 months ago

This PR addresses #287, #296, and #297. It adds matching MUI icons to subjects in the result list and detail panel and enables the filter operation when someone clicks on them.

Additionally, this PR includes a fix for #305. When a user opens the detailed view and then applies a filter that triggers the "no results" view, the map view will be restored instead of leaving the page blank.

How to Test

  1. Navigate to the search page. You should see that all result item header images have been updated to match their corresponding subject:

    Screenshot 2024-09-20 at 5 03 37 PM
  2. Click on an item with the "Compose" icon. You should see more than one subject tag for this item in the detailed view, with the icon in the title also updated:

    Screenshot 2024-09-20 at 5 07 11 PM
  3. Click on an item with another subject icon. You should see the corresponding subject tag for this item in the detailed view:

    Screenshot 2024-09-20 at 5 08 12 PM
  4. Click the subject icon in the detailed view. The result list should now be filtered by this subject:

    Screenshot 2024-09-20 at 5 08 34 PM
  5. While in the detailed view, apply a spatial resolution filter that does not match this result item. The detailed view should be replaced by the Map view, as this item will no longer be in the result list:

    Screenshot 2024-09-20 at 5 12 42 PM
  6. Search for "a" in the search box. You should see the "no results" view with all matched subject buttons displayed. Note that I’ve simply placed all subject buttons here for now; we can adjust this after improving the recommendation system:

    Screenshot 2024-09-20 at 5 13 05 PM
  7. Click "Compose," and you should see the same result as in step 2. During these operations, the user can always click "reset all filters" to return to the original state without interfering with the query results:

    Screenshot 2024-09-20 at 5 15 39 PM
netlify[bot] commented 2 months ago

Deploy Preview for cheerful-treacle-913a24 ready!

Name Link
Latest commit 5730c135a416084f01a9a141f35ffa42721b10ba
Latest deploy log https://app.netlify.com/sites/cheerful-treacle-913a24/deploys/66edf7285dc2f800084fb663
Deploy Preview https://deploy-preview-304--cheerful-treacle-913a24.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

pengyin-shan commented 2 months ago

The last commit removes the "Compose" icon tag, so please skip step 7 in the description above