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/share download styling #448

Closed interim17 closed 9 months ago

interim17 commented 9 months ago

Problem

@lynwilhelm pointed out some styling mistakes on theShare andDownload buttons, and added a couple tweaks not in the original designs. Designs here and here

This PR should fix those problems and I added a couple readability changes. I went over the visual changes with @lynwilhelm in a huddle so feel confident this branch reflects design intentions.

Styling changes:

Note about selectors: .container :global(.ant-tooltip-open.ant-btn) The hover state and tooltip open behavior were not in sync, so this rule is used of the :hover pseudo-class.

@lynwilhelm also noticed a bug that I could not reproduce where a tooltip would open automatically when a trajectory is loaded, if the user had hovered over the share button BEFORE loading the trajectory. I'm crossing my fingers that some of these changes will resolve that issue, but please let me know if you can reproduce it on this branch.

Steps to Verify:

  1. Run website
  2. Check button styling before and after loading trajectory
  3. From main page: hover over share button, then load trajectory
  4. See if tooltip opens erroneously

Screenshots:

Before, disabled:

incorrectdisabled

Before, hover:

incorrecthover incorrectdownload

After, disabled:

correctdisabled

After, hover:

correcthover correcthovershare
github-actions[bot] commented 9 months ago

Coverage report

St.:grey_question:
Category Percentage Covered / Total
🟑 Statements
74.9% (-0.03% πŸ”»)
588/785
🟑 Branches 70.18% 80/114
πŸ”΄ Functions 42.16% 78/185
🟑 Lines
73.46% (-0.04% πŸ”»)
526/716

Test suite run success

99 tests passing in 7 suites.

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

meganrm commented 9 months ago

can you add before and after screen shots?

interim17 commented 9 months ago

@meganrm Added some screenshots of before and after for disabled and hover states. Let me know if you'd like to see anything else.