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.
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...).
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
checking that your screen looks like the screenshots below
going to /import and uploading a file, there should be no error
hover the cursor over that file and seeing if there is an erroneous tooltip
turn octopus off OR choose an incorrect file type to see the error modal stylings look ok
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
andhandleFileSelection
had issues when selecting a file. PreviouslycustomRequest
andonChange
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 ofcustomRequest
inside ofhandleFileSelection
fixed it.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...).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
/import
and uploading a file, there should be no error