WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#28459 closed defect (bug) (fixed)

Improve wp.media documentation

Reported by: ericlewis Owned by: wonderboymusic
Milestone: 4.1 Priority: normal
Severity: normal Version: 3.5
Component: Media Keywords: has-patch commit
Focuses: javascript, docs Cc:

Description

Catch all ticket for me improving documentation in wp.media. Brisk review and acceptance appreciated.

Attachments (9)

28459.diff (8.3 KB) - added by ericlewis 7 years ago.
28459.2.diff (8.2 KB) - added by ericlewis 7 years ago.
28459.3.diff (8.5 KB) - added by ericlewis 7 years ago.
28459.4.diff (8.8 KB) - added by ericlewis 7 years ago.
28459.5.diff (2.5 KB) - added by ericlewis 7 years ago.
28459.6.diff (12.6 KB) - added by DrewAPicture 7 years ago.
Some @since tags
28459.7.diff (10.0 KB) - added by ericlewis 7 years ago.
28459.8.diff (16.6 KB) - added by ericlewis 7 years ago.
28459.9.diff (25.0 KB) - added by ericlewis 7 years ago.

Download all attachments as: .zip

Change History (31)

@ericlewis
7 years ago

@ericlewis
7 years ago

#1 @ericlewis
7 years ago

First pass: attachment:28459.2.diff

  • remove unused sidebar in media.controller.Library defaults. (I'd guess sidebar was previously a region, which was consumed by AttachmentsBrowser at some point)
  • group Selection defaults, Initial region modes, and Attachments browser defaults together in each state's constructor defaults.

(Previously removed describe from a few constructors in attachment:28459.diff thinking it isn't used, but realized it is)

#2 @DrewAPicture
7 years ago

  • Focuses docs added

#3 @wonderboymusic
7 years ago

In 28675:

Media modal documentation:

Add some clarity to default values for controllers.

Props ericlewis.
See #28459.

#4 @wonderboymusic
7 years ago

  • Milestone changed from Awaiting Review to 4.0

@ericlewis
7 years ago

#5 @ericlewis
7 years ago

In attachment:28459.3.diff,

  • Boil down wp.media() description. Don't say that it opens a frame when it doesn't.
  • Fix up and add to media.controller.Region event documentation.
  • Add some state constructor descriptions.
  • Methods are mapped from a StateMachine to its states collection, not the other way around.
  • More minutia in diff.
Last edited 7 years ago by ericlewis (previous) (diff)

@ericlewis
7 years ago

#6 @ericlewis
7 years ago

In attachment:28459.4.diff:

#7 @wonderboymusic
7 years ago

In 28688:

Improve inline doc descriptions in media-views.js.

Props ericlewis.
See #28459.

#8 @wonderboymusic
7 years ago

  • Resolution set to fixed
  • Status changed from new to closed

#9 @DrewAPicture
7 years ago

\o/ Nice work guys :-)

#10 @ericlewis
7 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

This ain't over till it's over

@ericlewis
7 years ago

#11 @ericlewis
7 years ago

In attachment:28459.5.diff add docs to media.view.MediaFrame.Select methods. Remove a couple @this context documentation bits which were incorrect.

#12 @DrewAPicture
7 years ago

  • Owner set to wonderboymusic
  • Status changed from reopened to reviewing

#13 @wonderboymusic
7 years ago

In 28989:

Add more docs for media.view.MediaFrame.Select methods.

Props ericlewis.
See #28459.

#14 @DrewAPicture
7 years ago

  • Type changed from enhancement to defect (bug)

Missing docs are a bug.

@DrewAPicture
7 years ago

Some @since tags

#15 @DrewAPicture
7 years ago

  • Milestone changed from 4.0 to Future Release

I have a feeling this will be an ongoing effort.

#16 @wonderboymusic
7 years ago

In 29739:

Add some @since annotations to media-views.js.

Props DrewAPicture.
See #28459.

#17 @wonderboymusic
7 years ago

  • Milestone changed from Future Release to 4.1

@ericlewis
7 years ago

#18 @ericlewis
7 years ago

  • Keywords has-patch commit added

@ericlewis
7 years ago

@ericlewis
7 years ago

#20 @ericlewis
7 years ago

In attachment:28459.9.diff, add document the selection attribute for media.controller.Library constructor.

This supplants attachment:28459.8.diff.

#21 @wonderboymusic
7 years ago

In 30245:

Improve wp.media documentation.

Props ericlewis.
See #28459.

#22 @ocean90
7 years ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

Closing as fixed for 4.1.

Note: See TracTickets for help on using tickets.