pharmaR / riskassessment

Risk Assessment Demo App: https://rinpharma.shinyapps.io/riskassessment
https://pharmar.github.io/riskassessment/
Other
98 stars 24 forks source link

Help users understand metric score cards #760

Closed aclark02-arcus closed 1 month ago

aclark02-arcus commented 3 months ago

Closes #652 This PR does a number of things to help clarify the metric risk scores. (1) First, it adds tooltips to all the riskmetric cards. Then it (2) adds a modal dialog that acts as a legend which provides additional context on how to interpret these assessment & score values. Last, it (30 links back to riskmetric documentation on the 'About' Tab. Images below.

1. bslib tooltips

image

Note: this isn't working as intended for the hyperlinked cards (Dependencies & Reverse Dependencies). I would ultimately like to maintain these hyperlinks, but render the clickable area to just the title and assessment value instead of the whole card.

2. Legend

image

Note, the button ✅ will only show in a metricBox metricGrid where a riskmetric card exists.

3. References users back to riskmetric documentation

image

jthompson-arcus commented 2 months ago

@aclark02-arcus here is a potential solution to the problem you had with tooltips for the cards that redirect (i.e. Dependencies and Reverse Dependencies). The only downside is that the title element has been removed, but I think it could be added back in easily enough. patch.txt

jthompson-arcus commented 2 months ago

Snipping tool does not capture mouse pointer, but it would look something like this when hovering on the metric label.

image
narayanan-iyer-pfizer commented 2 months ago

image What are the opinions on this kind of meter?

aclark02-arcus commented 2 months ago

What are the opinions on this kind of meter?

@narayanan-iyer-pfizer, it's funny you bring that up, because that's actually where I first started when building these metric card visuals. See this comment which showcases a POC. Overall, we found them to be a bit "busy" aesthetically and hard to tell when things were passing/failing, which is why we opted for a more simple meter.

aclark02-arcus commented 2 months ago

Hi @jthompson-arcus, I adopted your patch. I think it works well! Thanks for solving that riddle 👍🏼 If all else looks good, please push this one into dev.

aclark02-arcus commented 2 months ago

Oh darn, I just realized that I haven't added these changes into the html reports. Converting to draft for now.

aclark02-arcus commented 2 months ago

Okey dokey @jthompson-arcus, I fixed the issue with tooltips on the html reports. This is ready for review (and hopefully merge).

aclark02-arcus commented 2 months ago

Hey @jthompson-arcus, I accepted your changes and also made a few small edits to the modal with my latest commit:

This is the result:

image