[wp-trac] [WordPress Trac] #24716: Grid view for the Media Library
WordPress Trac
noreply at wordpress.org
Sun Jun 29 03:49:12 UTC 2014
#24716: Grid view for the Media Library
-------------------------------------+-------------------------------------
Reporter: alexvorn2 | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 4.0
Component: Media | Version:
Severity: normal | Resolution:
Keywords: has-patch needs-testing | Focuses: ui, javascript,
ui-feedback ux-feedback | administration
-------------------------------------+-------------------------------------
Comment (by ericlewis):
attachment:24716.9.diff is still a work in progress, and should not be
considered for commit, only for feedback.
Brief notes: If you click on a media item in the grid, a modal will open
up with the Image Editing (read: cropping) interface - no default media
details editing interface yet.
Hard notes:
* Introduce `media.view.Frame.EditMediaDetails`, which is a view that will
control editing media details. Note this extends from `media.view.Frame`,
not `media.view.MediaFrame`. `media.view.MediaFrame` is hard-wired to work
with specific regions (menu, title, toolbar, content, router), while our
mock-ups don't match that exactly. We need a custom header for the
pagination links (click left to edit the previous media item, right for
next). So what we want is region management and a state machine, which is
exactly what `media.view.Frame` provides.
* Introduce `media.controller._State`, which is a more abstracted state
controller object. `media.controller.State` is hard-wired to the regions
defined by `media.view.MediaFrame`, while the only region we need in
`media.view.Frame.EditMediaDetails` is `content`.
* `media.controller.EditImageNoFrame` is the state for editing an image
(i.e. the cropping interface), a simplified version of
`media.controller.EditImage` without the `toolbar` region setup, which we
will not need.
* Something I'm happy with: in `media.view.Attachment`, trigger an event
on the frame controller `edit:attachment`, instead of creating the modal
from within the view, the controller does on an event callback. We should
continue to decouple components via the event API as much as possible.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/24716#comment:40>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list