Commit graph

19 commits

Author SHA1 Message Date
James D. Forrester
d666212a47 jsduck: Explcitly name library files so we don't pull in CSS files
Change-Id: I8ee7c8a609543237f8280c190a9806cf5079de96
2017-08-01 13:57:36 -07:00
Roan Kattouw
1cf0acaa62 Enable jsduck for resources/src/mediawiki.rcfilters and make pass
Change-Id: I2a29689e2697108a5c5206cc61b36b5fb838182f
2017-07-27 18:16:47 -07:00
Timo Tijhof
f53fd6fd47 Remove unused 'jquery.arrowSteps' (deprecated in 1.28)
Was only used by UploadWizard, and no-where else in Wikimedia Git.
UploadWizard has its own copy as of last year. (T144974)

Change-Id: I3d426f67f8ba061d10434469f261cb725bd672d6
2017-03-17 17:13:26 -07:00
Ed Sanders
edf4dfe756 Add exceptions in mw.Title where mb_strtoupper doesn't match String.toUpperCase
Bug: T147646
Bug: T141723
Change-Id: Ic7a3d0cebbf4aec507db195ba8f587cecc1992aa
2016-11-23 18:45:44 +01:00
Bartosz Dziewoński
e2ba8f7591 Revert "Remove jquery.arrowSteps module"
It should probably be deprecated first after all.

This reverts commit 6fba9a7dc6.

Bug: T144974
Change-Id: I830fbfc2e453be6b18d43775a8aa1a366690907c
2016-09-15 16:28:42 +00:00
Paladox
6fba9a7dc6 Remove jquery.arrowSteps module
It was unused by any other extension
https://github.com/search?q=user%3Awikimedia+jquery.arrowSteps&ref=searchresults&type=Code&utf8=%E2%9C%93

and only used for UploadWizard so it was merged into there with
I054674c7025ad37a8592ca82ce7ce0efd41d393f

Depends-On: I054674c7025ad37a8592ca82ce7ce0efd41d393f

Bug: T144974
Change-Id: Id9b6af1f1774bc33ceb024126030eefdc43beba0
2016-09-13 15:32:19 +00:00
Timo Tijhof
debe691b63 jsduck: Sort list of globals in jsduck.json
Change-Id: Ifb920c055740575edcda0b4f460cc8c5b377ba87
2016-05-20 03:34:44 +00:00
Timo Tijhof
a40190f5a5 mw.loader: Optimise hot code paths in addEmbeddedCSS()
addEmbeddedCSS() is a big part of the hot code path that moves a module from
state "loaded" to "ready". Especially on repeat views (where most loads
are cache hits from local storage), this is the main thing that JS spends time
on before running scripts (which must wait for the styles to apply first).

* newStyleTag: Avoid use of jQuery.
  Before
  - jQuery()
    - jQuery#init
  - jQuery#before
    - jQuery#domManip, jQuery#buildFragment, jQuery#inArray
    - Node#insertBefore
  - Node#appendChild
  After
  - Node#insertBefore
  - Node#appendChild

* getMarker: Store raw Node instead of jQuery object. Makes it easy for other
  code to avoid jQuery. And for those that don't, creating a jQuery object is cheap.
  Also use querySelector directly since it's ensured by our feature test.
  The only cases jQuery/Sizzle accounts with querySelector is IE8 (already excluded
  by our feature test), and Opera 12 (in an edge case that doesn't apply to this
  selector).

  Before
  - jQuery
    - jQuery#init
  - jQuery#find
    - Sizzle
    - querySelectorAll
  - jQuery#pushStack
  After
  - querySelector

* addEmbeddedCSS: This was needlessly calling the fairly slow .data() method for
  all style tags in all browsers. It should've been guarded by IE<=9 if-statement.
  The consumer of this data property already had that check. The setter did not.

  Before:
  - getMarker
    - ..
  - newStyleTag
    - ..
  - jQuery#data
    - jQuery#each, jQuery#data, internalData, ..
  - fireCallbacks
    - ..
  After
  - getMarker
  - newStyleTag
  - fireCallbacks
    - ..

