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

Featured Image dialogue missing "Mine", "Uploaded to this post", "Unattached" filters #8748

Closed
bkjproductions opened this issue Aug 9, 2018 · 20 comments
Assignees
Labels
Backwards Compatibility Issues or PRs that impact backwards compatability [Feature] Media Anything that impacts the experience of managing media [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Milestone

Comments

@bkjproductions
Copy link

"Set Featured Image" not as useful
The new editor removes the ability for the "Featured Image" button dialogue to "know" what images have been uploaded to the current Post, as well as what images are "Mine" or "Unattached."

To Reproduce
Steps to reproduce the behavior:

  1. Create a Post
  2. Upload an Image to it
  3. In the sidebar panel on the right, click Featured Image
  4. Click Set Featured Image
  5. In the dialogue box, the Uploaded to this post button is gone.

Expected behavior
Having an image "attached" to a Post can be a very useful thing.

  • It helps establish a relationship between the Post and the Image.
  • If one editor has uploaded her own images, she could use the "Mine" selection to find her images, as opposed to the ones that someone else uploaded.
  • If there are some "unattached" images that are needing placement, that is useful to know.

This feature makes it handy to find a relevant image when there may be hundreds if not thousands of images to choose from. There may be some importance for this related to WooCommerce.

The two useful popups, one that shows items by owner/relationship and one by date, have been replaced by a smaller popup that is just by date.

Screenshots
Classic editor:
featured image includes uploaded to this post

New editor:
popup for featured image is small

Oddly the Gallery Media Dialogue does know how to filter:
media dialog for gallery does know what is there

Desktop (please complete the following information):

  • OS: Windows10
  • Browser: Chrome
  • Version: Gutenberg 3.4.0 and WordPress 4.9.8

Smartphone

  • N/A

Additional context

  • The Classic editor's Media Dialogue has a DIV called "media-toolbar-secondary" that contained the pop-ups, DIVS with IDs of, "media-attachment-filters" and "media-attachment-date-filters."
  • The same thing seems to happen when you add an Image Block; the Media Dialogue doesn't filter for images that are Uploaded to this Post, Mine, or Unattached.
  • When you use Image Gallery, it is possible to see what is Uploaded to this Post, Mine, or Unattached.
  • Inline Image and Cover Image both do not show the Uploaded to this Post, Mine, or Unattached.
  • So, whoever is coding the Gallery section must be doing something right, because that does not remove functionality.
@danielbachhuber
Copy link
Member

Related #7736

@danielbachhuber danielbachhuber changed the title Featured Image dialogue missing important function Featured Image dialogue missing "Mine" and "Unattached" filers Aug 9, 2018
@danielbachhuber danielbachhuber changed the title Featured Image dialogue missing "Mine" and "Unattached" filers Featured Image dialogue missing "Mine" and "Unattached" filters Aug 9, 2018
@danielbachhuber danielbachhuber added the [Feature] Media Anything that impacts the experience of managing media label Aug 9, 2018
@designsimply designsimply added the [Type] Enhancement A suggestion for improvement. label Aug 9, 2018
@bkjproductions
Copy link
Author

@danielbauchhuber, if you're changing the title of this issue, please don't forget the "Uploaded to this post" as that is one of the more important features of that filter.

@designsimply, does the "type enhancement" mean that this is not going to be fixed by the 5.0 release of WordPress?

@danielbachhuber danielbachhuber changed the title Featured Image dialogue missing "Mine" and "Unattached" filters Featured Image dialogue missing "Mine", "Uploaded to this post", "Unattached" filters Aug 9, 2018
@danielbachhuber danielbachhuber added the Backwards Compatibility Issues or PRs that impact backwards compatability label Aug 9, 2018
@danielbachhuber
Copy link
Member

please don't forget the "Uploaded to this post" as that is one of the more important features of that filter.

Done.

@designsimply
Copy link
Member

Does the "type enhancement" mean that this is not going to be fixed by the 5.0 release of WordPress?

Not necessarily! However, I will note that developers working full time on the project are focused mainly on fixing bugs prior to the 5.0 release, and of course this project is open source and any developer who would like to take on submitting updates may do so.

@bkjproductions
Copy link
Author

I would characterize this as a bug, not a feature request or enhancement , because it's something that worked before and now does not work.

As mentioned above, it does work in one situation:

Gallery Media Dialogue

@antpb antpb removed this from the WordPress 5.0 milestone Oct 5, 2018
@danielbachhuber danielbachhuber added this to the WordPress 5.0 milestone Oct 17, 2018
@antpb antpb self-assigned this Oct 17, 2018
@antpb
Copy link
Contributor

antpb commented Oct 18, 2018

Here's how the Gallery frames factor in this filter as we would expect: https://github.com/WordPress/gutenberg/blob/master/packages/edit-post/src/hooks/components/media-upload/index.js#L36

We'd need to make frames for each instance of the media library and also define a default state. I'm not positive yet how it currently gets the initial frame from the featured image and image block, but I'll investigate. It may just be adding filterable: 'uploaded' to that frame.

A condition might be needed for featuredImage image video audio etc. and a default would need to also be set. We'd match something like this file from a PR I have open. :

return wp.media.view.MediaFrame.Post.extend( {

I'm thinking the media frame default (and especially the featured image default) view will need to match this here from Core: https://github.com/WordPress/wordpress-develop/blob/6b366c6620fdd5960cedcdf80955966a715efa82/src/js/media/controllers/featured-image.js#L40-L47

I'll keep digging into this tomorrow. Just wanted to throw a quick brain dump from my initial findings. :)

@antpb
Copy link
Contributor

antpb commented Oct 19, 2018

I've opened a PR. Would love some testing on it and a review. This adds a condition for featuredImage to allow for the proper frame features (uploaded, mine, not uploaded) to be available. #10810

@mtias mtias added the [Status] In Progress Tracking issues with work in progress label Nov 14, 2018
@antpb
Copy link
Contributor

antpb commented Nov 15, 2018

In #10810 there is some discussion around how the featured image flow should go.

@joemcgill outlined much of the pending decisions/blockers in this comment: #10810 (comment)

The PR currently uses the Post frame instead of the Select frame. (sidebar on the left vs. no sidebar on the left) In the 4.9.8 media flows, featured image frame does not have this sidebar.

@joemcgill and I discussed this again today in slack DMs and have come to the agreement that it would be better to push this issue to a later version in favor of a more complete solution that is applicable to all forms of media, and not just featured images. We need to make some decisions and changes in the Media Library structure that would allow it to be better extended or filtered. Just wanted to outline this before moving the milestone without reasoning.

Open to suggestions if anyone has any thoughts around this.

@antpb antpb modified the milestones: WordPress 5.0 RC, Future: 5.1 Nov 15, 2018
@gsallman
Copy link

I'm just bumping this thread to point out that this requirement doesn't only apply to featured images, but also to adding/changing any image -- I don't see this mentioned in the thread above.

This is particularly needed when changing themes where image resolutions are different. In this use case, and you need to edit a page/post to reinsert the page's/post's images again at a different resolution. Trying to find the images among 1,000s is impossible without the 'Uploaded to this post' feature in the media browser.

This is definitely a bug/omission this functionality is present in the Classic editor.

@macfrickins
Copy link

@antpb I understand the need for better media flow. Just for recap what I remember from past experience with wp. In past years there were various flows for inserting image.

WP 3.0 - Up 7, ADD 3 steps - default view was uploaded to post
UP // Create new post - Click Upload / Insert by file type - Click Upload to post - Pick images from pc - Click Open - Choose an image - Click insert
ADD // Click Upload/insert - Choose an image - Click insert

WP 3.5 - UP 5, ADD 5 or 3 steps - default view changed to all media (using plugin Default Media Uploader View)
UP // Create new post - Click Add media - drag and drop upload - Choose an image - Click Insert into post
ADD // Click Add media - Click images - Choose uploaded to this post - Choose an image - Click Insert into post
ADD with plugin // Click Add media - Choose an image - Click Insert into post

WP 3.9 - UP 4, ADD 5 or 3 steps
UP // Create new post - drag and drop upload - Choose an image - Click Insert into post
ADD // Click Add media - Click images - Choose uploaded to this post - Choose an image - Click Insert into post
ADD with plugin // Click Add media - Choose an image - Click Insert into post

WP 5.1 - UP 4 (multiplied by the number of single images added to post), ADD 25
UP // Create new post - click Add block - click Add image - drag and drop upload
ADD // Click media library - try to find an image - choose an image, click Select

Difference between 5.1 and previous - In the previous version, it was possible to upload all files for a given post, and then return back and choose files needed. In 5.1 we are back to WP 3.0 flow, when you have to upload one by one specific file types or separate images. It is very frustrating to see this regress.
I understand that this is still in development, but the necessity to dig through images is clearly a bug.

For better flow, I am thinking about things that could be fixed

  1. Return media uploader to post - an ability to add various files at once is for some people crucial
  2. Add option to settings - see files uploaded to this post first
  3. Give people the option to drag to top toolbar blocks that they use the most. Removing one unnecessary step - clicking on Add block
  4. I can imagine that files uploaded to post will be visible in the right sidebar, and from there I will be able to drag and drop them as blocks - image or when choosing multiple images as a gallery

@drzraf
Copy link
Contributor

drzraf commented Apr 26, 2019

Definitely a bug/regression rather than type:enhancement.
cweagans/composer-patches to the rescue:

diff --git a/wp-includes/js/media-views.js b/wp-includes/js/media-views.js
index 2ffa44b..7edfb19 100644
--- a/wp-includes/js/media-views.js
+++ b/wp-includes/js/media-views.js
@@ -949,7 +949,7 @@ function(module, exports) {
 		router:             'browse',
 		toolbar:            'select',
 		searchable:         true,
-		filterable:         false,
+		filterable:         'uploaded',
 		sortable:           true,
 		autoSelect:         true,
 		describe:           false,

Gist: https://gist.githubusercontent.com/drzraf/efc324504dac13b7723b5322a2056669/raw/6531b40e6705e54c2d9a427e13952ce9aeca9023/gutenberg-fix-8748

@EvanLTD
Copy link

EvanLTD commented Apr 29, 2019

Thank you drzraf! The missing filters were driving me batty and your fix works! I'm admittedly clueless about github workflows, but I hope someone can get this fix pushed up the chain and into core. My clients and I use 'uploaded to this post' on a daily basis and we've been floundering around without it.

@jawrat
Copy link

jawrat commented Jun 13, 2019

fwiw, if anyone else comes across this, the media-views.min.js file needs to be updated as well (or at least it did in my case)....once I made that change, and reloaded it, voila, filter has returned! :) thanks!

@designsimply designsimply added [Type] Bug An existing feature does not function as intended and removed [Type] Enhancement A suggestion for improvement. labels Aug 16, 2019
@swiftcommike
Copy link

Is it possible to implement this fix with a hook, so that when core updates the fix remains in place?

@anthonyburchell
Copy link
Contributor

I have opened a PR that fixes this issue. There was an old PR from over a year ago that had much of the discussion that landed us on the new PR's changes. Link above!

@antpb
Copy link
Contributor

antpb commented Sep 18, 2019

With #17410 merged, I think we can close this now. Yay!

@devisan
Copy link

devisan commented May 16, 2020

Is this ever going to be fixed? I have no option for "Uploaded to this post" in any of my Wordpress installations with Gutenberg. It's present in Classic. Guess I will go back to classic until Gutenberg is actually ready for prime time.

@derektor
Copy link

derektor commented Aug 11, 2021

I confirm, that the problem exists still. As shown in first post (#8748 (comment)) there is no filter with "Mine" when adding image from media library in block editor.

(Surprisly when adding gallery the filter exists. When adding thumbnail to the post - the filter exists.)

Does anyone know when it will be fixed ?

@netinial
Copy link

netinial commented Nov 1, 2022

It seems this issue has been resolved at
#17410

However we confirm issue repeats again.

Changing Theme to default.
Disabling all Plugins does not works.

Image block dialogue missing Filter Media as "Mine", "Uploaded to this post", "Unattached" filters

Any chance to check issue again?

@devisan
Copy link

devisan commented Oct 25, 2023

Still not fixed. Is the status closed because Wordpress isn't planning to fix it, or can we please reopen? Having to search for images adds so much to my workflow when updating posts (which is what a lot of us spend a lot of time doing).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backwards Compatibility Issues or PRs that impact backwards compatability [Feature] Media Anything that impacts the experience of managing media [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests