simularium / simularium-website

Front end website for the Simularium project, includes the Simularium viewer
https://simularium.allencell.org
Apache License 2.0
6 stars 3 forks source link

fix/hide tooltips after click #477

Closed interim17 closed 5 months ago

interim17 commented 5 months ago

Time to review: Small: 5 minutes

Problem

Closes #297 specifially criteria 1 and 2 @meganrm already resolved criteria 3 and 4 in previous work.

Solution

We need to manage the tooltip open/closed state via a local state so we can keep it closed after a click event, and only update the title text while the tooltip is closed so that the new text doesn't flicker before the tooltip has a chance to hide.

Steps to Verify:

  1. Try the different hide and highlight checkboxes, observe the tooltip behavior: after clicking it should hide until the mouse has left and re-entered.

https://github.com/simularium/simularium-website/assets/24981838/2efef448-aa93-417f-a6eb-67b71e0063e2

github-actions[bot] commented 5 months ago

Coverage report

St.:grey_question:
Category Percentage Covered / Total
🟑 Statements 73.27% 603/823
🟑 Branches 68.38% 80/117
πŸ”΄ Functions 40.31% 79/196
🟑 Lines 71.73% 538/750

Test suite run success

99 tests passing in 7 suites.

Report generated by πŸ§ͺjest coverage report action from 82e731ff5a7fe0b8e923f898f456e6f32f9ac900