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/max file size #518

Closed interim17 closed 2 months ago

interim17 commented 2 months ago

Time estimate or Size

small

Problem

Closes #516

Solution

Add a check for file size in handleFileSelection

This also would have been the fourth conditional render at the top of the JSX, which was looking messy to my eye,.

I made an enum for error types, and consolidated all the modal open/closed states into a single typed value conversionError and a single function can now close all the modals, I think it's a lot cleaner this way.

github-actions[bot] commented 2 months ago

Coverage report

St.:grey_question:
Category Percentage Covered / Total
🟑 Statements
68.78% (+0.2% πŸ”Ό)
663/964
🟑 Branches
65.71% (+0.5% πŸ”Ό)
92/140
πŸ”΄ Functions
36.48% (+0.27% πŸ”Ό)
85/233
🟑 Lines
67.38% (+0.22% πŸ”Ό)
595/883

Test suite run success

104 tests passing in 7 suites.

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