WIP Add button to have revision slider expanded automatically

Authored by WMDE-leszek on Aug 12 2016, 7:35 AM.

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.


WIP Add button to have revision slider expanded automatically

This adds a button which allows a user to make revision slider
automatically expand on each diff page (disabled by default).
User's choice is stored as a hidden user preference.

This is a bit hacky as, among other things:

  • this squeezes a button on top of another button (100% wide expand/collapse button)
  • "pin" button is actually faked ToggleButtonWidget which does not have its PHP counterpart yet
  • some CSS is being added both in PHP code and then in JS code which is redundant; The "pin" button widget uses a custom "icon element", which, once generated in PHP, gets cleared by JavaScript and thus must be re-added
  • "pin" icon SVG could be optimized even further but some part gets lost when doing full optimization with svgo. This should be investigated and the icon possibly changed.
  • it might be also worth considering if the icon should be add to OO's icon set.


  • browser tests for all pin/expand combinations

Bug: T142196
Change-Id: Id561485344cba9b136666fe31b086151467de19e