Fix #612: Added tooltips for SinglePropertyDetail and MapLegend
Description
This PR addresses issue #612 .
I was very limited in what I could modify with the MapLibre library components. It looks like the only way to use NextUI Tooltips is to create custom components. I also played around with the CSS classes and tried displaying elements with :hover to no avail.
The simplest workaround I found is to style the title attribute tooltip in ::after. There are a couple things to note:
- The default tooltip still shows after few seconds.
- Centering the tooltips will cause parts of it to be cut off (considered overflow). Changing the z-index didn't seem to help.
- I haven't tried yet, but I don't think I can modify the title attribute directly (text inside these tooltips).
Edit: Just noticed the tooltip persisting shortly when scrolling in the video, should the closeDelay be set to 0 to avoid that?
Testing/Proof
https://github.com/CodeForPhilly/clean-and-green-philly/assets/28910543/18a7fa57-8387-4ed0-96e6-5f6ed611f953
@amyyeung17 is attempting to deploy a commit to the Clean and Green Philly Team on Vercel.
A member of the Team first needs to authorize it.