allen-cell-animated / website-3d-cell-viewer

Other
5 stars 4 forks source link

feature: Loading from the landing page, viewer page routing #212

Closed ShrimpCryptid closed 5 months ago

ShrimpCryptid commented 6 months ago

Estimated review size: medium, 30-40 minutes

Closes #188, the landing page implementation!

This change finishes implementing loading from the landing page and also sets up routing for the app.

These changes seem large, but the majority of the changes are just file moves and renames! I'll note what files you can compare between, and a summary of any changes on each file.

Changes:

Videos (🔊)

Browser Router:

https://github.com/allen-cell-animated/website-3d-cell-viewer/assets/30200665/176cc000-384f-4e75-a5cf-8cc471499f0a

Hash Router:

https://github.com/allen-cell-animated/website-3d-cell-viewer/assets/30200665/51920aa7-e427-4793-b973-4cc85ff7fd72

Loading empty viewer: image

Validation:

  1. Run the app locally. The default URL should open on the landing page.
  2. Click on the "Load" button, and it should open the volume in the /viewer page.
  3. Refreshing the page should still show the same volume.
  4. Go to http://localhost:9020/viewer?url=https://animatedcell-test-data.s3.us-west-2.amazonaws.com/20200323_F01_001/P13-C4.zarr . This should also open correctly in the browser.
  5. Go to http://localhost:9020?url=https://animatedcell-test-data.s3.us-west-2.amazonaws.com/20200323_F01_001/P13-C4.zarr . This will redirect to the /viewer page.
ShrimpCryptid commented 6 months ago

good to delete yes, but wondering how we can get test data like this into the viewer during dev. These settings are basically how we want the variance dataset to be presented in the viewer.

Can't respond directly to this for some reason, but I did end up adding props for the AppWrapper component where this could be overridden. You could also edit LandingPage/content.ts to add a button for whatever test data you're working with, or include it via the URL?

ShrimpCryptid commented 6 months ago

Leaving further refactor of project until #215.