Commit graph

38 commits

Author SHA1 Message Date
Leszek Manicki 3cc218391c Include a number in messages showing a number with a unit
Extension should not enforce English order with number being followed
by unit "bytes" in messages related to byte size.
This also splits a message into two messages: one for page size value,
and other for change size. The latter size is signed and value to be
shown is colour-coded HTML element so it is a bit more complicated
case than the page size.

Bug: T141507
Change-Id: I96992eafd4cd8a5aed3fcd5944129bcd83139a16
2016-07-28 15:04:25 +02:00
jenkins-bot 6aea17b627 Merge "Fetch more revisions as the user moves back and forward" 2016-07-28 11:38:53 +00:00
Leszek Manicki dc838bc87d Fetch more revisions as the user moves back and forward
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
2016-07-28 12:58:35 +02:00
Leszek Manicki 633e7421e1 Remove HTML tags from i18n messages
This moves all HTML formatting out of messages and makes all
formatting happen in code. This should make work of translator
easier and the UI of the extension no longer rely on HTML tags
being included or not in i18n messages.

In particular "tooltip" rows are now generated in code, with
only their labels being translatable.

Change-Id: I2af9b9f0e231a7b2827a202d9ac7161b8c95855a
2016-07-27 10:28:37 +02:00
Leszek Manicki c7190cf97d Add support for GENDER to the username label in the tooltip
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
2016-07-26 11:50:59 +02:00
WMDE-Fisch 23348bae74 Fix naming issues in some messages
Change-Id: I36873a72ea28748f5355f9bca32893512fbadd78
2016-07-22 10:03:17 +02:00
Leszek Manicki 133585fe1d Update a link to Meta page on the Technical Wishlist
The Meta page has been moved so the link should also reflect that.
The old Meta page is redirecting to the new one, so this is not
a critical change.

Bug: T140875
Change-Id: Id07c94aa28290b616693ee379451f30c278a75fb
2016-07-20 18:08:47 +02:00
Leszek Manicki f13e71e9cd Fix spelling of RevisionSlider
Use consistently "RevisionSlider" and not "Revision Slider" in messages

Bug: T140875
Change-Id: If5474041198fc65f57cfae1199c9528871536373
2016-07-20 09:46:44 +00:00
addshore b6d1e3962e Add ellipsis to loading message
Bug: T140579
Change-Id: I28add40fb9c9e88a5352a70d07a77521b74ffe03
2016-07-18 11:15:44 +01:00
WMDE-leszek 2964b673d5 Merge "Show a tooltip for the questionmark that opens the help text." 2016-06-30 13:11:46 +00:00
Jakob Warkotsch 80aafa27d9 Show a tooltip for the questionmark that opens the help text.
Bug: T138945
Change-Id: I6c3235bdf228d051c7039f188ff62d1137377bca
2016-06-30 15:07:18 +02:00
Leszek Manicki 946c7656f3 Make username in the toolip a link, another approach
This makes Mediawiki render the link. Unfortunately, it is
not rendering redlinks for not exisiting pages.

Also updates qqq.json i18n file which was missing in
Ifb2f33febbdf0f7c9584941b71596abb47fb8088

Bug: T138944
Change-Id: If336984362358193a6c43144ace2f818dbe0633d
2016-06-30 14:27:16 +02:00
jenkins-bot 7152202b17 Merge "Add own message for minor edit" 2016-06-28 21:09:35 +00:00
WMDE-Fisch cd6c95f387 Replace article by page
Since the compared revisions do not only resemble article
revisions, using page everywhere might be the better option.

Change-Id: Ic215a02970bf39c35d4f516cdf292be95b590c77
2016-06-28 15:11:33 +02:00
WMDE-Fisch 64c84fd573 Add own message for minor edit
Change-Id: I644d200c05e9d3cad6ef14aa48757e8d58e919f0
2016-06-28 13:48:25 +02:00
WMDE-Fisch a2d4b2cbc8 Use username for username label
After changing this several times to address concerns related to
GENDER, decided to use the mediawiki standard here also used
in the core code. For translators a hint was added that GENDER
is not supported here so an appropriate translation should be
chosen by them.

Bug: T136367
Change-Id: Icc2a8e6fc08761367c4ab6bb2a446262f8aa86e6
2016-06-25 16:12:44 +02:00
WMDE-leszek 33cf55a6f4 Merge "Bold tooltip labels and color-coded change size" 2016-06-25 14:07:55 +00:00
WMDE-Fisch 1d436fcfea Bold tooltip labels and color-coded change size
Also introduced language specific number formating. Therefore removed the
'bytes' message. Plural form will be computed in the size messages directly.

Comment label and value were split so the parsed comment can be used
plain without parsing the html again.

Bug: T137183
Change-Id: I12f30cb518e3cc5210528d5b22737dde868a0325
2016-06-24 17:51:36 +02:00
Leszek Manicki cd12add2cb Make a symbol on the "Show help" button translatable
Change-Id: I60ae368f59203f63fb352ec861db5d75d488f8fa
2016-06-24 15:55:03 +02:00
WMDE-Fisch d56ced5a8c Minor helptext improvements
Bug: T136830
Change-Id: I116a969f5db03ad179ace7a8c3d4c25fc92b159e
2016-06-17 12:52:08 +02:00
Leszek Manicki 202e76e78b Add a link to Meta page describing a community wish
Link is added to the first "slide" of the help dialogue.

