Skip to content
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

feat(ui): support pasting directly to canvas #7619

Merged
merged 7 commits into from
Feb 6, 2025

Conversation

psychedelicious
Copy link
Collaborator

@psychedelicious psychedelicious commented Feb 5, 2025

Summary

When the user pastes into the browser under these conditions...

  • Clipboard contains a single image file which passes our upload validation
  • Canvas tab is active
  • Viewer is closed

... we present the user with a modal asking where they should paste to:

image

Related Issues / Discussions

Offline discussion

QA Instructions

Try it out.

Merge Plan

n/a

Checklist

  • The PR has a short but descriptive title, suitable for a changelog

@github-actions github-actions bot added the frontend PRs that change frontend files label Feb 5, 2025
@hipsterusername
Copy link
Member

This will need restyling before it can be merged.

@psychedelicious
Copy link
Collaborator Author

psychedelicious commented Feb 5, 2025

Ok, how about this:
image

@psychedelicious psychedelicious force-pushed the psyche/feat/ui/canvas-paste branch from 7784ae2 to c298453 Compare February 5, 2025 06:24
@hipsterusername
Copy link
Member

Feels like we need some form of visual
image

Have we sworn off any custom icons?

@psychedelicious
Copy link
Collaborator Author

Custom icons take a lot of time to create and format to work in the app. Especially if you want it to match with all the other icons. I don't think that's something we should be spending time on.

Btw it's not pasting "in" the bbox. You could be pasting something much larger than the bbox and we aren't going to resize it. It's pasting at the bbox.

@hipsterusername
Copy link
Member

Open to ideas on icons that fit the bill. Just needs something.

“in Bbox” vs “At Bbox” is semantics I don’t think users will necessarily have issues with but also think either is fine.

@psychedelicious
Copy link
Collaborator Author

psychedelicious commented Feb 6, 2025

image

Ok how's this?

@psychedelicious psychedelicious enabled auto-merge (rebase) February 6, 2025 01:54
@psychedelicious psychedelicious force-pushed the psyche/feat/ui/canvas-paste branch from 2817191 to ed7dd0d Compare February 6, 2025 01:54
@psychedelicious psychedelicious enabled auto-merge (rebase) February 6, 2025 01:54
@psychedelicious psychedelicious merged commit e63bd26 into main Feb 6, 2025
15 checks passed
@psychedelicious psychedelicious deleted the psyche/feat/ui/canvas-paste branch February 6, 2025 01:56
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