cu-mkp / editioncrafter

Software for the development of EditionCrafter, digital critical edition publication tool
https://cu-mkp.github.io/editioncrafter/
MIT License
8 stars 3 forks source link

Automatically generate thumbnail sizes #59

Closed camdendotlol closed 1 year ago

camdendotlol commented 1 year ago

Summary

This PR also removes a bunch of unneeded dependencies, reducing bundle size by somewhere around 30-50%.

Screenshots

Before

Screenshot 2023-09-07 at 12 46 23 PM

After

Screenshot 2023-09-07 at 12 46 37 PM

Testing

fr640 and Taos are good for testing this, because fr640's canvases are tall and Taos's are wide. Both look good to me.

NickLaiacona commented 1 year ago

The thumbnails look much better, but I'm seeing some new errors in the console when I try this our on my local machine:

Screen Shot 2023-09-12 at 12 50 05 PM

NickLaiacona commented 1 year ago

also, I see these errors when looking at an individual page: Screen Shot 2023-09-12 at 12 51 08 PM

camdendotlol commented 1 year ago

also, I see these errors when looking at an individual page: Screen Shot 2023-09-12 at 12 51 08 PM

Those errors have been in my console for a while, long before this PR. It looks like it's connected to our use of the prefixUrl option in OpenSeaDragon, which tells it where to fetch some UI images. The images are currently in the repo, but it doesn't look like we're actually using them. I'll go ahead and delete them and add the line suggested in https://github.com/openseadragon/openseadragon/issues/210#issuecomment-23445225. It removes the 404 errors and doesn't cause any noticeable UI changes.

camdendotlol commented 1 year ago

The thumbnails look much better, but I'm seeing some new errors in the console when I try this our on my local machine:

Screen Shot 2023-09-12 at 12 50 05 PM

This seems to have been a bug with Storybook and its @storybook/addon-styling plugin. We just upgraded both a month ago, but in the past month Storybook has gone from 7.2 to 7.4 and the styling plugin has been deprecated and replaced. The issue seems to be fixed after upgrading Storybook and replacing the styling plugin with the new recommended one.

Side question: Do we use Puppeteer? I notice it's in the package.json - it's a pretty hefty dependency so I'd like to remove it if we're not using it.

NickLaiacona commented 1 year ago

Thanks! Go ahead and remove puppeteer, we aren't using it since Storybook got in the mix.