Skip to content

Highlight quotes and store in browser#1538

Open
schu96 wants to merge 6 commits into
internetarchive:masterfrom
schu96:annotations
Open

Highlight quotes and store in browser#1538
schu96 wants to merge 6 commits into
internetarchive:masterfrom
schu96:annotations

Conversation

@schu96
Copy link
Copy Markdown
Collaborator

@schu96 schu96 commented Apr 20, 2026

Pivoting from using native browser Text Fragments

Highlights in the bookreader can now be stored in browser localStorage, with plans for annotations coming soon

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 20, 2026

Codecov Report

❌ Patch coverage is 4.73186% with 302 lines in your changes missing coverage. Please review.
✅ Project coverage is 65.07%. Comparing base (2908b1e) to head (0940d6e).
⚠️ Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
src/util/TextSelectionManager.js 2.90% 259 Missing and 8 partials ⚠️
src/plugins/url/UrlPlugin.js 0.00% 23 Missing ⚠️
src/plugins/url/plugin.url.js 50.00% 6 Missing ⚠️
src/BookReader.js 25.00% 3 Missing ⚠️
src/plugins/plugin.text_selection.js 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1538      +/-   ##
==========================================
- Coverage   68.98%   65.07%   -3.92%     
==========================================
  Files          65       65              
  Lines        5556     5815     +259     
  Branches     1229     1291      +62     
==========================================
- Hits         3833     3784      -49     
- Misses       1689     1989     +300     
- Partials       34       42       +8     

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

@schu96 schu96 marked this pull request as ready for review April 30, 2026 00:03
Comment thread src/plugins/url/UrlPlugin.js Outdated
* @param {string} urlString
* @returns {object}
*/
convertParamToHighlight(urlString) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This would be better as a single url parameter, similar to our TextFragment from before. Eg ?text=5:prefix,quote,suffix . Note the tweak that includes the page index at the front to help with disambiguation.


/** The experiments that should be shown in the experiments panel */
enabledExperiments: ['translate', 'copyLinkToHighlight'],
enabledExperiments: ['translate', 'copyLinkToHighlight', 'annotateHighlight'],
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
enabledExperiments: ['translate', 'copyLinkToHighlight', 'annotateHighlight'],
enabledExperiments: ['translate', 'copyLinkToHighlight'],

Fix for failed test

Jest test case fix
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.

2 participants