Skip to content

feat(ui): img2img UX #7081

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

Merged
merged 9 commits into from
Oct 9, 2024
Merged

feat(ui): img2img UX #7081

merged 9 commits into from
Oct 9, 2024

Conversation

psychedelicious
Copy link
Collaborator

@psychedelicious psychedelicious commented Oct 9, 2024

Summary

Changes to reduce img2img friction:

  • Add fit modes to transform:
    • fill: entity is stretched to fill the bbox entirely (current behaviour)
    • contain (new default): entity is scaled up to fill the bbox, retaining aspect ratio, centering the transformed entity in the bbox
    • cover: entity is scaled up so that the smallest dimension fills the bbox completely, centering the transformed entity in the bbox
  • Some prep to make room for a new layer context menu item:
    • Create IconMenuItem component (revised abstraction of the icons we have in a row on the image context menu, fixed an issue where the buttons cannot be disabled)
    • Use the new component for these layer menu items: 4x arrange actions, duplicate, delete
    • One kinda awkward thing, the Reference Image context menu now only has a row of 6 icon buttons...
  • Add ability to ignore the cache when rasterizing a layer, fixing an edge case where transform would do nothing
  • Disable the transformer controls (i.e. the drag handles) while applying the transform (i.e. rasterizing and uploading)
  • Add silent option to transformer, which prevents any UI or controls from being shown while transforming
  • Add layer context menu item for Fit to Bbox, which uses a silent transform to immediately fit the entity to the bbox using the contain mode with a single click

Related Issues / Discussions

Discord & offline discussions about img2img friction

QA Instructions

Try the new options out:

  • Transform a layer and try the fit options
  • Try Fit to Bbox option in layer context menu
  • Review the new image icon buttons

Merge Plan

n/a

Checklist

  • The PR has a short but descriptive title, suitable for a changelog
  • Tests added / updated (if applicable)
  • Documentation added / updated (if applicable)

@github-actions github-actions bot added the frontend PRs that change frontend files label Oct 9, 2024
@psychedelicious psychedelicious enabled auto-merge (rebase) October 9, 2024 12:10
@psychedelicious psychedelicious force-pushed the psyche/feat/ui/img2img-ux branch from 67d025b to 90e556b Compare October 9, 2024 12:10
@psychedelicious psychedelicious merged commit 8544ba3 into main Oct 9, 2024
14 checks passed
@psychedelicious psychedelicious deleted the psyche/feat/ui/img2img-ux branch October 9, 2024 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend PRs that change frontend files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants