Commit graph

451 commits

Author SHA1 Message Date
Mortal303 9dc6fa7fb2 Replace html paragraph tags in i18n
Removed the HTML in the tutorial message and used linebreaks(\n\n) in i18n/en.json file,
replaced .html( mw.message( '…' ).…() ) with .text( mw.msg( '…' ) ) in modules/ext.RevisionSlider.HelpDialog.js
and added 'white-space: pre-wrap' in class '.mw-revslider-column-text' in file modules/ext.RevisionSlider.less
without affecting the front end of the page.

Bug: T267128
Change-Id: Iaf8b1819ca3139c18fb65cfca1c0b2120abb10f4
2022-03-21 15:49:07 +05:30
WMDE-Fisch 1fa153aeab Fix issues to prepare for lint update
The new mw eslint config comes with node 12 and the change will be
quite big due to the lock file. I wanted to keep the diff of actual
code changes seperate.

- Applied all code style recommendations
- Removed one test that's not giving any value
- Changed regex .match to .test for performance and convinience

Change-Id: I578be8c6460c7a4d1220354c028a9bfd9bb86d13
2022-01-13 13:59:53 +01:00
Thiemo Kreuz 9aca3a2593 Merge ….RevisionList ResourceLoader module away
It's never used in another context but together with the
….Slider module.

Motivated by the confusion about the two types of require()
introduced in Idf1cc79.

Bug: T233279
Change-Id: I922d7ab56fd3ce80bc901f1a5d7174df6fe6756d
2021-12-20 12:13:09 +01:00
jenkins-bot d8c013e323 Merge "Merge ….HelpDialog ResourceLoader module away" 2021-12-17 13:48:22 +00:00
jenkins-bot fd8b96b791 Merge "Merge ….Pointer ResourceLoader module away" 2021-12-17 13:48:20 +00:00
Thiemo Kreuz 1407e0a90d Merge ….HelpDialog ResourceLoader module away
It's never used in another context but together with the
….Slider module as well as the ….init module. The ….init
module continues to require the ….Slider module, so all
dependencies are still met.

Motivated by the confusion about the two types of require()
introduced in Idf1cc79.

Bug: T233279
Change-Id: I4b4ef69f3074d57f884763c092a515ce976daaef
2021-12-16 16:45:41 +01:00
Thiemo Kreuz 319061c92a Merge ….Pointer ResourceLoader module away
It's never used in another context but together with the
….Slider module.

Motivated by the confusion about the two types of require()
introduced in Idf1cc79.

Bug: T233279
Change-Id: I7c98a41051e6d83ab3524cb14a709002feec2d78
2021-12-16 16:39:07 +01:00
Ed Sanders dcf19784eb Define documentable types in eslintrc instead of inline
Change-Id: I20e805839a13697ffea8d4a2f92b1c3a4b023175
2021-10-17 15:35:14 +01:00
Ed Sanders 64effa6e42 Move var declarations inline
Change-Id: If1256b01f6ac8237c79b5ba62f20ad65f1dc7691
2021-10-07 14:55:44 +01:00
Thiemo Kreuz a2bd859b29 Simplify/reformat code pieces with a lot of duplication
Change-Id: I7f933bb0d5c82858e5ab1831f9021f67e373ff69
2021-07-01 09:16:34 +02:00
Thiemo Kreuz c8ddf3c9b9 Fix jQuery.offset() calculation possibly failing
It turns out the jQuery documentation is incomplete:

  $( '<a>' ).offset() → { top: 0, left: 0 }
  $( '<a>' ).parent().offset() → undefined

The difference is that the jQuery set in the second example is
empty.

Bug: T282067
Change-Id: I7c19162f1a39bd529e0a74a6cc0c1ac987f33657
2021-06-21 15:35:21 +02:00
Volker E e39dc66484 build: Change 'stylelint' config rule to '*disallowed-list'
Available since 'stylelint-config-wikimedia' v0.10.3.

