WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 20 months ago

Last modified 15 months ago

#18708 closed enhancement (duplicate)

Close thickbox automatically when 'Use as featured image' link is clicked

Reported by: dgwyer Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.2.1
Component: Media Keywords: has-patch
Focuses: Cc:

Description

When I select a featured image and then click the 'Use as featured image' link, I always expect the dialog box to close and return me to the post.

I think it's confusing that the dialog box is left hanging, waiting for the user to close it out manually.

It would be more intuitive to close the dialog box automatically if the 'Use as featured image' link is clicked.

Attachments (13)

18708.patch (2.6 KB) - added by SergeyBiryukov 3 years ago.
18708.2.patch (2.4 KB) - added by SergeyBiryukov 3 years ago.
18708.3.patch (2.2 KB) - added by SergeyBiryukov 2 years ago.
18708.4.patch (3.7 KB) - added by SergeyBiryukov 23 months ago.
Merged with 18708.patch, refreshed
18708.class-button.png (3.2 KB) - added by SergeyBiryukov 23 months ago.
18708.5.patch (3.7 KB) - added by SergeyBiryukov 22 months ago.
Restored esc_url()
featured-image.jpg (75.3 KB) - added by lessbloat 22 months ago.
18708.6.patch (5.0 KB) - added by SergeyBiryukov 21 months ago.
featured-image-consistency.jpg (184.9 KB) - added by lessbloat 21 months ago.
18708.compact.png (65.7 KB) - added by SergeyBiryukov 21 months ago.
18708.7.patch (15.6 KB) - added by SergeyBiryukov 21 months ago.
18708.8.patch (15.6 KB) - added by SergeyBiryukov 21 months ago.
More accurate check for context in set-post-thumbnail.js
18708.9.patch (15.6 KB) - added by SergeyBiryukov 20 months ago.
Refreshed after [21592]

Download all attachments as: .zip

Change History (46)

comment:1 ryanimel3 years ago

  • Cc ryan@… added

-1. I'll often set a featured image, then stay in the thickbox and add an image to the post as well.

Plugin territory?

comment:2 azaozz3 years ago

  • Keywords ux-feedback added; needs-patch removed

comment:3 follow-up: downstairsdev3 years ago

If someone clicks the "set featured image" link (from the post edit screen), I think that intention is quite explicit. The "use as featured image" (in the iframe) could perhaps even be removed because the user has already indicated their intention.

If someone clicks the insert/upload icon, I agree with Ryan that not every user may want that, though I personally like the idea.

comment:4 follow-up: ryanimel3 years ago

I agree with Devin, closing the box after clicking "Use as featured image" makes more sense if the thickbox was opened using the "Set featured image" link in the Featured Image metabox. But I'm not sure introducing two different behaviors is the best idea, since otherwise they behave pretty much the same and it might be a bit confusing. Worth testing out though. I'll work up a quick plugin testing it out if no one else beats me to it.

comment:5 in reply to: ↑ 3 DrewAPicture3 years ago

Replying to downstairsdev:

The "use as featured image" (in the iframe) could perhaps even be removed

Are you talking only in the use case where the user has clicked the link via the post-editing page? Or just generally removing it. If the former, then +1.

Version 2, edited 3 years ago by DrewAPicture (previous) (next) (diff)

comment:6 in reply to: ↑ 4 GaryJ3 years ago

Replying to ryanimel:

I agree with Devin, closing the box after clicking "Use as featured image" makes more sense if the thickbox was opened using the "Set featured image" link in the Featured Image metabox. But I'm not sure introducing two different behaviors is the best idea, since otherwise they behave pretty much the same and it might be a bit confusing.

I fully agree with this. The link is styled as a link, not a button, so it's already clear that the behaviour (i.e. not closing Thickbox) is different.
As you can still Insert Into Post, even from having clicked the "Set a featured image" link, then having two different behaviours would be bad.

comment:7 dgwyer3 years ago

The ideal solution would be to have a more focussed (i.e. stripped down) set of options presented if the 'Set featured image' was clicked.

In this case it would make sense to close out the box when 'Use as featured image' is clicked.

The trouble at the moment is that the same dialog box is presented to the user when inserting images into posts AND setting the post featured image. Therefore any solution that results in different behaviours for the 'Use as featured image' link will lead to confusion.

I'm not sure there is an easy solution, to suit all, without refinement of the featured image dialog?

comment:8 follow-ups: jane3 years ago

  • Keywords ux-feedback removed

People are often confused about why the thickbox doesn't close after they click to set featured image. I'd +1 making the 'set as featured image' be on par with 'insert into post' -- for that matter, maybe make it a button as well. It is far too late in the cycle (freeze is today) to do a full redux of the workflow, but adding the close function would be doable.

SergeyBiryukov3 years ago

comment:9 in reply to: ↑ 8 SergeyBiryukov3 years ago

  • Keywords has-patch added

Replying to jane:

maybe make it a button as well

18708.patch turns the link into a button which closes the thickbox after a thumbnail is set.

comment:10 in reply to: ↑ 8 SergeyBiryukov3 years ago

  • Milestone changed from Awaiting Review to 3.3

Replying to jane:

