Skip to content

Conversation

@carylwyatt
Copy link
Member

@carylwyatt carylwyatt commented Nov 17, 2025

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=full instead of size=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

@carylwyatt carylwyatt requested a review from moseshll November 18, 2025 16:21
let flattenedSelection = [];
$: action = buildAction(format, range);
$: iframeName = `download-module-xxx`; // ${tunnelFormAttempt}`;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed this because the variable iframeName was not in use anywhere. It must've been leftover from some refactor a while back.

Copy link
Contributor

@moseshll moseshll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this fixes the issue when tested on dev-3. APPROVE

@carylwyatt carylwyatt merged commit c4279a0 into main Nov 19, 2025
2 checks passed
@carylwyatt carylwyatt deleted the ETT-1104-img-download-resolution branch November 19, 2025 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants