CodeForPhilly / clean-and-green-philly

Dashboard to target Philly vacant properties for anti-gun violence interventions
https://www.cleanandgreenphilly.org/
MIT License
31 stars 63 forks source link

Search doesn't work #582

Closed thansidwell closed 6 months ago

thansidwell commented 6 months ago

You can't click into the search field to use it.

https://github.com/CodeForPhilly/vacant-lots-proj/assets/1965986/d1a4fae1-4fc9-45ca-a38d-c05f170d9f64

jgrimes86 commented 6 months ago

Adding a pointer-events attribute to the following section of globals.css (starting on line 225) seems to fix the issue.

#main .maplibregl-ctrl-top-right {
  top: 20px;
  right: 20px;
  pointer-events: bounding-box;
}

@thansidwell is it OK if I make a pull request so you can check out this change?

thansidwell commented 6 months ago

@jgrimes86 Definately!

thansidwell commented 6 months ago

Just a thought. It seems a bit strange to add something to make it work even though it worked before. It seems like we should be taking something away whatever is obstructing it.

But I'm good whatever works!

jgrimes86 commented 6 months ago

@thansidwell I think the issue is that @import "~mapbox-gl/dist/mapbox-gl.css"; was removed from globals.css. That css file includes a 'pointer-events: auto' attribute for all map controls, along with styling for other elements. I assume it was removed to allow custom styling of other map features, so I'm afraid of adding it back in and breaking other things.

thansidwell commented 6 months ago

Ah, that makes sense now!

thansidwell commented 6 months ago

@jgrimes86 Also the map legend tooltip doesn't work either. I assume for a similar reason.

https://github.com/CodeForPhilly/vacant-lots-proj/assets/1965986/5c9608cf-2c59-4b57-8252-3235f91fdefa

jgrimes86 commented 6 months ago

Yes, that was the same issue. I didn't know that the tooltip had been interactive. I'm going to push a commit to my PR request branch to address that issue.

Also, I made one more small change to fix a bug with the map click function. Clicking the map had been re-directing to the last searched property.

nlebovits commented 6 months ago

closed by #586