Make WordPress Core

Opened 13 years ago

Closed 12 years ago

Last modified 11 years ago

#18708 closed enhancement (duplicate)

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

Reported by: dgwyer's profile 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 12 years ago.
18708.2.patch (2.4 KB) - added by SergeyBiryukov 12 years ago.
18708.3.patch (2.2 KB) - added by SergeyBiryukov 12 years ago.
18708.4.patch (3.7 KB) - added by SergeyBiryukov 12 years ago.
Merged with 18708.patch, refreshed
18708.class-button.png (3.2 KB) - added by SergeyBiryukov 12 years ago.
18708.5.patch (3.7 KB) - added by SergeyBiryukov 12 years ago.
Restored esc_url()
featured-image.jpg (75.3 KB) - added by lessbloat 12 years ago.
18708.6.patch (5.0 KB) - added by SergeyBiryukov 12 years ago.
featured-image-consistency.jpg (184.9 KB) - added by lessbloat 12 years ago.
18708.compact.png (65.7 KB) - added by SergeyBiryukov 12 years ago.
18708.7.patch (15.6 KB) - added by SergeyBiryukov 12 years ago.
18708.8.patch (15.6 KB) - added by SergeyBiryukov 12 years ago.
More accurate check for context in set-post-thumbnail.js
18708.9.patch (15.6 KB) - added by SergeyBiryukov 12 years ago.
Refreshed after [21592]

Download all attachments as: .zip

Change History (46)

#1 @ryanimel
13 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?

#2 @azaozz
13 years ago

  • Keywords ux-feedback added; needs-patch removed

#3 follow-up: @downstairsdev
13 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.

#4 follow-up: @ryanimel
13 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.

#5 in reply to: ↑ 3 @DrewAPicture
13 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.

Last edited 13 years ago by DrewAPicture (previous) (diff)

#6 in reply to: ↑ 4 @GaryJ
13 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.

#7 @dgwyer
13 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?

#8 follow-ups: @jane
12 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.

#9 in reply to: ↑ 8 @SergeyBiryukov
12 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.

#10 in reply to: ↑ 8 @SergeyBiryukov
12 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.

#11 follow-up: @azaozz
12 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.

#12 in reply to: ↑ 11 @SergeyBiryukov
12 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.

#13 @ryan
12 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.

@SergeyBiryukov
12 years ago

Merged with 18708.patch, refreshed

#15 @SergeyBiryukov
12 years 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.

@SergeyBiryukov
12 years ago

Restored esc_url()

#16 @SergeyBiryukov
12 years ago

  • Milestone changed from Future Release to 3.5

#17 @SergeyBiryukov
12 years ago

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

#18 follow-ups: @lessbloat
12 years 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">

#19 in reply to: ↑ 18 @helenyhou
12 years 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.

#20 in reply to: ↑ 18 @SergeyBiryukov
12 years 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).

#21 @helenyhou
12 years ago

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

#22 follow-up: @lessbloat
12 years 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?

#23 in reply to: ↑ 22 ; follow-up: @helenyhou
12 years 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.

#24 in reply to: ↑ 23 @lessbloat
12 years 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. :-)

#25 @sabreuse
12 years ago

  • Cc sabreuse@… added

#26 follow-up: @danyork
12 years 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.

#27 in reply to: ↑ 26 @helenyhou
12 years 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

#28 @SergeyBiryukov
12 years ago

  • Severity changed from minor to normal

In 18708.7.patch:

#29 @DrewAPicture
12 years 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.

@SergeyBiryukov
12 years ago

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

#30 @SergeyBiryukov
12 years ago

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

#31 @ocean90
12 years ago

  • Cc ocean90 added

@SergeyBiryukov
12 years ago

Refreshed after [21592]

#32 @SergeyBiryukov
12 years ago

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

Superseded by #21776.

#33 @helen
11 years ago

#23234 was marked as a duplicate.

Note: See TracTickets for help on using tickets.