Bug: T279431
Change-Id: Ia537ebaa27935887f011f431647040f4a2357fa5
2021-04-28 02:52:08 -07:00
Volker E b0b3dcbed0 styles: Remove obsolete -moz- vendor prefixed rules
Bug: T278670
Change-Id: I99d91408feb7a87162522a1207dc7469d5bdd5f4
2021-03-29 02:51:54 -07:00
jenkins-bot 25c1078223 Merge "Migrate Slider module to packageFiles" 2020-11-19 13:59:52 +00:00
jenkins-bot 9f41794d86 Merge "Migrate RevisionList to packageFiles" 2020-11-19 13:57:20 +00:00
Adam Wight 8132e43a20 Migrate Slider module to packageFiles
Change-Id: Idf1cc799ab37ec8f49b3a28d161b6cd53090f707
2020-11-19 09:13:45 +00:00
Adam Wight ebd9985afc Migrate RevisionList to packageFiles
Change-Id: I3299d3a4bc66a3b85d0d0f7d8a49edbf8f6329c3
2020-11-19 08:54:10 +00:00
Thiemo Kreuz 6235d4b075 Add some missing @class type hints
Change-Id: I2395e96667d4cd2847fedd5697cff665d212192e
2020-11-18 11:51:22 +01:00
Thiemo Kreuz 4ac1ff57f1 Remove closure wrappers from all JavaScript code
These are not needed any more, because the code runs in a
seperate scope anyway.

Change-Id: I939a06102f194a0c98021accb2f62be73dd0562f
2020-11-18 11:16:04 +01:00
jenkins-bot df52b15efb Merge "Get rid of all var … = function () {} declarations" 2020-11-16 15:15:32 +00:00
Thiemo Kreuz c57fe0f2b6 Get rid of all var … = function () {} declarations
… and replace them with more trivial `function …() {}`. I
believe this does not make any difference. But I feel this
makes the code a little more straightforward.

The motivation for this patch is because a few other patches
change some of these function declarations, leaving a (in my
opinion) confusing mixture of styles behind.

Change-Id: Ib8928c4176a963afcf1fee1c785dd7bdc86c9706
2020-11-12 19:23:40 +00:00
WMDE-Fisch 9386cb6f65 Improve some JSDoc blocks
- mostly fine graining Event objects referenced
- removing one obsolete parameter doc

Change-Id: I1270c4b8100da647ca0739f7f3571bd48d484137
2020-11-12 15:48:27 +01:00
gopavasanth 748e4970f0 Fixed text wrapping to avoid word break in tooltip
Bug: T208318
Change-Id: Ib6ab38fdf99a14be237f3b611df24a9854781572
2020-11-03 16:57:31 +05:30
Adam Wight ddcd65f4de Migrate Pointer to packageFiles
Change-Id: I8e06c9eeb47688741a95bca8f996b2148b03028c
2020-09-21 18:14:07 +00:00
jenkins-bot 1e13c311e8 Merge "Migrate HelpDialog to packageFiles" 2020-09-21 07:21:33 +00:00
Ed Sanders 49d6f1ef8f build: Update eslint-config-wikimedia to 0.17.0
Fix instances of variable shadowing.

Change-Id: I9f8d4dcab8cb400d04600e7bb543ddda2705d1df
2020-09-11 16:28:52 +01:00
gopavasanth 2f14374d0a Fixed vertical alignment of tooltips
Removed padding for the tooltips of Slider left, right arrows and
help button.

Bug: T255752
Change-Id: Iec9d5bc765f627291c9b9824dbd98877d9ee496d
2020-06-19 23:47:05 +05:30
Ed Sanders eaa7966710 build: Update eslint-config-wikimedia to 0.16.1
Mostly documentation style fixes

Change-Id: I75262aead377f7f41931de44c5208b7b7d06930d
2020-06-16 15:13:36 +01:00
jenkins-bot 1d43c464ac Merge "Do not show entries for hidden tags" 2020-04-13 14:14:25 +00:00
jenkins-bot e8d659495b Merge "Use tag displaynames when fetching additional revisions" 2020-04-13 14:14:05 +00:00
Adam Wight c9958c5edd Migrate HelpDialog to packageFiles
FIXME: Reusing HelpDialog as a module entrypoint creates a circular
reference.  It's harmless because the dependencies are added at
different times, but also easy to refactor away.

Change-Id: I3608a78baddf2376cc9eb4524625f4911c130c06
2020-04-05 01:50:48 +02:00
Adam Wight d369701709 Migrate Settings module to packageFiles
Change-Id: I984404dd216fff469d7891f4f69a92d83d19d1c4
2020-04-05 01:37:15 +02:00
Bartosz Dziewoński 0699e09dd8 Do not show entries for hidden tags
Bug: T249266
Change-Id: I7e83523c5e8f088efaf95acb339973e0f805ff48
2020-04-02 21:00:02 +00:00
Bartosz Dziewoński 36c51562f6 Use tag displaynames when fetching additional revisions
They were previously only used for the initial fetch.

