-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Add deletion request handling and update related components #11435
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
base: master
Are you sure you want to change the base?
Add deletion request handling and update related components #11435
Conversation
Signed-off-by: NishantSinghhhhh <[email protected]>
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 <[email protected]>
for more information, see https://pre-commit.ci
…est function Signed-off-by: NishantSinghhhhh <[email protected]>
…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 <[email protected]>
for more information, see https://pre-commit.ci
Signed-off-by: NishantSinghhhhh <[email protected]>
Signed-off-by: NishantSinghhhhh <[email protected]>
…dits.py Signed-off-by: NishantSinghhhhh <[email protected]>
for more information, see https://pre-commit.ci
Signed-off-by: NishantSinghhhhh <[email protected]>
Signed-off-by: NishantSinghhhhh <[email protected]>
for more information, see https://pre-commit.ci
Signed-off-by: NishantSinghhhhh <[email protected]>
…Singhhhhh/openlibrary into 10033/expand-merge-queue
for more information, see https://pre-commit.ci
Signed-off-by: NishantSinghhhhh <[email protected]>
…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 <[email protected]>
…Singhhhhh/openlibrary into 10033/expand-merge-queue
for more information, see https://pre-commit.ci
…ing records Signed-off-by: NishantSinghhhhh <[email protected]>
…Singhhhhh/openlibrary into 10033/expand-merge-queue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are accessibility issues in these changes.
for more information, see https://pre-commit.ci
…r delete actions, and refine approval/decline logic Signed-off-by: NishantSinghhhhh <[email protected]>
…r delete actions, and refine approval/decline logic Signed-off-by: NishantSinghhhhh <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are accessibility issues in these changes.
|
|
||
| $if mrid and ctx.user: | ||
| <div id="mr-review-panel" data-mrid="$:str(mrid)" class="hidden"> | ||
| <textarea id="mr-review-comment"></textarea> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this element is missing an accessible name or label. That makes it hard for people using screen readers or voice control to use the control.
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are accessibility issues in these changes.
|
|
||
| $if mrid and ctx.user: | ||
| <div id="mr-review-panel" data-mrid="$:str(mrid)" class="hidden"> | ||
| <textarea id="mr-review-comment"></textarea> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this element is missing an accessible name or label. That makes it hard for people using screen readers or voice control to use the control.
…abarView, edit, and author edit templates Signed-off-by: NishantSinghhhhh <[email protected]>
…Singhhhhh/openlibrary into 10033/expand-merge-queue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are accessibility issues in these changes.
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are accessibility issues in these changes.
…c merge request edits, improve UI for delete actions, and refine approval/decline logic Signed-off-by: NishantSinghhhhh <[email protected]>
…Singhhhhh/openlibrary into 10033/expand-merge-queue
for more information, see https://pre-commit.ci
…unnecessary comments, and streamline merge request handling Signed-off-by: NishantSinghhhhh <[email protected]>
…unnecessary comments, and streamline merge request handling Signed-off-by: NishantSinghhhhh <[email protected]>
for more information, see https://pre-commit.ci
Signed-off-by: NishantSinghhhhh <[email protected]>
Signed-off-by: NishantSinghhhhh <[email protected]>
Screencast.from.2025-12-30.17-09-52.webm@jimchamp the Deletion request flow and Request review flow for book is complete . |
Screencast.from.2025-12-30.19-12-08.webmWhile I am working on the Deletion request flow and Request review for author, I am encountering few errros, can you please help me with this 1- I am able to delete authours having 0 books assigned to them, and the Merge Requests also gets closed 2- when I try to create a deletion request for authors having more than 0 books, it shows the error as [bad request ] and "You have a ValidationException. This Author page cannot be deleted as 1 record(s) still reference this id. Please remove or reassign before trying again.", How should I move forward with this. |
for more information, see https://pre-commit.ci
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