Change-Id: I6abf375951b11331fe1d67993e7d06a2bb0c8f51
2016-06-17 10:59:48 +02:00
Jakob Warkotsch 5f6b3c8556 Show a help dialog.
- slide show dialog using OOJS UI
 - setting a user option to only show it once
 - translatable content
 - images of the slides

Bug: T136830
Change-Id: Ia820aecb20aa6b239f1a64dd328683639baf399e
2016-06-16 18:05:10 +02:00
Jakob Warkotsch 78a691ca06 Use a gender-neutral label for user.
Gender-specific labels here would be to expensive.

Bug: T136367
Change-Id: Id66790cd5c921ae536cbc5bede71f61d0e55a043
2016-06-06 15:51:29 +02:00
Brian Wolff 39d8d9229a Make files not executable
I know it doesn't matter, but it was kind of bothering me.

Change-Id: Iae9f8b17a3fb5ced362dc2da95e67e20db8af5a5
2016-06-02 13:48:09 +00:00
WMDE-Fisch da43204662 Add change size to tooltip
Bug: T135740

Change-Id: I50833c5b65c821eb885b261a15de2088cd15da6d
2016-06-01 17:05:09 +02:00
Leszek Manicki f9d9a4a4b7 When JavaScript disabled do not show RevisionSlider
As suggested in a comment in T135198, do not show anything above the
diff when JavaScript disabled instead of always putting a message
there.

Change-Id: I1c66fa4a9fa6e90f8318de3a4f656d629000d9ca
2016-05-31 19:49:08 +00:00
Jakob Warkotsch d4dd4c3576 Add labels to revision tooltips.
This adds labels for user, comment and article size to the revision
tooltip as well as the respective messages needed for the labels.

Bug: T135740
Change-Id: Ia65fb0bbbe3eb2405665d784bad157ea059e2d6e
2016-05-26 17:10:29 +02:00
Leszek Manicki 321659c70f Remove "legend" annotations and move scrolling button hint to a tooltip
This also removes a "diff size" axis legend.

Bug: T136098
Change-Id: I9705d6ab37c8d24b9bdb1fddaa895b2863e98043
2016-05-26 15:19:18 +02:00
WMDE-Fisch e126efa953 Add annotation labels to the slider
Bug: T133270
Change-Id: Ibfc16196d35305a56c63d6c23a174712442f31a8
2016-05-22 12:26:41 +01:00
Moriel Schottlender 2440c52bc0 Internationalize the tooltip pieces
Make sure that username and comment fields are bidi-isolated and
add an i18n message to "bytes".

Change-Id: I6a27cd7fdebf775dd86ccfc6084505aad4e931d2
2016-05-20 16:40:26 +02:00
addshore 91759f25bd Show useful error if either rev is not in our range
Bug: T135119
Change-Id: I48f3316f2285b987d1a7e4c4a622eb1291de6357
2016-05-12 16:44:34 +01:00
addshore f9471bcfbc If the slider fails to load then fail nicely!
If something goes wrong with the initial api rquest the
slider would either load in a broken state or say that
it is loading forever.

Now a message will be displayed to the user as well
as the error logged to the console.

Change-Id: Id763f31432feb7bd0e9ecbbeb2dd40f7ca6acaaf
2016-05-12 09:46:39 +01:00
addshore 9bd8eb07a8 Add BetaFeatures support
Bug: T133379
Change-Id: I793665cf41ec5624034910d7aedde689ba0854b2
2016-05-09 09:17:47 +01:00
addshore d9ce49d105 Add basic en description
Change-Id: Iedba41447098108b7d0cae309782500399d0a655
2016-05-04 14:04:29 +01:00
addshore ae1c298550 Add noscript sentence to the placeholder
Change-Id: I4a8c9cb5dc49ca3d023ea91932f0317540c455a5
2016-05-03 13:47:35 +00:00
addshore ba4015ed6b Add localizable placeholder message while loading
Change-Id: I762b03c5af8765b90afee81af750880096db6638
2016-05-03 15:35:39 +02:00
addshore 1edc596fef Fix i18n things
this fixes the entry in the extension.json so that
the i18n files are correctly loaded.

It also changes all i18n codes to all lower case.

Change-Id: Ic64ab7e1356837124eb433df1db6a2b875dc5432
2016-04-27 12:27:49 +01:00
Jakob Warkotsch 23b5b2f112 Initial commit.
This turns the prototype code of the Revision Slider into a MediaWiki
extension.
With this extension enabled the slider should appear on diff pages
already but it won't actually show diffs when adjusting the slider
pointers.

Things that changed so far in the prototype JS code:
- pulled out the rainbow function and made it use Math.floor instead of
 the ~~ binary operator
- pulled out the API request that fetches the revisions into its own
 module
- cleaned up and documented some parts of the code

The code is still very much WIP and JSCS still has a couple of
complaints.

Bug: T132576
Change-Id: I2e22365f3b93a76d5b8d3997242b5fed996c6d78
2016-04-19 16:35:37 +02:00