Bug: T249266
Change-Id: Iecf0fcf6bc0a691b0e3e5d13adbe75abbecb54da
2020-04-02 20:59:48 +00:00
jenkins-bot 4124a82ebf Merge "Improve discoverability of JS code with @class tags" 2020-01-24 18:01:43 +00:00
jenkins-bot 659b492cb8 Merge "Fix misplaced pin" 2020-01-24 17:58:37 +00:00
Thiemo Kreuz 7f38c9c579 Improve discoverability of JS code with @class tags
In my PHPStorm IDE, this makes it possible to follow all methods and
properties in these classes, even these that are later defined.
Otherwise only the empty stub of each class is found.

This might be different in other IDEs.

Basically: PHPStorm does not understand the meaning of the $.extend()
syntax from jQuery without these hints.

Change-Id: I4aa76db183122f6669dc72561441f46f0056d793
2020-01-24 17:21:23 +01:00
WMDE-Fisch 0435e0b5d2 Fix misplaced pin
Removed some hacks that messed with the position and size of the icon.

Bug: T243593
Change-Id: Iaaa4027ec8c094cc8d103615aad646c3331a3ba3
2020-01-24 13:30:03 +01:00
WMDE-Fisch f121c62990 Fix misplaced arrow icon on slider buttons
Seems like OOUI changes lead to this hack not beeing used anymore.

Bug: T243592
Change-Id: Ib12f5eef69e57abc78c89680144505b4a92b2145
2020-01-24 13:16:42 +01:00
Ed Sanders 28bc463836 build: Update linters
Change-Id: Ia316dd09b6d6b7452610ff2b8816a146a3bb48a4
2019-12-11 13:42:51 +00:00
WMDE-Fisch a4df17a922 build: Upgrade stylelint-config-wikimedia from 0.5.0 to 0.6.0 and make pass
Change-Id: I1db434584d6927cf0322fdbd6253ebb1846537c0
2019-07-03 12:14:05 +02:00
WMDE-Fisch 7c47e6e981 Apply user highlighting for all revisions in DOM
This only solves part of the issue. Highlighting is applied for more
elements since they are retrieved from the DOM. The problem still exists
since highlighting depends on the RevisionList chunk on which is it applied.

To fix the issue completely highlighing should be managed somehow globally
on the global list.

Bug: T207781
Change-Id: Idda930f3d0dd64e767c68dade2ca8759bc636898
2019-05-19 11:27:59 +02:00
WMDE-Fisch 9e73c7d2c1 Fix re-highlighting of revisions
This was broken for obvious reasons. Also adding a test.

Change-Id: Ib6e8988884ff84472928758d4112574e17fa48be
2019-04-25 11:15:14 +02:00
WMDE-Fisch 98c33c4731 Extract reapplication of saved filter state
Change-Id: If770e0cb52034a5f52bc8bb3639c9dccdf64b683
2019-04-12 19:15:18 +00:00
WMDE-Fisch d4a3ec243e Use switch statement for filter events
Change-Id: I0f564e33744d3806682534267c4b922edd5e9b3c
2019-04-12 19:15:12 +00:00
WMDE-Fisch bd38ccaf98 Early exit filter events
Change-Id: I72fd4a1496f6c0247a9166ba54ce3de2918bc310
2019-04-12 19:15:05 +00:00
WMDE-Fisch 32cf219c4e Extract code that resets/removes highlighting
The next iterration on avoiding code duplication. I
still stuggle a bit merging these methods in a sane
way.

Change-Id: I8d95acc06da7f83a6133e55becabdf03b26a97af
2019-04-12 19:13:20 +00:00
WMDE-Fisch a49cb0c466 General code reduction in the highlight event handlers
- make use of toggelCSS()
- use more general jQuery selectors ro reset the line and bubble highlight
- get rid of ~= when selecting revision ids

Change-Id: I123e263bb379107a561fe8a2ffed476da9032b88
2019-04-12 19:12:44 +00:00
WMDE-Fisch f4c64b744e Put event setup for user line highlighting in own method
This is mainly a copy of what's done for the tag lines to set the events.
In the next steps I'll try to avoid code duplication here be extracting
common code.

Change-Id: I29df109de30c538cc206d445abff8464baf45378
2019-04-12 19:09:50 +00:00
jenkins-bot 6f667e6143 Merge "Add node selenium tests for revision highlight feature" 2019-04-11 16:29:23 +00:00