https://bugzilla.wikimedia.org/show_bug.cgi?id=31755

Krinkle <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #28 from Krinkle <[email protected]> 2012-03-02 21:55:52 UTC ---
Summary:

* Up until the point where jquery.tablesorter replaced the wikibits tablesorter
code, the "sort" trigger icon was an <img> element injected into the <th>
element. No CSS was applied by default by the tablesorter
* Wikis commonly used class=wikitable or inline style="" attributes for the
styling of the actual table being sorted
* The jquery.tablesorter module now applies CSS:
-- a background-image on the <th>
-- padding on the <th> (to avoid text from continuing where the image appears)
-- background-position on the <th>

The way jquery.tablesorter does it is imho a more ideal approach, and easier to
customize and maintain.

However since it isn't a new module but replacing an old one, we need to think
about compatibility with the 1000s of articles out there written with thought
(or need to think of) that some other CSS was going to be applied later on.

Wikis didn't have to account for styling before, so there are 10,000s of
articles all over the place with inline hardcoded style attributes on tables.
Including generic catch-all style rules like "background: red;"  that
unintentionally override background-image and background-position of the
jquery.tablesorter, thus causing the sortable table to no longer have an icon
visible (A UX problem, and a regression as well since the icon was perfectly
visible in the old system.

Couple of solutions come to mind, in no particular order:

A) We somehow enforce the styling (!important)
-- Advantage: Only re-enforces the properties we care about, other inline
styles should be fine
-- Disadvantage: We're using !important, so local wikis will have a hard time
customizing anything, as well as other modules from core/extensions or gadgets
(e.g. a custom sortable icon)

B) We get rid of the css part of jquery.tablesorter targeting the <th>  and
instead go old-school and put the "sort" icons as actual child elements of the
<th> (doesn't have to be <img>, could be a <span> with css)
-- Advantage: No breaking changes for existing articles
-- Disadvantage: 

C) We keep the current module in it's "ideal" state with css and all, but
instead of targeting the old "sortable" class, we use a new class
"mw-tablesorter" or something as the "new" way. That way there is no breaking
of anything. We then also implement a B)-like solution for backwards
compatibility with the old system.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to