"Copy link to highlight" experiment#1512
Conversation
548778a to
4cdb476
Compare
d13eff6 to
a523b45
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1512 +/- ##
==========================================
- Coverage 69.71% 68.98% -0.73%
==========================================
Files 65 65
Lines 5375 5556 +181
Branches 1183 1229 +46
==========================================
+ Hits 3747 3833 +86
- Misses 1594 1689 +95
Partials 34 34 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
cdrini
left a comment
There was a problem hiding this comment.
Looking great! A number of code quality fixes / naming / etc. Note I got up to src/util/TextSelectionManager.js, but still have the rest of the diff to get through.
c53bba1 to
d7116ab
Compare
| postEndRange.setStart(selection.focusNode, selection.focusNode.textContent.length); | ||
| postEndRange.setEnd(pageLayer.lastElementChild, pageLayer.lastElementChild.childElementCount); | ||
| } | ||
| postEndRange.setStart(endNode, endNode.textContent.length); |
There was a problem hiding this comment.
Got an error on this line ; sometimes it seems like the the endNode can have no selection in it!
To repro:
http://127.0.0.1:8000/details/adventureofsherl0000unse/page/62/mode/2up
- Highlight "It missed him" on the bottom of the right page.
- Double/triple click on the selection until the entire line is highlighted
- Try to copy link
Errors:
4c168cc to
342fc62
Compare
There was a problem hiding this comment.
Lgtm! Updated the description with our notes/next steps. This shouldn't otherwise cause any issues with text selection, although I will do a thorough re-test of text selection before this is deployed out. Otherwise tested it and it worked -- given the known issues in the description.
Include fix for breaking tests again
Fix linting
Co-authored-by: Sandy Chu <schu96@users.noreply.github.com>
Increase 1up mode delay for text fragment highlighting
342fc62 to
c86d4c7
Compare
Experiment adding a selection menu with a "Copy link to highlight" experiment. Uses the browser-native TextFragments to do the highlighting. In a future PR we will switch away from this to native
Known issues:
Recording.2026-04-07.192141.mp4