Backbone branch update

The goal of the backbone branch is to build on existing Media components, and create more that we need with the same Backbone design patterns.

The branch currently works without any core hacks. We’re deregistering WP media-views.js and media-models.js, and registering our own to get around hacking core files. You can visit the Media page and you’ll see the modal flat on the page. This is thanks to the fact that any custom MediaFrame workflow extends media.view.MediaFrame, which accepts an options hash including a boolean for whether to push the workflow into a media.view.Modal. So we pass false to the MediaFrame constructor, and justappend our view to an element on the page. Rad.

Everything works – browsing, editing attachments, uploading, cropping images. There’s one minor glitch I’ll put in the task list down below.

I just pushed today adding in the small, medium, and large sizing options that are in thepersistent sidebar branch. A user chooses a size for thumbnails, which corresponds to a set number of attachments per row (small = 6 per row, medium = 4, large = 2).

I’m not sure what I should focus on next. Some tasks and opportunities:

  • Review the new “MediaFrame.Manage” workflow code.
  • Review and improve attachmentSizer implementation. Consider places where this should go in the UI (user settings-specific control somewhere?)
  • When you edit an image, clicking “Back” doesn’t disappear the button from the Toolbar.
  • Keyboard accessibility (#23560).
  • Media previews covering for various types: full-screen lightboxed images, video player and audio player are low hanging fruit there.
  • Bulk Editing
  • Collections (i.e. holy grail, probably 4.1 unless mountains move)
Advertisements

#23560