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/share time url #424

Closed interim17 closed 1 year ago

interim17 commented 1 year ago

Problem

Users would like to share trajectories at particular timestamps, so we are storing and accessing those timestamps with URL params.

Closes: #418 and #410

with @meganrm

Solution

This PR should address: 1) the ability to preserve a timepoint in a simulation via a URL param 2) the ability to share a URL with such a timestamp 3) and lay the groundwork/utilities for addressing future URL params (camera position, etc.)

Type of change

Change summary:

Added UI components and functions for handling user input, Redux logics for setting trajectory state via incoming params, and utilities for checking, clearing and resetting URL params.

Steps to Verify:

  1. Verify that the Share button in the top right is disabled when no trajectory is loaded.
  2. Load a trajectory, select a time stamp, use the share button.
  3. Try toggling back and forth from default share time to custom.
  4. Copy provided URL string into browser and verify that trajectory loads at specified time.
github-actions[bot] commented 1 year ago

Coverage report

❌ An unexpected error occurred. For more details, check console

Error: The process '/usr/local/bin/npx' failed with exit code 1
St.:grey_question:
Category Percentage Covered / Total
🟑 Statements
74.01% (-1.05% πŸ”»)
581/785
🟑 Branches
69.03% (-1.62% πŸ”»)
78/113
πŸ”΄ Functions
41.3% (-0.36% πŸ”»)
76/184
🟑 Lines
72.52% (-1.2% πŸ”»)
520/717
Show files with reduced coverage πŸ”»
|
St.:grey_question:
| File | Statements | Branches | Functions | Lines | | :----------------------------------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------- | :------------------------------------------------------------- | :----------------------------------------------------------- | :----------------------------------------------------------- | :------------------------------------------------------------- | | 🟒 | src/util/index.ts |
88.89% (-11.11% πŸ”»)
|
91.67% (-8.33% πŸ”»)
|
90.91% (-9.09% πŸ”»)
|
87.27% (-12.73% πŸ”»)
| | πŸ”΄ |
`...` / actions.ts
|
52.17% (-0.21% πŸ”»)
| 100% | 0% |
52.17% (-0.21% πŸ”»)
| | πŸ”΄ |
`...` / logics.ts
|
21.37% (-0.94% πŸ”»)
| 0% | 0% |
21.37% (-0.94% πŸ”»)
|

Test suite run failed

Failed tests: 0/93. Failed suites: 0/7.

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

github-actions[bot] commented 1 year ago

Coverage report

St.:grey_question:
Category Percentage Covered / Total
🟑 Statements
74.84% (-0.23% πŸ”»)
586/783
🟑 Branches
69.64% (-1% πŸ”»)
78/112
πŸ”΄ Functions
41.85% (+0.18% πŸ”Ό)
77/184
🟑 Lines
73.43% (-0.3% πŸ”»)
525/715
Show files with reduced coverage πŸ”»
|
St.:grey_question:
| File | Statements | Branches | Functions | Lines | | :----------------------------------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------- | :------------------------------------------------------------- | :------- | :-------- | :------------------------------------------------------------- | | πŸ”΄ |
`...` / actions.ts
|
52.17% (-0.21% πŸ”»)
| 100% | 0% |
52.17% (-0.21% πŸ”»)
| | πŸ”΄ |
`...` / logics.ts
|
21.37% (-0.94% πŸ”»)
| 0% | 0% |
21.37% (-0.94% πŸ”»)
|

Test suite run success

96 tests passing in 7 suites.

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