Skip to content

Create list via ILE #10880

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

Merged
merged 1 commit into from
Jun 2, 2025

Conversation

cdrini
Copy link
Collaborator

@cdrini cdrini commented May 31, 2025

Pulled out of #7804 . Small feature; when selecting works or editions, you will now see an option in the ILE toolbar to create a new list with the selected items.

Technical

Note this links to create a user list, not a global list.

Testing

Test on testing with works, authors, and editions 👍 There's a bug if you select multiple editions from the same work in the rendering of the lists page, but it will save correctly.

Screenshot

Stakeholders

@codecov-commenter
Copy link

codecov-commenter commented May 31, 2025

Codecov Report

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

Project coverage is 17.14%. Comparing base (2e231fa) to head (05f2d35).
Report is 468 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   #10880      +/-   ##
==========================================
- Coverage   17.27%   17.14%   -0.14%     
==========================================
  Files          87       91       +4     
  Lines        4845     4982     +137     
  Branches      860      867       +7     
==========================================
+ Hits          837      854      +17     
- Misses       3477     3589     +112     
- Partials      531      539       +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.

@cdrini cdrini force-pushed the feature/create-list-ile branch from de7959f to 05f2d35 Compare May 31, 2025 16:30
@cdrini cdrini marked this pull request as ready for review May 31, 2025 16:31
@Copilot Copilot AI review requested due to automatic review settings May 31, 2025 16:31
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Adds a new “Create list…” action to the ILE toolbar, enabling users to generate a list populated with the selected works, editions, or authors.

  • Introduces a “Create list…” entry in SelectionManager.ACTIONS
  • Builds the list creation URL using selected item OLIDs
  • Enables both single and multiple item selections
Comments suppressed due to low confidence (4)

openlibrary/plugins/openlibrary/js/ile/utils/SelectionManager/SelectionManager.js:479

  • [nitpick] The action label uses lowercase 'list' while other actions capitalize key nouns (e.g., 'Tag Works'). Consider renaming to 'Create List…' for consistency.
name: 'Create list...',

openlibrary/plugins/openlibrary/js/ile/utils/SelectionManager/SelectionManager.js:475

  • This new action should be covered by unit tests for SelectionManager.ACTIONS to verify that the URL builder and multiple_only behavior work as intended.
{

openlibrary/plugins/openlibrary/js/ile/utils/SelectionManager/SelectionManager.js:476

  • Including 'author' here may lead to unsupported seeds for the list creation endpoint. Restrict this action to types that the backend supports or confirm that authors can be handled appropriately.
applies_to_type: ['work', 'edition', 'author'],

openlibrary/plugins/openlibrary/js/ile/utils/SelectionManager/SelectionManager.js:476

  • [nitpick] Array formatting here uses spaces after commas, whereas other array literals in this file omit those spaces. Align spacing with existing style for readability.
applies_to_type: ['work', 'edition', 'author'],

@cdrini cdrini added the Size: S label May 31, 2025
@github-actions github-actions bot added the Needs: Response Issues which require feedback from lead label Jun 1, 2025
@mekarpeles mekarpeles removed the Needs: Response Issues which require feedback from lead label Jun 2, 2025
@mekarpeles mekarpeles merged commit c851323 into internetarchive:master Jun 2, 2025
4 checks passed
@mekarpeles mekarpeles self-assigned this Jun 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants