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

       Web browser: ---
             Bug #: 40812
           Summary: jquery.makeCollapsible: Refactor to use CSS instead of
                    JavaScript to do the initial expansion/collapse
           Product: MediaWiki
           Version: 1.19
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: minor
          Priority: Unprioritized
         Component: JavaScript
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected]
            Blocks: 40792
    Classification: Unclassified
   Mobile Platform: ---


Right now we select all state-collapsed elements when the document is ready and
hide them (without animation, but still, they are hidden *after* they are first
shown, no matter how short that initial show is). The problem with that is that
it is a exponentially slow operation (ON).

By using CSS instead the initial state will be reflected immediately without
any delay. Just like CSS "a { color: green; }" will make all anchor tags green
(even anchor tags parsed after the CSS was parsed), likewise CSS like
".client-js .mw-collapsed { hidden }" will make them hidden without delay.

On top of this, we can build further and also optimise the cost of animations.
Instead of animating with javascript, lets let JavaScript only toggle classes
and the CSS will take care of the state and (if CSS3 is supported) make the
transition animated.

-- 
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