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(form/inputs): add support for image drop+paste in PTE input #6534

Merged
merged 4 commits into from May 6, 2024

Conversation

sjelfull
Copy link
Member

@sjelfull sjelfull commented Apr 30, 2024

Description

This adds support for drag-n-drop + pasting of images and files into the Portable Text Input inside the studio.

What to review

Testing

  1. Open this test document in the test studio
  2. Try to test the different scenarios on the Text field:
  • Drag 1 image
  • Drag 2 images
  • Drag a invalid file (something not PDF)
  • Drag 1 PDF file
  • Drag 2 PDF files
  1. Now do the same, but pasting instead.

Notes about PR

  • Paste component test is skipped in Firefox because the security model doesn't allow us to make a synthetic test

Notes for release

  • The Portable Text Input now supports drag-n-dropping + pasting of images and files into Image and File blocks

@sjelfull sjelfull self-assigned this Apr 30, 2024
Copy link

vercel bot commented Apr 30, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
performance-studio ✅ Ready (Inspect) Visit Preview May 2, 2024 2:48pm
test-next-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 2, 2024 2:48pm
test-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 2, 2024 2:48pm
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
studio-workshop ⬜️ Ignored (Inspect) Visit Preview May 2, 2024 2:48pm

Copy link
Contributor

No changes to documentation

Copy link
Contributor

github-actions bot commented Apr 30, 2024

Component Testing Report Updated May 2, 2024 2:48 PM (UTC)

File Status Duration Passed Skipped Failed
comments/CommentInput.spec.tsx ✅ Passed (Inspect) 40s 15 0 0
formBuilder/ArrayInput.spec.tsx ✅ Passed (Inspect) 6s 3 0 0
formBuilder/inputs/PortableText/Annotations.spec.tsx ✅ Passed (Inspect) 27s 6 0 0
formBuilder/inputs/PortableText/copyPaste/CopyPaste.spec.tsx ✅ Passed (Inspect) 31s 11 7 0
formBuilder/inputs/PortableText/Decorators.spec.tsx ✅ Passed (Inspect) 14s 6 0 0
formBuilder/inputs/PortableText/FocusTracking.spec.tsx ✅ Passed (Inspect) 35s 15 0 0
formBuilder/inputs/PortableText/Input.spec.tsx ✅ Passed (Inspect) 1m 8s 13 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 1m 5s 18 0 0
formBuilder/inputs/PortableText/RangeDecoration.spec.tsx ✅ Passed (Inspect) 20s 9 0 0
formBuilder/inputs/PortableText/Styles.spec.tsx ✅ Passed (Inspect) 15s 6 0 0
formBuilder/inputs/PortableText/Toolbar.spec.tsx ✅ Passed (Inspect) 22s 9 0 0

@sjelfull sjelfull marked this pull request as ready for review April 30, 2024 16:55
@sjelfull sjelfull requested review from a team as code owners April 30, 2024 16:55
@sjelfull sjelfull requested review from jtpetty and removed request for a team April 30, 2024 16:55
Copy link
Contributor

@jtpetty jtpetty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 - thank you for adding tests!

Copy link
Member

@skogsmaskin skogsmaskin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work @sjelfull!

Thanks for this.

@sjelfull sjelfull added this pull request to the merge queue May 6, 2024
Merged via the queue into next with commit e964b1e May 6, 2024
39 checks passed
@sjelfull sjelfull deleted the feat/edx-1176-image-clipboard-support branch May 6, 2024 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants