cloudinary-community / photocrate

Photo library and interactive editor built with Next.js & Cloudinary
https://www.photobox.dev/
MIT License
130 stars 15 forks source link

feat: now the Escape key takes you back to the main gallery from the media viewer #23

Closed nickytonline closed 4 months ago

nickytonline commented 4 months ago

Description

Now you can use the Escape key to return to the main gallery from the media viewer.

Related Tickets & Documents

Closes #22

Mobile & Desktop Screenshots/Recordings

When there are no changes

CleanShot 2024-06-17 at 23 12 43

When there are changes

CleanShot 2024-06-18 at 20 16 53

Steps to QA

When there are no changes

  1. Ensure at least one media exists in the main gallery
  2. Click on the media to load the media viewer.
  3. Click on the edit pencil icon and apply a change to the image (not save)
  4. Press the Escape key.
  5. You're brought back to the main gallery.

When there are changes

User decides discard the changes

  1. Ensure at least one media exists in the main gallery
  2. Click on the media to load the media viewer.
  3. Click on the edit pencil icon and apply a change to the image (not save)
  4. Press the Escape key.
  5. The confirm dialog appears asking if you want to lose discard their changes.
  6. Click or press the Discard changes button.
  7. The confirm dialog closes.
  8. The editor panel is closed and you remain on the media viewer for the given item.
  9. Press the Escape key.
  10. You're brought back to the main gallery.

User decides to keep editing

  1. Ensure at least one media exists in the main gallery
  2. Click on the media to load the media viewer.
  3. Click on the edit pencil icon and apply a change to the image (not save)
  4. Press the Escape key.
  5. The confirm dialog appears asking if you wsnt to discard your changes.
  6. Click or press the Keep editing button.
  7. The confirm dialog closes.
  8. The editor panel remains open.

[optional] What gif best describes this PR or how it makes you feel?

vercel[bot] commented 4 months ago

@nickytonline is attempting to deploy a commit to the Cloudinary DevX Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] commented 4 months ago

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Comments Updated (UTC)
photobox-demo βœ… Ready (Inspect) Visit Preview πŸ’¬ Add feedback Jun 19, 2024 3:22am
photobox-web βœ… Ready (Inspect) Visit Preview πŸ’¬ Add feedback Jun 19, 2024 3:22am
colbyfayock commented 4 months ago

this is fantastic! added a few thoughts/comments

colbyfayock commented 4 months ago

one last thought!

what do you think about, when you open a panel in the media viewer without changes, if oyu hit ESC, you close the panel, instead of taking you back? so if you open without changes, to get back to media library, you would hit twice.

wdyt?

nickytonline commented 4 months ago

one last thought!

what do you think about, when you open a panel in the media viewer without changes, if oyu hit ESC, you close the panel, instead of taking you back? so if you open without changes, to get back to media library, you would hit twice.

wdyt?

Sounds good. I just tried in Google Photos and that's what they do.

nickytonline commented 4 months ago

one last thought! what do you think about, when you open a panel in the media viewer without changes, if oyu hit ESC, you close the panel, instead of taking you back? so if you open without changes, to get back to media library, you would hit twice. wdyt?

Sounds good. I just tried in Google Photos and that's what they do.

Resolved by 840baa100f22b3614611e62b9f736909211b4a2d

colbyfayock commented 4 months ago

worked great!!

thought got this dreaded error.

image

pushed a quick fix, and we're good to go!

thanks again πŸ™Œ

nickytonline commented 4 months ago

worked great!!

thought got this dreaded error.

image

pushed a quick fix, and we're good to go!

thanks again πŸ™Œ

For some reason eslint and formatting is running in the project in VS Code. It's probably something on my end, but not sure what as all my other projects work fine. πŸ˜