Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#36264 closed enhancement (fixed)

Make wpList easier to contribute to

Reported by: obenland's profile obenland Owned by: obenland's profile obenland
Milestone: 4.7 Priority: normal
Severity: normal Version:
Component: Administration Keywords: has-patch
Focuses: javascript, docs Cc:

Description

I wanted to use wpList for the plugin directory rewrite to take advantage of the built-in data and DOM manipulation but was confronted with a very hard to understand code base with little to no documentation.

I took the time to expand variable names and add some documentation as I waded through the file, learning and understanding what it does. Please find attached patch with the (preliminary) results.
This might muddy some of the file's blame history, but I think it's a decent price to pay for some documentation there, leading to more than a handful of people understanding what it even does in the first place.

Attachments (2)

36264.diff (34.8 KB) - added by obenland 8 years ago.
36264.2.diff (36.3 KB) - added by obenland 8 years ago.

Download all attachments as: .zip

Change History (16)

@obenland
8 years ago

#1 @obenland
8 years ago

  • Milestone changed from Future Release to 4.6

#2 @obenland
8 years ago

@helen I'd like to proceed with this to make wp-lists easier to work with and contribute to in the future. You mentioned that we should try to avoid a total refactor in a couple of places and while this is not a refactor but just a prettification, I still wanted to give you an opportunity to veto if you see issues with it.

#3 @ocean90
8 years ago

  • Keywords has-patch added

This ticket was mentioned in Slack in #core by chriscct7. View the logs.


8 years ago

#5 @obenland
8 years ago

  • Milestone changed from 4.6 to Future Release

This ticket was mentioned in Slack in #core by obenland. View the logs.


8 years ago

#7 @rachelbaker
8 years ago

  • Keywords 4.7-early added

@obenland this is amazingly helpful. Thank you for doing this. Any reason this ticket (other than time) didn't make 4.6?

#8 @obenland
8 years ago

I wanted to make sure 2 had a chance to be addressed

#9 @helen
8 years ago

I do not have any problems with docs/cleanup, just want a second eye on the docs (formatting and content) for peace of mind.

@obenland
8 years ago

#10 @obenland
8 years ago

  • Keywords 4.7-early removed
  • Milestone changed from Future Release to 4.7
  • Owner set to obenland
  • Status changed from new to accepted

Updated patch to reflect changes in 4.6.

@DrewAPicture, would you mind giving it a final look-over?

#11 @helen
8 years ago

#34917 was marked as a duplicate.

#12 @helen
8 years ago

Whenever this gets committed, please give @rommelxcastro props for the parallel work he put into #34917.

#13 @DrewAPicture
8 years ago

  • Focuses docs added

@obenland Looks pretty good. It would be nice to have descriptions on all of the @returns notations in addition to the types.

#14 @obenland
8 years ago

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

In 38599:

Make wpList easier to contribute to.

Uses more semantic variable names and adds function and inline documentation.

Props rommelxcastro for parallel work in #34917.
Fixes #36264.

Note: See TracTickets for help on using tickets.