This patch changes the way OOjs UI tooltips are constructed.
Until now we did not use the full potential of the widget.
Some strange behaviour remains and it seems we can not use
'horizontalPosition' here. Therefore the direction is passed
down to the RevisionsListView to center the tooltip manually
and margins are set for the help and arrow tooltips.
Bug: T159428
Change-Id: I0a67340da4d94f2f6b29e507f94fc695b44b71f9
The waitr click on the checkbox seems to be broken or is broken with
intend since the actual OOUI checkbox has an opacity of 0.
Additionally when_visible fails when the element is not present yet.
The the way to go here seems to wait for the element to be there
and then check for visibility.
Also made use of PageObject method for checkboxes, the name selector
and the link element.
Bug: T158074
Change-Id: I2c3d6d963c8bcdc420bfbc57c1c2380bce7ef2f1
This now attaches the revisionslider to the
older and new links that are by default in the
diff.
This means when clicking them the revision slider
will use an ajax call to reload the diff (while moving
its own pointes) rather than reloading the whole page
Change-Id: I11fa92828140f980ca8edee27403a4e2a5f5a6a7
Looks like custom settings used in a test for number separator
transformation added in Icc9bc09675151645055c7e7f706472a15cc81b0f
influenced RevisonSlider's tests resulting in test failure if
that core test was run before RS test.
Relevant RevisionSlider tests now are ignoring any custom value.
Any value before the test is restored after the test run, though,
in case other tests relied on this (which does not seem to be a case).
Bug: T153121
Change-Id: Ida81b93e4d081b6948e760995a92d182ad79fe0f
With the parent of this commit (current master)
Loading the RevisionSlider JS without it expanded increases
the request size by roughly 767KB on first request and 242KB
on subsequent requests.
The large size of the first request is mainly down the to
dependancies of the slider.
This lazy loading patch means the RevisionSlider JS
only causes an increase of 184 KB per request.
If the user has the bar expand by default the main JS will
be loaded straight away (and the lazy JS will not be).
This patch also means that when only the bar is loaded the
pin button to set auto expand will not be shown.
This will be added once the RevsionSlider is loaded.
Bug: T151668
Change-Id: I054a82e9ea2aa89326464632e744497239f7adba
- add Gemfile.lock
- use recent version of gems
- ditch README and link to wiki documentation
- clean-up environments
Change-Id: I76bb1d491911abbc0c0bb4387b436ab3ff2cebc2
- Applied the Given-When-Then rule
- Added separate accessors for disabled arrow elements
Bug: T146276
Change-Id: I0278ef607f96851ed69e7373b952f5d02139cb0c
This will avoid checking pointer data prematurely when
they are still moving and the diff was not reloaded yet.
Change-Id: I3c29a43940e40b7c338a00b3520e5aa6b237ea4a
- Applied the Given-When-Then rule
- Created alias for the "diff-has-loaded" step for readability
- Created higher-level step for loading the revisionslider
- Added assertions where missing
- Added ability to click the upper or lower area of revisionbars
Bug: T146276
Change-Id: Iad5abbb6e73a31afad1e2058b26ece3fbc7ad942
- Applied the Given-When-Then rule
- Created alias of "close-help-dialog" step for readability
Bug: T146276
Change-Id: Icc8aeb8720025bd3c6d6bc811713fac48a9919dd
- Applied the Given-When-Then rule to scenarios
- Added alias for one step for better readability of scenarios
Bug: T146276
Change-Id: I08aabda113d6ad9f1bbf06161484143549b13a7c
First I jumped on replacing both jscs and jshint with eslint but
it might be premature decision. Although linting with eslint
is possible (like in there is wikimedia config for eslint)
it is still not clear should it
But in case the change happens we will be ready.
Apart from config stuff this changes few bits spotted by eslint:
improves some indentation, removes weird spaces, completes some
doc blocks, changes IIFE forms in tests. These changes do not
seem controversial.
Change-Id: I9f8bf0f5745da8e662685f4cd879ea4baa609c01
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 it squeezes a button on top
of another button (100% wide expand/collapse button).
This also adjusts styles of ToggleButtonWidget so
the button looks more like a frameless button, although
it is created as a framed one (to have inverted behaviour
when button is in its "on" state).
The button only gets visible when Resource Loader finishes
loading JS and CSS to avoid button jumping around the top
of slider window before "right" styles are applied.
Bug: T142196
Change-Id: Id561485344cba9b136666fe31b086151467de19e
* The jQuery for appending the 'darkness' mask was broken (not nesting)
* Use a more semantic name
* Simplify styling to just set opacity to 50%.
* Remove browser compatibility hacks as all MediaWiki's JS
supported browsers also support CSS opacity.
Change-Id: Id893a75bb90a4e6e2e8a26ebc3863de565d8a4ee
Localized format of date containing month name, day, year and time
is used instead of format enforcing the order of time and date,
and use of short month name.
Bug: T141167
Change-Id: I39b2844e777beb986cefb3097d52d481bb038a63
Instead of loading RevisionSlider only add a little button
to expand RevisionSlider on top of the diff page.
This makes RevisionSlider only steal a bit of space over the
diff, and only inserts quite a big slider to users that want
to have it visible for the particular diff.
API calls are only made once RevisionSlider has been expanded.
This is re-submit of b0f229d75f
that was reverted in I26427faaa00b38c2aa1377a66224c9062dcca302.
Bug: T141871
Change-Id: I879de5774b2cce7b908e73cbbe869fd48d6afa23
Instead of loading RevisionSlider only add a little button
to expand RevisionSlider on top of the diff page.
This makes RevisionSlider only steal a bit of space over the
diff, and only inserts quite a big slider to users that want
to have it visible for the particular diff.
API calls are only made once RevisionSlider has been expanded.
Bug: T141871
Change-Id: Ib312f6225b85b9ebdf4ac5d16e254a57d5cf6411
This changes the previous behaviour of fetching always up to
500 most recent revisions.
Now the extensions fetches N revisions including the newer
revision selected to diff as the most recent revision.
N is number of revisions that would fit in the current
window when rendered as bars.
When user is close to either "end" of the slider, extensions
fetches another batch of up to N older or newer revisions,
as long as user does not reach the oldest or the newest
revision of the page.
Among others, this removes the limitations of the previous
approach: showing only 500 revisions, and failing to show
anything when any of selected revisions was older than
500 recent revisions.
This change also simplifies usage of Api class.
Bug: T135005
Change-Id: Ib3f4a6ac57ff17008f9d8784c4716bd294443096
After fetching a batch of revision data, user names are extracted
and another API query is made to get gender preferences for users.
This change also moves a code responsible for MediaWiki API calls
to its own class.
Bug: T136367
Change-Id: Id11fe14e9ca37829141ae92b13b51f10f992eb96
In particular, link to a Meta page on the related community wish
should open in the new window/tab.
Bug: T140875
Change-Id: Ib0d7bf679c9ac8a3ee2fdf2289fc53cfdfdaa671