Skip to content

Conversation

@schu96
Copy link
Collaborator

@schu96 schu96 commented Dec 3, 2025

Closes #1452, see comment for screenshot of the fix

Filters the XMLpage contents by WORD and looks for coords attributes where the left or top coordinates are 0px. These word elements will not be rendered onto the page since there is no reliable way to extrapolate the position of the text.

We can be confident that these fields should not exist in the leftmost/topmost part of a work for a significant majority of cases.

@schu96 schu96 force-pushed the text-selection-toc-scaling branch from c302bc9 to 5fedbf4 Compare December 3, 2025 05:49
@codecov
Copy link

codecov bot commented Dec 3, 2025

Codecov Report

❌ Patch coverage is 60.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 69.36%. Comparing base (62615a8) to head (75ccc70).
⚠️ Report is 8 commits behind head on master.

Files with missing lines Patch % Lines
src/plugins/plugin.text_selection.js 60.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1460      +/-   ##
==========================================
- Coverage   69.48%   69.36%   -0.12%     
==========================================
  Files          62       62              
  Lines        5306     5315       +9     
  Branches     1149     1149              
==========================================
  Hits         3687     3687              
- Misses       1585     1593       +8     
- Partials       34       35       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@cdrini cdrini left a comment

Choose a reason for hiding this comment

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

Lgtm! Tested and confirmed working. I added a console.error so we can track this in sentry when it happens.

@cdrini cdrini merged commit 6967187 into internetarchive:master Dec 8, 2025
8 of 10 checks passed
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.

Giant Text Selection layer for Table of Contents page

2 participants