butterbean icon indicating copy to clipboard operation
butterbean copied to clipboard

Other media controls

Open justintadlock opened this issue 8 years ago • 7 comments

Right now, there's an image control, but I'd like to experiment with some other media controls. I haven't worked too much with wp.media. I'd love to see some examples from other plugins and how they're using media modals.

Anyway, this is just a general ticket for additional media controls.

justintadlock avatar Jun 07 '16 00:06 justintadlock

The current media control seems to be for images only. A file upload or general upload would be nice.

Also thinking a multiple image or gallery control would be cool. Could be used for sliders and such.

m-e-h avatar Aug 22 '16 19:08 m-e-h

Also thinking a multiple image or gallery control would be cool. Could be used for sliders and such.

I agree with @m-e-h, it'd be cool if you add multiple image control.

gasatrya avatar Aug 30 '16 03:08 gasatrya

I was thinking about image gallery too. I've been thinking about how the UI would look. Maybe showing all the thumbnails in the meta box (could be a lot of images)? A placeholder?

The UI is probably the only "roadblock" that I can think of. Most of the code should be relatively easy.

justintadlock avatar Aug 31 '16 17:08 justintadlock

Didn't think about the UI. That could get ugly with a lot of images. A preview would be nice though.. Simplest thing would be to decide on a reasonable max-height and do overflow-y: auto.

m-e-h avatar Aug 31 '16 20:08 m-e-h

wp-gallery-editor

That's a screenshot of the WP visual editor while it's loading gallery images. It, of course, displays all the images once they're loaded. Anyway, it might come in handy.


There's also the question of whether this should be a "gallery" control or a "multi-image" control.

For a gallery, I'd probably want to store something like the [gallery] shortcode parameters such as columns, etc.

So, I'm leaning more toward a multi-image control that gives you an array of image IDs. Then, let developers extend that for a more specific use case like a full gallery implementation.

Still undecided though. I'd need to dig into the core media modal stuff more to see exactly what's available.

justintadlock avatar Aug 31 '16 21:08 justintadlock

Here're a couple screenshots from Advanced Custom Fields Pro plugin gallery modules

Without images

With images

Exactly like @m-e-h said, use max-height and overflow: auto;

gasatrya avatar Sep 01 '16 08:09 gasatrya

Stumbled upon this the other day https://make.xwp.co/2016/08/12/image-gallery-control-for-the-customizer/ Haven't tried that control yet but thought it may be a relevant reference for a Butterbean gallery control.

m-e-h avatar Dec 02 '16 17:12 m-e-h