Add deletion request handling and update related components#11435
Add deletion request handling and update related components#11435NishantSinghhhhh wants to merge 91 commits intointernetarchive:masterfrom
Conversation
Signed-off-by: NishantSinghhhhh <nishantsingh_230137@aitpune.edu.in>
for more information, see https://pre-commit.ci
|
@RayBB , please review this PR, also do tell me if any more testing is required and I justed wanted to confirm whether the frontedn changes done by me are acceptable or I should be making some changes in it |
|
@NishantSinghhhhh I'm not looking at the code much yet but first there's an error in the CI that precommit is giving about nested ifs. Please address that (and always check the CI logs on PRs) Second, please make sure your pull request only has relevant changes. For example, there are some changes to white space at the end of files. That should not be there. Finally, to make this useful and easy to test please add a UI for requesting deletes to the librarian toolbar. Here's a similar PR for that #7648 Overall, on first glance this looks like it is the right direction so keep it up! |
Signed-off-by: NishantSinghhhhh <nishantsingh_230137@aitpune.edu.in>
for more information, see https://pre-commit.ci
…est function Signed-off-by: NishantSinghhhhh <nishantsingh_230137@aitpune.edu.in>
…Singhhhhh/openlibrary into 10033/expand-merge-queue
for more information, see https://pre-commit.ci
|
@RayBB , I have added the changes, and precommit errors have been removed, I have removed any irrelevant changes, Now sicne last 2 days I am trying to find the librarian toolbar, and I have failed, so can you please tell me at which route or which place I can find the librarian toolbar ?? |
|
@NishantSinghhhhh You can find some of the librarian toolbar here #7502 |
Thank you, I will add the changes now |
…emplates - Introduced new actions for deleting works and authors in SelectionManager. - Implemented community_deletes class to handle deletion requests. - Created templates for deleting works and authors, including user feedback. - Enhanced logging for deletion requests to improve traceability. Signed-off-by: NishantSinghhhhh <nishantsingh_230137@aitpune.edu.in>
for more information, see https://pre-commit.ci
Signed-off-by: NishantSinghhhhh <nishantsingh_230137@aitpune.edu.in>
Signed-off-by: NishantSinghhhhh <nishantsingh_230137@aitpune.edu.in>
…dits.py Signed-off-by: NishantSinghhhhh <nishantsingh_230137@aitpune.edu.in>
for more information, see https://pre-commit.ci
Signed-off-by: NishantSinghhhhh <nishantsingh_230137@aitpune.edu.in>
Signed-off-by: NishantSinghhhhh <nishantsingh_230137@aitpune.edu.in>
for more information, see https://pre-commit.ci
Signed-off-by: NishantSinghhhhh <nishantsingh_230137@aitpune.edu.in>
…Singhhhhh/openlibrary into 10033/expand-merge-queue
for more information, see https://pre-commit.ci
Signed-off-by: NishantSinghhhhh <nishantsingh_230137@aitpune.edu.in>
…Singhhhhh/openlibrary into 10033/expand-merge-queue
for more information, see https://pre-commit.ci
…structure; add corresponding LESS files for consistent UI design. Signed-off-by: NishantSinghhhhh <nishantsingh_230137@aitpune.edu.in>
This is expected, and prevents data loss. A reviewer would decline such a request. |
Okay understood |
| mrid = None | ||
|
|
||
| if mrid_raw is not None: | ||
| # Handle if it's a list (some frameworks return lists) |
There was a problem hiding this comment.
I added this change because the mrid value was not being preserved when navigating via the Edit button on the Book or Author page.
The intended flow is:
Merge page → Book/Author page → Edit page → Request Deletion
However, during the transition from the Book/Author page to the Edit page, the mrid query parameter was being dropped. As a result, the Edit page no longer had the merge-request context, which is required to submit a delete request and subsequently close the merge request.
To fix this, I updated databarView.html
openlibrary/plugins/openlibrary/js/merge-request-table/MergeRequestEditPageAuthor.js
Outdated
Show resolved
Hide resolved
openlibrary/plugins/openlibrary/js/merge-request-table/index.js
Outdated
Show resolved
Hide resolved
|
@NishantSinghhhhh, I really need you to revert all unrelated changes. Your |
Signed-off-by: NishantSinghhhhh <nishantsingh_230137@aitpune.edu.in>
…Singhhhhh/openlibrary into 10033/expand-merge-queue
for more information, see https://pre-commit.ci
Signed-off-by: NishantSinghhhhh <nishantsingh_230137@aitpune.edu.in>
…Singhhhhh/openlibrary into 10033/expand-merge-queue
Signed-off-by: NishantSinghhhhh <nishantsingh_230137@aitpune.edu.in>
for more information, see https://pre-commit.ci
Signed-off-by: NishantSinghhhhh <nishantsingh_230137@aitpune.edu.in>
…Singhhhhh/openlibrary into 10033/expand-merge-queue
Signed-off-by: NishantSinghhhhh <nishantsingh_230137@aitpune.edu.in>
for more information, see https://pre-commit.ci
Signed-off-by: NishantSinghhhhh <nishantsingh_230137@aitpune.edu.in>
…tion templates Signed-off-by: NishantSinghhhhh <nishantsingh_230137@aitpune.edu.in>
for more information, see https://pre-commit.ci
…tion templates Signed-off-by: NishantSinghhhhh <nishantsingh_230137@aitpune.edu.in>
…tSinghhhhh/openlibrary into 10033/expand-merge-queue
…tion templates Signed-off-by: NishantSinghhhhh <nishantsingh_230137@aitpune.edu.in>
|
@jimchamp , I have made changes in this PR and I have reverted all unrelated changes. |
Closes #10033
Feature: Community Deletion Queue
This PR extends the merge queue system to support deletion requests, allowing librarians to request removal of entries that are not books (e.g., calendars, magazines, etc.) in a structured, reviewable way.
Technical
Backend Changes:
DELETION(type 3) toCommunityEditsQueue.TYPEinopenlibrary/core/edits.pyMODESdictionary to includedeletion_openanddeletion_closedmodeswhere_clause()method to filter deletion requests bymr_type = 3openlibrary/plugins/upstream/edits.py:GET()method (deletion_open,deletion_closed)create_url()to generate deletion URLs (/works/{olid}/delete)create_title()to fetch titles for deletion requestsDELETIONtype toneeds_unique_url()validationFrontend Changes:
merge_request_table.htmlto display "Community Deletion Requests" title and passis_deletion_modeflagtable_header.htmlwith two new tabs: "Deletion Open" and "Deletion Closed"table_row.htmlto display deletion-specific UI:DELETION: 3to JavaScriptREQUEST_TYPEScreateDeletionRequest(),approveDeletionRequest(), anddeclineDeletionRequest()helper functionsKey Implementation Notes:
mr_typefieldTesting
Create a Deletion Request:
Screenshot
Screencast.from.2025-11-07.23-18-18.webm
Stakeholders
@RayBB @seabelis