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

React bump fixes #467

Closed interim17 closed 6 months ago

interim17 commented 6 months ago

Bumping React messed with a few small things in auto-conversion world, mostly little styling tweaks.

The only functional changes were in the antd Upload component.

1) customRequest and handleFileSelection had issues when selecting a file. Previously customRequest and onChange each received props and worked in sync. After bumping React, customRequest was receiving undefined arguments and throwing errors, I think because React 18 batches state updates and this introduced a delay. Moving the call of customRequest inside of handleFileSelection fixed it. Screenshot 2024-02-19 at 10 28 33 AM

2) Also had to add the custom render function for the fileList because it started rendering an unwanted tooltip (that was weirdly full of the DOCUMENT html markup...).

Screenshot 2024-02-19 at 10 30 09 AM

Note: a lot of things (including this code) were piling up in this PR, talked with @ascibisz and RE: dev chat, we are breaking it up into at least two pieces that are more targeted. I think this is wise and will make review easier, the downside in this case is that we can't complete the auto-conversion process with current viewer/octopus on this branch. You need the rest of the changes to take a file through the whole conversion process.

This PR can be reviewed by

Screenshot 2024-02-16 at 3 11 22 PM Screenshot 2024-02-16 at 3 12 09 PM Screenshot 2024-02-16 at 3 12 19 PM Screenshot 2024-02-16 at 3 12 35 PM