Skip to content
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

Increase search path for shift-click common parent #10247

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

Conversation

mheiman
Copy link
Collaborator

@mheiman mheiman commented Jan 1, 2025

Closes #10246

This fixes shift-clicking to select a range of editions in the ILE

Technical

I didn't dig deeply into the details, but it looks like a change to the HTML of the work page broke shift clicking for edition selection.

I resolved the problem by having the range selection algorithm search one more level up the DOM for the common parent of the clicked elements. I verified that this solves the problem and doesn't affect the behavior of shift-clicking other selectable types.

Testing

While logged in as a librarian, visit a work with multiple editions (e.g. https://openlibrary.org/works/OL63996W/The_Alhambra)
Click the first edition to select it.
Hold down the shift key and click an edition further down the page.

Expected behavior: All of the editions between the first and second clicks should be selected.

Stakeholders

@cdrini @mheiman

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 17.54%. Comparing base (3025f5d) to head (0da7685).
Report is 80 commits behind head on master.

Files with missing lines Patch % Lines
.../js/ile/utils/SelectionManager/SelectionManager.js 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #10247      +/-   ##
==========================================
+ Coverage   17.44%   17.54%   +0.09%     
==========================================
  Files          89       88       -1     
  Lines        4792     4765      -27     
  Branches      848      845       -3     
==========================================
  Hits          836      836              
+ Misses       3436     3410      -26     
+ Partials      520      519       -1     

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

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.

Shift click ILE selection broken on book page
3 participants