Adds recall metadata & warning modal #8117
Draft
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.
Summary
This pull request introduces a new feature for recalling metadata with confirmation across multiple components in the gallery and image viewer. It also includes updates to localization files and adds new UI elements like buttons and dialogs. The most important changes are grouped by theme below.
Metadata Recall Feature:
invokeai/frontend/web/src/features/gallery/components/ImageGrid/RecallMetadataConfirmationAlertDialog.tsx
: Added a newRecallMetadataConfirmationAlertDialog
component to handle metadata recall with a confirmation dialog, including logic to check active canvas layers and user preferences for confirmation.invokeai/frontend/web/src/features/gallery/components/ImageContextMenu/ImageMenuItemMetadataRecallActions.tsx
: Updated theImageMenuItemMetadataRecallActions
component to use the newrecallWithConfirmation
method for recalling metadata with user confirmation. [1] [2] [3]invokeai/frontend/web/src/features/gallery/components/ImageGrid/GalleryImageRecallAllIconButton.tsx
: Added a new icon button component for recalling all metadata directly from the gallery image hover icons.Integration with Image Viewer and Gallery:
invokeai/frontend/web/src/features/gallery/components/ImageViewer/CurrentImageButtons.tsx
: Integrated the metadata recall confirmation logic into the image viewer buttons, replacing direct recall actions withrecallWithConfirmation
. [1] [2] [3]invokeai/frontend/web/src/features/gallery/components/ImageGrid/GalleryImageHoverIcons.tsx
: Added the newGalleryImageRecallAllIconButton
to the hover icons displayed for gallery images. [1] [2]Localization Updates:
invokeai/frontend/web/public/locales/en.json
: Added new localization strings for metadata recall warnings and active canvas data summaries. [1] [2]Global Modal Integration:
invokeai/frontend/web/src/app/components/GlobalModalIsolator.tsx
: Added theRecallMetadataConfirmationAlertDialog
to the global modal isolator for consistent access across the application. [1] [2]Merge Plan
DO NOT MERGE. It's likely going to create some weirdness with managing canvas state - We may want to align on how metadata gets recalled across 6.0 tabs
Checklist
What's New
copy (if doing a release after this PR)