Enable 'pull into bounding box' from empty Control Layer #8045
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 functionality to allow users to pull a bounding box into a control layer, enhancing the user experience for managing layers. The changes primarily involve updates to the UI text, the addition of a new button, and the necessary hooks and logic to support this feature.
UI Enhancements:
controlLayerEmptyState
inen.json
to include instructions for pulling a bounding box into the layer. (invokeai/frontend/web/public/locales/en.json
, invokeai/frontend/web/public/locales/en.jsonL2012-R2012)Code Changes for New Feature:
usePullBboxIntoLayer
hook to theControlLayerSettingsEmptyState
component to handle the new functionality. (invokeai/frontend/web/src/features/controlLayers/components/ControlLayer/ControlLayerSettingsEmptyState.tsx
, invokeai/frontend/web/src/features/controlLayers/components/ControlLayer/ControlLayerSettingsEmptyState.tsxR6-R9)PullBboxButton
in thecomponents
object, which is dynamically rendered in the empty state UI. This button is linked to thepullBboxIntoLayer
function. (invokeai/frontend/web/src/features/controlLayers/components/ControlLayer/ControlLayerSettingsEmptyState.tsx
, invokeai/frontend/web/src/features/controlLayers/components/ControlLayer/ControlLayerSettingsEmptyState.tsxL45-R53)ControlLayerSettingsEmptyState
component to useuseMemo
for constructing thecomponents
object, improving performance by memoizing the button elements. (invokeai/frontend/web/src/features/controlLayers/components/ControlLayer/ControlLayerSettingsEmptyState.tsx
, invokeai/frontend/web/src/features/controlLayers/components/ControlLayer/ControlLayerSettingsEmptyState.tsxR27-R30)Related Issues / Discussions
v6 Feedback channel
QA Instructions
Give it a whirl on an empty control layer
Merge Plan
Merge it.
Checklist
What's New
copy (if doing a release after this PR)