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

#141 and #142 #149

Closed pengyin-shan closed 7 months ago

pengyin-shan commented 7 months ago

This pull request addresses #141 and #147 but is in the initial stage and could change direction based on further design decisions.

How to Test

  1. Open the search page. You should see the Spatial Resolution filter removed from the filter list and now at the top of the left panel.

  2. During the initialization stage, only state and county layers have been applied to the map. (The blue dots are my test on spatial coverage locations. They are the counties of the City Health Dashboard. I leave the code in case we need this in the future, but they don't belong to #141 and #147).

  3. Play around with the Spatial Resolution filter. You should see the layers change based on your selection, but the state and county layers are always there.

  4. Perform other random search and filter actions. The Spatial Resolution layer should not be affected by these operations. (i.e., it is a distinct control of the map)

NOTE:

  1. I think this matches our plan for the map behavior, but please let me know if not, and I will modify the function accordingly. I think I should probably end here for now and resume after we make more decisions on map behavior.
  2. There is a lot of commented-out code and some code that is currently not used. I still keep them there because there's a probability we will need them in the future, as we are still in the decision-making process for the map.
netlify[bot] commented 7 months ago

Deploy Preview for cheerful-treacle-913a24 ready!

Name Link
Latest commit ff2af91fbd95c7bd95a229354fb417e251be9ff1
Latest deploy log https://app.netlify.com/sites/cheerful-treacle-913a24/deploys/6619859cb19d800008fb5de6
Deploy Preview https://deploy-preview-149--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.

mradamcox commented 7 months ago

I'll look at this locally as soon as I can, but for me in the deploy preview the search page begins to render and then returns an error page with

Application error: a client-side exception has occurred (see the browser console for more information).

The console shows

Uncaught (in promise) TypeError: this.map.style is undefined

(firefox and chrome)

pengyin-shan commented 7 months ago

I'll look at this locally as soon as I can, but for me in the deploy preview the search page begins to render and then returns an error page with

Application error: a client-side exception has occurred (see the browser console for more information).

The console shows

Uncaught (in promise) TypeError: this.map.style is undefined

(firefox and chrome)

Ops probably some building errors are going on...thank you for letting me know and I'll fix it

mradamcox commented 7 months ago

FWIW the build and deployment process does run without error on Netlify.

pengyin-shan commented 7 months ago

FWIW the build and deployment process does run without error on Netlify.

yes, and my local version works fine šŸ˜“ I think it is because the JSON file that contains data is not in the correct folder, thus the API cannot read data correctly, working on the fix now

pengyin-shan commented 7 months ago

The client-side error should be fixed now

pengyin-shan commented 7 months ago

This is good progress, and definitely good enough for now. One thing that will need to change is that when a spatial category is selected, then all of the map layers are removed and re-added, instead of only the addition of that single new layer. Something to fix down the road, I agree that we'll revisit this only after getting more design input.

That sounds good, once we see more design, let's discuss this and I will modify the special resolution behavior accordingly