Make WordPress Core

Opened 10 years ago

Closed 10 years ago

Last modified 9 years ago

#30193 closed defect (bug) (fixed)

Add JSDoc-style options hash descriptions for media class constructors

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

Description (last modified by ericlewis)

As we're moving towards JSDoc, let's clean up our options hash descriptions in media class constructors.

This will incldue moving over from @constructor to @class tags, which is the preferred nomenclature on the JSDoc scene.

Attachments (4)

30193.diff (1.4 KB) - added by ericlewis 10 years ago.
30193.2.diff (2.8 KB) - added by ericlewis 10 years ago.
30193.3.diff (795 bytes) - added by ericlewis 10 years ago.
30193.4.diff (53.2 KB) - added by ericlewis 10 years ago.

Download all attachments as: .zip

Change History (14)

10 years ago

#1 @ericlewis
10 years ago

  • Milestone changed from Awaiting Review to 4.1

#2 @ericlewis
10 years ago

  • Description modified (diff)
  • Summary changed from Improve documentation for to Add JSDoc-style options hash descriptions for media class constructors

In attachment:30193.diff, options hash for media.view.MediaFrame.Select.

10 years ago

#3 @ericlewis
10 years ago

In attachmenet:30193.2.diff, options hash clean-up for media.controller.Library.

Version 0, edited 10 years ago by ericlewis (next)

10 years ago

#4 @ericlewis
10 years ago

In attachment:30193.3.diff, media.controller.Region options hash documentation.

#5 @DrewAPicture
10 years ago

  • Focuses docs added

10 years ago

#6 @ericlewis
10 years ago

In attachment:30193.4.diff (codename Southwest 4570):

  • extended documentation for media.controller.Region, media.controller.StateMachine, media.selectionSync, and a bunch of other constructors and methods.
  • exhaustive constructor options hash descriptions for media.controller.Library, media.controller.ImageDetails, media.controller.GalleryEdit, media.controller.GalleryAdd, media.controller.CollectionEdit, media.controller.CollectionAdd, media.controller.CollectionAdd, media.controller.ReplaceImage, media.controller.EditImage, media.controller.Embed, and media.view.UploaderWindow.
  • removed the big blocks like CONTROLLERS and VIEWS, which aren't helpful when this file is 7500 lines long. We're also getting to a point where the term "controller" is murky and in cases problematic for developer experience. Something gcorne and I spoke about during #wcsf a work day: knowing media.controller.CollectionAdd is a controller tells you nothing about its actual role in the system; knowing it is a state is much more helpful.
  • added a few @todos where I found dead or curious code.
  • change all @constructors to @classes

#7 @wonderboymusic
10 years ago

In 30120:

Add verbose docs to media-views.js.

Props ericlewis.
See #30193.

#8 @wonderboymusic
10 years ago

  • Keywords commit removed

Re-add commit if you do more work here

#9 @ocean90
10 years ago

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

Closing as fixed for 4.1.

#10 @wonderboymusic
9 years ago

In 31490:

After [30120], in media JS files, move from @constructor to @class annotations as per JSDoc preferred nomenclature:

See #28510, #30193.

Note: See TracTickets for help on using tickets.