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

feat: create popover for glossary items #270

Closed mradamcox closed 3 months ago

mradamcox commented 3 months ago

Initial implementation of #257, a "glossary" that can power extra definitions for key terms. It is implemented with a simple MUI popover that has a style matching the buttons within the map interface. The popover appears on click (not on hover) so it should work fine on mobile as well.

image

image

By default, it looks for a predefined entry in the meta/glossary.json file, but any content can be passed to it, if there are context-specific definitions we want to display.

To test:

  1. go to: https://deploy-preview-270--cheerful-treacle-913a24.netlify.app/search
  2. click on the underlined term "health equity" in the text description

We could implement this anywhere within the website, besides news posts and showcase pages (though, it would be possible to set that up). For button labels, we could use this same style but make the popover appear on hover (so as not to interfere with existing click events).

netlify[bot] commented 3 months ago

Deploy Preview for cheerful-treacle-913a24 ready!

Name Link
Latest commit f34fc2f8703084d1f0a5e08f1cf3a26f4918680c
Latest deploy log https://app.netlify.com/sites/cheerful-treacle-913a24/deploys/66ce292483d3e70008ac1c91
Deploy Preview https://deploy-preview-270--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 3 months ago

@shubhamk008 I'm going to go ahead and merge this, but we can easily make changes down the road if needed. Seems like the core concept here is good enough to go ahead with.