Change-Id: Ie5b5195d337b5d88f0c2ca69d15b13a4fb9d87e2
2016-05-19 19:03:22 +01:00
Mark Holmquist
7b5194988e Add Blob to accepted types for uploads
From https://developer.mozilla.org/en-US/docs/Web/API/File :

A File object is specific kind of a Blob, and can be used in any
context that a Blob can. In particular, FileReader, URL.createObjectURL(),
createImageBitmap(), and XMLHttpRequest.send() accept both Blobs and Files.

Change-Id: I171f884fc4ada6180e5c605a44b27044fc03f26e
2016-02-02 21:09:22 +01:00
Timo Tijhof
46a01c422b Restructure /resources/src/mediawiki.page/
Follows-up 0bfdd927.

Change-Id: I65b9343ea002c332323ededf4e328e4463faf698
2015-09-28 20:18:17 -07:00
Timo Tijhof
0bfdd927be Restructure /resources/src/mediawiki.api/
Re-do Ifbb0f6751 in a smaller scope as a first step.

Change-Id: I346f3587d3bfeaf0fe3467cd1f4dcf2d134ecc08
2015-09-28 20:09:21 -07:00
Mark Holmquist
c642d2c1a1 Add frontend API for uploading via iframe
Coming next: File API support, stash support

Bug: T64513
Change-Id: I06fa61e7155efe8126ba12cda9376c37f1c45e8e
2015-07-13 17:40:50 +00:00
James D. Forrester
9069b9ce85 Follow-up 727454f: Add mediawiki.widgets to jsduck
Change-Id: I1715c5bbca8735de8c391dee4e2cec8269414acf
2015-06-01 16:33:21 -07:00
jenkins-bot
b2f4fd38db Merge "Add pluggable talk page poster and use it for mediawiki.feedback" 2015-04-06 22:14:11 +00:00
Matthew Flaschen
061b987f1c Add pluggable talk page poster and use it for mediawiki.feedback
The core implementation will only support wikitext.
Flow will add its own implementation, and it can be used for any talk
page system identifiable by content model.

Bug: T91805
Change-Id: Ic69acafb24aa737536fe3a074e1958690732f0a7
2015-04-06 14:10:23 -07:00
Timo Tijhof
cf3e0e2efb jquery.suggestions: Convert documentation to JSDuck format
Change-Id: I39aba7f3f0c9d397f26934446e3a5ef686d84d86
2015-04-03 21:48:28 +01:00
Željko Filipin
2cc78fd8f8 Fixed Style/FileName RuboCop offense
$ bundle exec rubocop
Inspecting 25 files
.C.......................

Offenses:

maintenance/jsduck/CustomTags.rb:1:1: C: Use snake_case for source file
names.
^

25 files inspected, 1 offense detected

Bug: T91485
Change-Id: I91b43362f265a05284495727dab5465e1c4f0542
2015-03-18 18:45:54 +01:00
James D. Forrester
97c4e93eef resources: Move to library version of jquery.client
The jQuery Client library is no longer mastered in MediaWiki, and is
instead a proper, published library, which is now tagged as v1.0.0.

Change-Id: Idd19d738b392a5f742fef6f98c885e8c391a5cbf
2015-03-11 16:47:16 -07:00
Timo Tijhof
3bbd27aa49 Rename JSDuck config to standard 'jsduck'
* Move configuration to /jsduck.json per standard. This way
  it can be run as plain '$ jsduck' without needing a maintenance
  script or custom Jenkins job. Similar to JSHint, JSCS, Grunt,
  and Gem etc.

* Move --processes=0 from maintenace script into config file.
  This should've been in the config file all along and serves as
  workaround for https://github.com/senchalabs/jsduck/issues/525.

* Use grunt-contrib-copy instead of a symlink for resources.
  For local development a symlink works fine, but for publishing
  from Jenkins to doc.wikimedia.org the /docs/js/ directory needs
  to be standalone. This was previously done with a manual post-build
  step that added an additional rsync, but this logic should be
  in the repository so that the doc entry point can be simplified
  and standardised to 'npm run-script doc' for all projects.

Change-Id: Iaaaac50ee78dd9ff8f24f1ef3a3685ad51cf33b2
2015-03-09 18:10:00 +00:00