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

feature/viewport button component #478

Closed interim17 closed 5 months ago

interim17 commented 5 months ago

Time to review:

Medium Design review with UX complete.

Problem

Viewport buttons (camera and playback controls) do not match current style guidance. The code for these buttons and their stylesheets is not DRY.

Solution

Create ViewportButton component. Each ViewportButton wraps a button in a tooltip and takes a short list of custom props that get it styled correctly. Implementing components (playback controls, camera controls, forthcoming record movies component) are concise and readable.

Relevant re-organizing and re-naming is ongoing in colors.css. It's a pain, but if any reviewers would like to use it I have a python script that scans the repo for unused css vars and css properties that use variables that aren't actually defined (there were several!) that is making this somewhat less painful T_T

Steps to Verify:

  1. Confirm styling is correct for buttons in default, hover, and active states.

Screenshots (optional):

Old:

Screenshot 2024-03-13 at 12 06 29 PM

New:

Screenshot 2024-03-13 at 12 06 47 PM
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 2d54a9be5d5b7141c72f007f057e787c5dfc99fd