It is far too late in the cycle (freeze is today) to do a full redux of the workflow, but adding the close function would be doable.

Moving for review.

comment:11 follow-up: azaozz3 years ago

To be able to do this properly we will need a "context" when opening the popup. This seems easy enough to do: add another arg to the "set featured image" link and then check for it when clicking the "use as featured image" in the popup. So if the popup was opened with the purpose to add featured image, it will close after selecting one, if not, it will stay open.

SergeyBiryukov3 years ago

comment:12 in reply to: ↑ 11 SergeyBiryukov3 years ago

Replying to azaozz:

add another arg to the "set featured image" link and then check for it when clicking the "use as featured image" in the popup.

Done in 18708.2.patch.

comment:13 ryan2 years ago

  • Component changed from Administration to Media
  • Milestone changed from 3.3 to Future Release

We'll deal with this in 3.4 as part of the media work.

SergeyBiryukov2 years ago

SergeyBiryukov23 months ago

Merged with 18708.patch, refreshed

comment:15 SergeyBiryukov23 months ago

Related: #14762

18708.4.patch passes the context in the same way as custom-header.php, without introducing a new parameter for get_upload_iframe_src().

As for turning the link into a button, we could just use class="button", but in that case the buttons have a different height (18708.class-button.png), so the patch turns it into an actual input element.

SergeyBiryukov22 months ago

Restored esc_url()

comment:16 SergeyBiryukov22 months ago

  • Milestone changed from Future Release to 3.5

comment:17 SergeyBiryukov22 months ago

Related: #19396 (the patches overlap a bit).

lessbloat22 months ago

comment:18 follow-ups: lessbloat22 months ago

Related: featured-image.jpg

If context="featured", couldn't we just remove the "Insert into post" button altogether (as in this context it's not needed), and replace it with:

<input type="submit" value="Use as featured image" class="button-primary">

comment:19 in reply to: ↑ 18 helenyhou22 months ago

Replying to lessbloat:

If context="featured", couldn't we just remove the "Insert into post" button altogether (as in this context it's not needed), and replace it

Yes. :) I think we can also do a lot to simplify the interface based on the context as well. #14762 might be a better place to discuss these kinds of tweaks, though it really is all related.

All the related tickets in terms of featured image UI/UX that I know of: #19396 , #14762, #13522, #12922.

SergeyBiryukov21 months ago

comment:20 in reply to: ↑ 18 SergeyBiryukov21 months ago

Replying to lessbloat:

If context="featured", couldn't we just remove the "Insert into post" button altogether

Done in 18708.6.patch. The patch also hides the mime type filter links (as they don't make any sense in this context) and "From URL" tab (closed #19396 as a duplicate).

comment:21 helenyhou21 months ago

We should hide the gallery settings, too. And maybe turn the Use as featured image link into the primary button instead.

comment:22 follow-up: lessbloat21 months ago

Replying to helenyhou:

We should hide the gallery settings, too.

Yep, I agree. Let's hide the gallery tab altogether.

Replying to SergeyBiryukov:

Done in 18708.6.patch.

Looks great. My one request: could we make it so that the "From computer" tab works like the "Media Library" tab (see featured-image-consistency.jpg) by hiding the "Insert into post" button, and making "Use as featured image" a primary button?

comment:23 in reply to: ↑ 22 ; follow-up: helenyhou21 months ago

Replying to lessbloat:

Yep, I agree. Let's hide the gallery tab altogether.

Let's not :) It's where you can go to see images that are attached to the current post.

comment:24 in reply to: ↑ 23 lessbloat21 months ago

Replying to helenyhou:

Let's not :) It's where you can go to see images that are attached to the current post.

Ah... Of course. My bad. Please disregard that bit. :-)

comment:25 sabreuse21 months ago

  • Cc sabreuse@… added

comment:26 follow-up: danyork21 months ago

I am VERY much in favor of the simplification being discussed here. A question, is there any reason to keep the "Alignment" or "Size" parts of the window? If you are setting the featured image, neither of those seem to matter.

comment:27 in reply to: ↑ 26 helenyhou21 months ago

Replying to danyork:

A question, is there any reason to keep the "Alignment" or "Size" parts of the window?

For that discussion, you'll want #14762

SergeyBiryukov21 months ago

comment:28 SergeyBiryukov21 months ago

  • Severity changed from minor to normal

In 18708.7.patch:

comment:29 DrewAPicture21 months ago

18708.7.patch looks good here in every scenario I threw at it.

I still think it's odd that the only two ways a featured image can be unset is A) Clicking 'Remove featured image' (assuming you have the metabox set to display) or B) Replacing it with a different featured image. But that falls outside the scope of this ticket.

SergeyBiryukov21 months ago

More accurate check for context in set-post-thumbnail.js

comment:30 SergeyBiryukov21 months ago

Perhaps "Save all changes" button should be hidden as well (since there's nothing to save in that context).

comment:31 ocean9020 months ago

  • Cc ocean90 added

SergeyBiryukov20 months ago

Refreshed after [21592]

comment:32 SergeyBiryukov20 months ago

  • Milestone 3.5 deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Superseded by #21776.

comment:33 helen15 months ago

#23234 was marked as a duplicate.

Note: See TracTickets for help on using tickets.