WordPress.org

Make WordPress Core

Opened 8 years ago

Closed 5 years ago

#24988 closed enhancement (maybelater)

Cleanup for `/wp-admin/js/accordion.js`

Reported by: carldanley Owned by: morganestes
Milestone: Priority: normal
Severity: normal Version: 3.8
Component: General Keywords: has-patch needs-refresh needs-docs
Focuses: javascript Cc:

Description

I've attached a cleanup iteration of the existing accordion file.

  • Cleaner function names
  • Moved the structure of the file to a revealing module pattern
  • Added JSDocs
  • prefixed jQuery objects with proper $ sign
  • The current iteration has no publicly exposed API methods but I was thinking it might be nice to offer support for toggleAccordion etc. Need thoughts on this.

Could use a second pair of eyes to test this functionality and make sure we have no errors here.

Attachments (1)

accordion-cleanup.diff (5.1 KB) - added by carldanley 8 years ago.

Download all attachments as: .zip

Change History (7)

#1 @DrewAPicture
8 years ago

  • Keywords has-patch added
  • Type changed from defect (bug) to enhancement

Looks like accordion-cleanup.diff is a good start. Would you mind adding a file header? I believe we added this in the last cycle (3.6).

#2 @jeremyfelt
8 years ago

  • Focuses javascript added

#3 @chriscct7
6 years ago

  • Keywords needs-refresh needs-docs added

This ticket was mentioned in Slack in #docs by morganestes. View the logs.


5 years ago

#5 @morganestes
5 years ago

  • Owner set to morganestes
  • Status changed from new to assigned

#6 @morganestes
5 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to maybelater
  • Status changed from assigned to closed

I tried refreshing the existing patch, but it's diverged so much over the years that it doesn't make sense anymore. I'm going to say we close it for now, and if someone wants to revisit this, then we can reopen it then.

Note: See TracTickets for help on using tickets.