Add collection import panel with documentation (PP-3862)#208
Merged
jonathangreen merged 9 commits intomainfrom Mar 30, 2026
Merged
Add collection import panel with documentation (PP-3862)#208jonathangreen merged 9 commits intomainfrom
jonathangreen merged 9 commits intomainfrom
Conversation
dc499cb to
ec945ad
Compare
tdilauro
approved these changes
Mar 30, 2026
| appear in the catalog, or when you want to pick up recent changes | ||
| from the source. | ||
| </dd> | ||
| <dt>Force full re-import</dt> |
Contributor
There was a problem hiding this comment.
Very minor: This is the third time I've seen "Force full re-import" in the mainline code. Might be handy to DRY it out with variable containing the label text and interpolate that where needed. Could do similar with the default import labels.
const IMPORT_DEFAULT_LABEL_TEXT = "Queue Import";
const IMPORT_FORCED_FULL_LABEL_TEXT = "Force full re-import";
...
// button text
{IMPORT_FORCED_FULL_LABEL_TEXT}
...
// description text
<p className="description">
Queue Import picks up new and changed items. Check{" "}
<strong>{IMPORT_FORCED_FULL_LABEL_TEXT}</strong> to re-process everything.
</p>
...
// detail
<dt>{IMPORT_FORCED_FULL_LABEL_TEXT}</dt>
...Collapse detailed docs behind a "More details" toggle, show a compact description summary below the controls using the standard description class, change the button label/style to "Queue Full Re-import" with btn-warning when force is checked, and provide context-aware success messages for regular vs force imports.
…bles, and remove stale instruction - Extract nested ternary for button label into getButtonLabel helper - Replace hardcoded color values (#AAA, #777, #333, #555) with SCSS variables ($medium-dark-gray, $muted-gray, $dark-gray); add $muted-gray to colors.scss - Update test to check for force class instead of btn-warning - Remove stale "Check this box before clicking Queue Import" sentence since the dynamic button label makes it self-evident
Removes the showDetails state and custom button toggle in favor of
the native HTML <details>/<summary> element, which provides built-in
toggle behavior, keyboard accessibility, and proper semantics. Uses
key={collection?.id} to auto-reset to closed when switching collections.
399b88c to
029c31a
Compare
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
Adds an import panel to
CollectionImportButtonfor collections whose protocol supports import:descriptionclass, with a "More details" toggle for full documentationMotivation and Context
PP-3862 — Add description to collection Import function in Collection Manager.
How Has This Been Tested?
npm run test-jest-file tests/jest/components/CollectionImportButton.test.tsx)Checklist: