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

autoconversion: Fix/conversion filename bug #486

Closed interim17 closed 3 months ago

interim17 commented 5 months ago

Time estimate or Size

Medium

This should be working with current viewer patch.

Problem

Converted trajectories were not downloadable, had no titles in the header, and were buggy when loaded after other trajectories.

Solution

The biggest part of this change is a new flow to receive converted files, first handleIncomingConvertedFile in the viewer panel and then receiveConvertedFileLogic in redux.

handleIncomingConvertedFile puts the name and title into state for use in the header, download menu, etc.

The receiveConvertedFileLogic calls controller.changeFile with the right arguments to keep the websocket connection we established during conversion, switching connections was causing bugs.

Some of this was fixed by recent viewer PR, and this change set brings the website into alignment with viewer in how it calls controller methods like convertTrajectory and changeFile.

Miscellaneous changes:

To review:

github-actions[bot] commented 4 months ago

Coverage report

St.:grey_question:
Category Percentage Covered / Total
🟑 Statements
66.6% (-2.17% πŸ”»)
640/961
🟑 Branches
65.73% (-0.93% πŸ”»)
94/143
πŸ”΄ Functions
35.39% (-1.63% πŸ”»)
86/243
🟑 Lines
65% (-2.38% πŸ”»)
572/880
Show new covered files 🐣
|
St.:grey_question:
| File | Statements | Branches | Functions | Lines | | :----------------------------------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------- | :--------- | :------- | :-------- | :----- | | 🟒 | constants/index.ts | 100% | 100% | 100% | 100% | | 🟒 |
`...` / conversion-data-types.ts
| 100% | 100% | 100% | 100% | | 🟒 | util/index.ts | 100% | 100% | 100% | 100% | | 🟒 |
`...` / userUrlHandling.ts
| 100% | 100% | 100% | 100% | | 🟒 |
`...` / interfaces.ts
| 100% | 100% | 100% | 100% | | 🟒 | state/index.ts | 100% | 100% | 66.67% | 100% | | πŸ”΄ |
`...` / reducer.ts
| 21.43% | 100% | 0% | 21.43% | | 🟒 | state/util.ts | 100% | 77.78% | 100% | 100% | | 🟒 |
`...` / constants.ts
| 100% | 100% | 100% | 100% | | 🟒 |
`...` / types.ts
| 90.91% | 100% | 66.67% | 88.89% | | πŸ”΄ |
`...` / reducer.ts
| 21.74% | 100% | 0% | 21.74% | | 🟒 |
`...` / constants.ts
| 100% | 100% | 100% | 100% | | πŸ”΄ |
`...` / reducer.ts
| 27.27% | 0% | 0% | 27.27% | | 🟒 |
`...` / constants.ts
| 100% | 100% | 100% | 100% | | 🟒 |
`...` / types.ts
| 100% | 100% | 100% | 100% | | 🟑 |
`...` / reducer.ts
| 71.43% | 100% | 0% | 71.43% | | 🟒 |
`...` / constants.ts
| 100% | 100% | 100% | 100% | | 🟒 |
`...` / index.ts
| 100% | 100% | 100% | 100% | | πŸ”΄ |
`...` / actions.ts
| 51.43% | 100% | 0% | 51.43% | | πŸ”΄ |
`...` / logics.ts
| 15.91% | 0% | 0% | 16.28% | | πŸ”΄ |
`...` / actions.ts
| 52.63% | 100% | 0% | 52.63% | | 🟑 |
`...` / actions.ts
| 66.67% | 100% | 0% | 66.67% | | 🟒 |
`...` / index.ts
| 100% | 100% | 100% | 100% | | πŸ”΄ |
`...` / basic.ts
| 66.67% | 100% | 0% | 50% | | πŸ”΄ |
`...` / actions.ts
| 53.33% | 100% | 0% | 53.33% | | 🟒 |
`...` / index.ts
| 100% | 100% | 100% | 100% | | 🟒 |
`...` / basic.ts
| 84.85% | 100% | 54.55% | 83.33% | | 🟒 |
`...` / index.ts
| 100% | 100% | 100% | 100% | | πŸ”΄ |
`...` / logics.ts
| 27.27% | 0% | 0% | 27.27% | | 🟒 |
`...` / index.ts
| 100% | 100% | 100% | 100% | | 🟒 |
`...` / basic.ts
| 88.89% | 100% | 66.67% | 88.89% | | 🟒 |
`...` / index.ts
| 100% | 100% | 100% | 100% | | πŸ”΄ |
`...` / logics.ts
| 45.45% | 0% | 0% | 45.45% | | 🟒 |
`...` / index.ts
| 100% | 100% | 100% | 100% | | 🟒 |
`...` / basic.ts
| 66.67% | 100% | 0% | 85.71% | | 🟒 |
`...` / index.ts
| 100% | 100% | 100% | 100% | | 🟒 |
`...` / logics.ts
| 100% | 100% | 100% | 100% | | πŸ”΄ |
`...` / configure-store.ts
| 56.25% | 0% | 0% | 56.25% | | 🟒 |
`...` / selectors.ts
| 100% | 100% | 100% | 100% | | 🟒 |
`...` / selectors.ts
| 100% | 100% | 100% | 100% | | 🟒 |
`...` / selectors.ts
| 100% | 100% | 100% | 100% | | 🟒 |
`...` / constants.ts
| 100% | 100% | 100% | 100% |

Test suite run success

104 tests passing in 7 suites.

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

meganrm commented 3 months ago

can you convert this to a draft until the tests have been fixed? (sorry! I accidentally hit the close button instead of the comment button, didn't mean to do that)