mediawiki-extensions-Visual.../modules/ve/init/mw/targets
Timo Tijhof e3cdfaa9fe mw.ViewPageTarget: Performance improvements for section edit links
Follows-up I4b9c47fd65a700a:
* Remove unused closingBracketSymbol.
* Moving veSectionEditUri and sectionEditUri inline as it is
  only used once. This will allow it to be easily dereferenced
  (instead of likely staying in memory due to being claimed by
  remaining closures "expand" and "expandSoon" which will
  continue to claim and enjoy access to this scope.
  Also changed it to use the attr() callback so that we
  don't access `$editLink.attr( 'href' )` twice.
* Add various comments explaining this non-obvious approach.
  Though it makes sense (eventually) and more elaborate details
  are in the original commitmsg, that is no excuse for a 100 line
  function without a single comment, especially with all these
  things going on.
* Use "shrink" instead of "contract" (seems more common in
  context of web UI elements and less ambgiuous in English).
* Remove redundant toString in `new mw.Uri( veEditUri )`.
  Aside from redundant, it also had more overhead (serialising
  uri object to string and re-parsing). It revoked its ability
  to make an efficient clone by taking the mw.Uri object as input
  as opposed to having to parse it again. mw.Uri#clone does the
  same internally.
* Avoid variable names like $this, that or self. Using a more
  descriptive name instead.
* Re-use $closingBracket instead of using last() 3 times which
  makes 3 clones of the jQuery object with the same last element
  in it.
* Refactor odd swapping of closingBracket-hide and
  middleBracket-clone-show.
  It now keeps the original opening/edit/closing in tact and adds
  devider/hidden/edit-source/outerClosing at the end.

Change-Id: I5f093f2927b769fed0c6d1a40f99e73f9b653b9a
2013-06-27 13:11:38 -07:00
..
ve.init.mw.ViewPageTarget.js mw.ViewPageTarget: Performance improvements for section edit links 2013-06-27 13:11:38 -07:00