Add collection import UI to admin dashboard (PP-364)#195
Open
jonathangreen wants to merge 3 commits intomainfrom
Open
Add collection import UI to admin dashboard (PP-364)#195jonathangreen wants to merge 3 commits intomainfrom
jonathangreen wants to merge 3 commits intomainfrom
Conversation
Add a CollectionImportButton component that renders a "Queue Import" button with a "Force full re-import" checkbox on the collection edit screen for protocols that support import. Wire it into the Collections page via context and connect it to the new backend import endpoint.
Wrap the import controls in a collapsible Panel, add alert-success and alert-danger feedback styling, and use renderAdditionalContent hook on ServiceEditForm to inject the import button cleanly.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
CollectionImportButtoncomponent that renders a collapsible "Import" panel with a "Queue Import" button and "Force full re-import" checkbox for protocols that support importsupports_importfield toProtocolDatainterface, used to conditionally show the import controlsimportCollectionaction that POSTs to/admin/collection/<id>/importrenderAdditionalContent()hook toServiceEditFormso subclasses can inject additional panelsCollectionEditFormto render the import button viarenderAdditionalContent()alert-success/alert-danger)Motivation and Context
Companion to ThePalaceProject/circulation#3069. The backend now exposes
supports_importin protocol details and provides aPOST /admin/collection/<id>/importendpoint. This PR adds the admin UI to consume that API.How Has This Been Tested?
CollectionImportButtoncovering: rendering conditions, checkbox toggle, import with/without force, success/error feedback styling, state reset on collection switch, disabled state, and loading stateCollectionstests to pass the newimportCollectionpropChecklist: