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/refactor after merging main #488

Closed interim17 closed 5 months ago

interim17 commented 5 months ago

Time estimate or Size

Medium/Small: many changes are obvious, there's essentially no logic

Problem

I merged main into 346 and now the styling is a bit whacked up, because there have been recent changes to color vars, custom modal props, etc. This deals with merge issues and refactors conversion branch to work with current styling approaches.

Note: there is a bug/issue where the converted file is not recognized upon load and so it does not display a title and the Download and Share buttons remain disabled despite a file being loaded. The changes for that bug are in process pending discussion of changes to Octopus and TrajectoryInfo typing. I think its acceptable to proceed with this PR (and merge to main) with that resolution pending, as this will not go to production until Octopus is live.

Solution

This PR fixes the handful of erroneous merge artifacts, and brings the ConversionForm, ConversionOverlay, and various conversion modals into alignment with the recent changes to CustomModal, color variable naming, etc. etc.

Most of the changes to the modals are just using the new props for CustomModal and a couple style tweaks.

To review styling on on modals and processing overlay, outside of just looking at screenshots I suggest just pasting the following code blocks into the ConversionForm render function outside of the usual conditional rendering:

             <ConversionServerErrorModal
                    closeModal={toggleServerCheckModal}
                />

                                <ConversionFileErrorModal
                    closeModal={toggleFileTypeModal}
                    engineType={conversionProcessingData.engineType}
                />

                                <ConversionProcessingOverlay
                    fileName={conversionProcessingData.fileName}
                    cancelProcessing={cancelProcessing}
                />

You can upload an invalid file type to test the file type error, but triggering the server error and getting it to hang out on the processing overlay is a little more fussy.

Steps to Verify:

  1. Convert a file and confirm everything still works after merging main.
  2. Check out the conversion form, overlay and modals and see that they look like the current light-theme guidance.

Screenshots (optional):

Screenshot 2024-04-03 at 5 05 18 PM Screenshot 2024-04-03 at 4 53 59 PM
Screenshot 2024-04-03 at 5 05 44 PM Screenshot 2024-04-03 at 5 05 58 PM