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

Deselecting image block when media library message visible should bring back the image. #10933

Closed
paaljoachim opened this issue Oct 23, 2018 · 8 comments
Labels
[Block] Image Affects the Image Block [Feature] Media Anything that impacts the experience of managing media Good First Issue An issue that's suitable for someone looking to contribute for the first time Needs Dev Ready for, and needs developer efforts [Type] Enhancement A suggestion for improvement.
Milestone

Comments

@paaljoachim
Copy link
Contributor

I added the comment to this PR: #9264 (comment)

I was told this:
"Thanks for the comment @paaljoachim. This PR didn't change that functionality, it's worked the same way in the audio block since before this change, so I think you'd need to create a new issue to cover any changes you think need to be made."

Is your feature request related to a problem? Please describe.
Adding an image (or other content) through the URL then clicking the pencil/edit button and then deselecting the image block the media upload screen is still seen. Deselecting the image block should then remove the media upload message and show the image.

Step by step.

  1. Add image or other content where the Upload, Media library and Insert from URL message is seen.

screen shot 2018-10-23 at 10 31 26

  1. See that the content has been added.

screen shot 2018-10-23 at 10 33 02

  1. Click edit/pencil icon. Then Deselect the block.

screen shot 2018-10-23 at 10 34 23

It should now revert to the content last selected in the block. If no content has been selected then let the upload, media library, Insert form URL message be seen.

@designsimply designsimply added [Type] Bug An existing feature does not function as intended Needs Testing Needs further testing to be confirmed. [Block] Image Affects the Image Block labels Oct 23, 2018
@talldan
Copy link
Contributor

talldan commented Oct 24, 2018

Just adding a note that the same UI trait is also apparent in other media blocks (media, video).

@desrosj desrosj added this to the WordPress 5.0 milestone Oct 25, 2018
@antpb antpb added the [Feature] Media Anything that impacts the experience of managing media label Oct 25, 2018
@designsimply
Copy link
Member

Tested and confirmed using WordPress 4.9.8 and Gutenberg 4.2.0-rc.1 with Firefox 63.0 on macOS 10.13.6 that attempting to edit an image that has been inserted by URL results in the image getting removed and the placeholder reappearing. (47s)

@designsimply designsimply removed the Needs Testing Needs further testing to be confirmed. label Nov 3, 2018
@talldan
Copy link
Contributor

talldan commented Nov 12, 2018

I'm unsure that this is actually a bug. Fixing this could result in a user not being able drag and drop to replace the image (since when the user clicks away to choose a file the placeholder would lose focus and the block would switch back to displaying the image).

Having said that, I think the experience of displaying the placeholder when clicking the edit button is a bit clunky—it'd be cleaner to display the URL Popover (like the user sees when they click Insert From URL initially) when the edit/pencil toolbar icon is clicked.

@mtias mtias modified the milestones: WordPress 5.0 RC, Future: 5.1 Nov 12, 2018
@mtias mtias added [Type] Enhancement A suggestion for improvement. and removed [Type] Bug An existing feature does not function as intended labels Nov 12, 2018
@designsimply
Copy link
Member

the experience of displaying the placeholder when clicking the edit button is a bit clunky—it'd be cleaner to display the URL Popover

Would the popover be pre-filled with the previous URL in that case?

Example use case: I want to grab the URL of an image I've inserted by URL. I click the image then click the pencil icon hoping to copy the URL.

@talldan
Copy link
Contributor

talldan commented Nov 13, 2018

@designsimply - Yep, that's how I'd imagine it working.

@designsimply
Copy link
Member

Re-tested and confirmed with 5.2-alpha-44784 but I also noticed the link popover is filled if you click on "Insert from URL" again.

9s

Adding the Good First Issue label to suggest that the "Insert from URL" popover should appear automatically if a URL can be detected when the pencil icon for an image block is clicked.

@designsimply designsimply added the Good First Issue An issue that's suitable for someone looking to contribute for the first time label Mar 1, 2019
@gziolo gziolo added the Needs Dev Ready for, and needs developer efforts label Apr 10, 2019
@youknowriad
Copy link
Contributor

I think the flow have been updated with the thumbnail of the image visible on the placeholder now. I think we can close the issue now?

@paaljoachim
Copy link
Contributor Author

Yes. I agree.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Image Affects the Image Block [Feature] Media Anything that impacts the experience of managing media Good First Issue An issue that's suitable for someone looking to contribute for the first time Needs Dev Ready for, and needs developer efforts [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

8 participants