ETT-1104: fix TIFF full resolution download bug #168
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Svelte's reactivity system is one of the main features of the framework, but prior to Svelte 5, it was messy to track which variables and functions were reactive and when those variables were updated to track changes.
What I found out with the download panel is that the format and range components were triggering a re-render/update of the hidden download form, but the resolution component was not triggering an update of the same form. I refactored the function that handles updating those fields, then added the
targetPPI(resolution) variable as an argument to the function so it could be included in the update.I added a new playwright test that selects a scan, selects TIFF, selects full resolution, then checks that the hidden form was updated with the correct value (input name="target_ppi" value="0"). I also updated an imgsrv playwright test with the correct URL param for "current page scan" full resolution tiff (
size=fullinstead ofsize=ppi:300).Those new tests are passing, and this is staged on dev-3 if you want to double check: https://dev-3.babel.hathitrust.org/cgi/pt?id=uc2.ark:/13960/t76t0jn2z&seq=283