[wp-trac] [WordPress Trac] #21483: Refactor Customizer Upload, Image, and Background Image controls to leverage the media library/modal
WordPress Trac
noreply at wordpress.org
Tue Nov 4 07:01:39 UTC 2014
#21483: Refactor Customizer Upload, Image, and Background Image controls to
leverage the media library/modal
-------------------------------------------------+-------------------------
Reporter: jjonesftw | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 4.1
Component: Customize | Version: 3.5
Severity: normal | Resolution:
Keywords: has-patch needs-testing dev- | Focuses: ui,
feedback ui-feedback ux-feedback | javascript
-------------------------------------------------+-------------------------
Comment (by celloexpressions):
Replying to [comment:37 ocean90]:
> [attachment:21483.3.diff]:
>
> * Can we use the constructor to set up `$button_labels`?
Yes, I'm afraid that's going to be the only option. Not as easy to
override in subclasses or individual instances, but works fine.
> * Button labels for background images should include "image" not "file"
Should be fixed in .4, that control was not yet changed at all - that is
what the back-compat looks like currently for a subclass of
`WP_Customize_Image_Control`.
> * `wp.customize.ImageControl ` needs to stay for BC. Why does it need to
be removed? On PHP side we still have `WP_Customize_Image_Control extends
WP_Customize_Upload_Control`. I think it's OK to have ImageControl to just
handle images.
None of the JS is needed at all due to the way the media modal works - and
all of the image logic needs to be in the upload control anyway since it
supports images. But we can leave the `wp.customize.ImageControl` model,
empty its methods, and remove it from the control constructor declaration
so that subclasses should still work as expected. Can this look
essentially like how the PHP class looks in the latest patch?
> * src/wp-admin/js/customize-controls.js:894 has a missing semicolon
Nice catch!
> * Can we have a "No image set" hint for the background control too?
Done.
> * Drag&Drop: Let the whole control be a dropzone, that would be awesome.
After the drop the frame should open for upload status and error reporting
I'm not sure that this is needed, or particularly discoverable. Also, not
a very big space for a dropzone. But we could add it if people want it.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/21483#comment:38>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list