Matmarex has uploaded a new change for review.

Change subject: rewrite and deprecate two ajax throbber related CSS classes
......................................................................

rewrite and deprecate two ajax throbber related CSS classes

Deprecate CSS classes .mw-ajax-loader and .mw-small-spinner. Instead of
them, introduce .mw-throbber and .mw-throbber-small. They do the same
thing, but better, without quirks and in a consistent way.

And while we're at it, also rename throbber gif files for consistency:
* ajax-loader.gif -> ajax-throbber.gif
* spinner.gif -> ajax-throbber-small.gif

The reasoning for this change:
* .mw-ajax-loader is defined in a, to say the least, non-standard way. Not
  only it uses padding to set its height, it also uses relative
  positioning to negate the margin that page heading has. This obviously
  causes issues if the element with this class is inserted anywhere else.
* .mw-small-spinner uses the same padding/height trick, and instead of
  positioning has a little margin-right for no obvious reason. This also
  hinders its reuse.
* Additionally, these two classes which apparently do almost the same
* thing (add a spinning gif in the background) have completely unrelated
  names. The same applies to image file names.

The first class in only used once in core, in preview.js (fixed in this
commit). The second isn't used in core.

However, they are both used in extensions, including:
* .mw-small-spinner in LiquidThreads
* .mw-ajax-throbber in LiquidThreads, MoodBar, Translate

What's worse, both LqT and MB redefine .mw-ajax-throbber, because, citing
a comment in MB, "they are horrible for reuse". I am going to look through
the usages and fix them one by one once this commit is accepted. The usage
list (obtained by grepping extensions present in Gerrit) is available
here: http://pastebin.com/1BBvkpmM

(I am not sure what the rules/policies/guidelines for removing/deprecating
CSS classes are. Comments are welcome :) )

Change-Id: Ie55ffb6b1920f08819c1ec71768ac26da6fef69c
---
R skins/common/images/ajax-throbber-small.gif
R skins/common/images/ajax-throbber.gif
M skins/common/preview.js
M skins/common/shared.css
4 files changed, 23 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/78/22178/1
--
To view, visit https://gerrit.wikimedia.org/r/22178
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie55ffb6b1920f08819c1ec71768ac26da6fef69c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Matmarex <matma....@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to