-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Consider allowing all media to show in the media library regardless of block type #2439
Comments
I think that is a very good idea Joen! |
I think this makes a lot of sense. A possibly nice side effect is that it would allow us to collapse a lot of different media-type-blocks into one (i.e. why have image and video and ...). Why not just have paste link/insert media? |
We could theoretically combine the blocks into a "Media" block, and ensure the media block had search keywords for Part of the idea is that every block can have a placeholder state. This will be used for template building in the future. You could end up building an entire post or page layout using just placeholders, which the user could then "fill out like a form"; image here, video there, gallery here, and suddenly they'd have the same layout they saw on the theme demo page.
Directly related to above, we are levelling the playing field for blocks and providing a unified interface so you only have a single interface to learn, and then you know how to do everything. In this case you only have to learn how thoe inserter works, and then you know how to insert not just images, videos and galleries, but every other block we offer. As it exists right now, I do realize it is sub-optimal: insert image block, click button on placeholder, pick image in media modal, press done. This is one more click than the previosu flow: click add media button, pick image in media modal, press done. However it is this way because we can't rewrite the media modal in the scope of Gutenberg. A future enhancement to the media flow should be to not have a modal at all: insert image block and see available images directly in placeholder, pick image, done. This would be the same amount of clicks, but let us have the benefits of the placeholders and the unified inserter interface. |
Good points. I think either flow would have its merits, but maybe the best way is a combination of the two - when you insert an image block and open the media library, it pre-filters images (either by removing other media or indeed graying it out), but you always have the option to clear the filter if you feel like video or audio would fit better, and selecting those would transform the block accordingly. Applications like Photoshop etc also limit the types of files you can import in a certain context, but they always offer the possibility to To make it as flexible as it sounds though, it needs to be really fool-proof. When you edit an image block and select a video instead, the image must be discarded, as well as any settings related to an image block that might have been customized. What happens to a gallery when you edit it and select a video? Does it discard the images? Is a mixed-media gallery possible? I think the flexibility would be a big win, as long as the spec is solid. |
This ticket was mentioned in Slack in #core-editor by jeffpaul. View the logs. |
As a bit of repository management, I'm going to close this ticket and file it in the "Ideas" project so we can revisit this in the future: https://github.com/WordPress/gutenberg/projects/8 |
Got this feedback from a user.
This is a solid observation.
We're sort of straddling the line between old and new, by having a flow where the current media modal is used as is. Which means people used to this modal opening from an "Insert Media" button will be surprised to see that it's been limited to just images (if clicked from the Image placeholder button) and videos (if clicked from the Video placeholder button).
In the very long term, the idea is to have the media library sort of live in the placeholder itself, taking the modal out of it. But in the mean time, it seems like a confusion worth addressing. (#2128)
Question: Should we make it so the media library is never filtered for filetypes when you open it from a placeholder, and let the block change type depending on what you insert?
This would essentially make the gallery, video and image placeholder blocks be almost aliases of each other. That is, if you insert an image placeholder block and select a video, it transforms to a video block. Or, if you insert only a single image into a gallery block, it becomes an image block.
This would also tie into the ticket @mkaz opened about dragging an image onto another image to create a gallery (can't find the ticket).
The text was updated successfully, but these errors were encountered: