Skip to content

Extract text from annotated shapes and use it in thumbnail alt text #7077

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

robertknight
Copy link
Member

@robertknight robertknight commented May 14, 2025

When the area selected for a rect or pin annotations contains PDF text, extract that text and store it in the shape selector. This is then used to generate better alt text for the thumbnail in the sidebar:

Text in image

The length of the extracted text is capped to stop the selector JSON from becoming too large.

In future we plan to enable users to enter a text description for the thumbnail. That description will either replace or be combined with the extracted text.

Copy link

codecov bot commented May 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.39%. Comparing base (bbed920) to head (0a79f88).
Report is 6 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7077   +/-   ##
=======================================
  Coverage   99.38%   99.39%           
=======================================
  Files         277      278    +1     
  Lines       11273    11314   +41     
  Branches     2719     2727    +8     
=======================================
+ Hits        11204    11245   +41     
  Misses         69       69           

☔ 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.

@robertknight robertknight force-pushed the shape-selector-text branch 4 times, most recently from d641c24 to a35e540 Compare May 15, 2025 05:54
Add a field to shape selectors containing the text that intersects a shape,
using word-level granularity.
Include extracted document text from shape selectors in the alt text of
thumbnails.
@robertknight robertknight force-pushed the shape-selector-text branch from a35e540 to 0a79f88 Compare May 15, 2025 06:24
@robertknight robertknight marked this pull request as ready for review May 15, 2025 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant