| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
jsduck is preventing us from using ES6 syntax and has not
been supported for some time. It is also difficult to setup
locally due its use of Ruby.
Introduce jsdoc and remove jsduck per T138401#9335987
Link to static copy of jsduck explaining the state
This does the bare minimum - the docs are built to the folder
docs/js/index.html and only one module is ported over to allow
us to provide feedback on the end result.
Bug: T138401
Change-Id: I1a351ac5aec731bb79a877023ac10988ec3ec786
|
|
|
|
|
| |
Bug: T348080
Change-Id: I570abc93ffc71bb9a6fb3cc2c55da94946de4c55
|
|
|
|
|
| |
Bug: T335723
Change-Id: I530bae259291949e0f0853bb8bd8264acd131ff4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These externals are not used in this repo.
Detected by:
jq -r '.["--external"]' jsduck.json |
tr ',' '\n' |
while read external
do
git grep -q "[{|]$external[|}]" ||
echo "{$external} not found."
done
Change-Id: Ib1668c9c68d47fcac190af8cad4f174e49a021ea
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove not existing files or directories:
* resources/src/es6-polyfills
* resources/src/jquery/jquery.mw-jump.js
* resources/src/mediawiki.base/legacy.wikibits.js
* resources/src/mediawiki.legacy
Detected via:
$ jq -r '.["--exclude"][]' jsduck.json | xargs ls -ld
Use alphabetical order for "--external", "--exclude" and "--".
Change-Id: I909c49870a911c07c599df821350cdb6949200e7
|
|
|
|
|
|
|
|
|
|
|
|
| |
Moves the previously created "mediawiki.page.teleportTarget" module
into "mediawiki.page.ready" based on similarity of concerns.
Also updates the dependencies for the Vue module (which needs
to require() the element created here in order to provide it
automatically to all on-wiki Vue apps).
Bug: T343476
Change-Id: Id106a36f8ead7424c2ad2881ad79586e48f7bf1d
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Introduces a new ResourceLoader module, "mediawiki.page.teleportTarget".
This script creates a new empty div with an ID and appends it to
the end of the document body. An accompanying stylesheet has also
been added that sets this element's z-index to that of the
@z-index-overlay token. Skins can override this z-index value if
necessary.
This is done in order to provide a stable target that client-side
UI code can use if a dialog or similar modal element needs to be
teleported without causing collisions with other elements on the page.
This module has been added as a dependency of the MW Vue module.
The custom Vue.createMWApp method now provides the appended DOM
element under the "CdxTeleportTarget" key so that components like
Codex Dialog will use it automatically.
MW Skins should consider applying skinStyles to this element
to ensure that it's styles match those of the page body text elements.
Bug: T343476
Change-Id: Ia79b76c0e73890dd18477e5c3ea307d753cedb3a
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On repeat page views, where code is executed from mw.loader.store,
profiling showed jank warnings on both Chromium and Firefox when large
amounts of code is compiled with asyncEval(). Idle callbacks are
executed in the main thread so need to return promptly.
Also, Firefox showed a surprising amount of overhead from the
Array.join() call, 8ms, or 16% of the asyncEval() call. Concatenation
seems to be unjustified since both browsers are able to efficiently
compile tiny fragments of code.
So, execute each module separately. If the browser indicates that the
idle deadline has expired, defer remaining execution.
This should also make the linked task easier.
Exception handling is more isolated, each module having its own
try/catch.
Bug: T343407
Change-Id: Ib33c601cd98f2db6e946486d66885cfb803c3219
|
|
|
|
|
|
|
|
|
| |
This provides a replacement for the only feature of the mw.Uri library
that isn't handled by the standard URL class, allowing us to migrate
away from it entirely in several extensions. The code and tests are
adapted from mw.Uri.
Change-Id: Ia95a27c7d7ebc9e4779f82598152145f02993b29
|
|
|
|
|
|
|
|
|
| |
HTMLElement does not have the `sheet` property of HTMLStyleElement.
Issue originally spotted by AnYiEE in
https://github.com/wikimedia-gadgets/types-mediawiki/pull/21
Change-Id: I1c83e753be0204e8b18fc466dd23091a8d5df34a
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The UA sniffs that overrode the feature tests are no longer needed.
* MSIE 10: Fine, rejected by feature checks.
* UC Mini "Speed Mode": Redundant, the version that this sniff
matched is pre-ES6. Current versions of UC Mini don't appear to
support enabling "Speed Mode" on random websites nor does it offer
it for Wikipedia specifically.
Details at https://phabricator.wikimedia.org/T178356#8740573.
* Google Web Light: Redundant, shutdown as of 2022.
Any references or extensions that still reach the proxy, get
redirected to our online URLs
https://googleweblight.com/?lite_url=https://en.m.wikipedia.org/wiki/Banana
https://phabricator.wikimedia.org/T152602
https://en.wikipedia.org/wiki/Google_Web_Light
* MeeGo: Redundant, discontinued and presumed rejected.
Either way, unsupported.
* Opera Mini: Fine, rejected by checks.
Details at https://phabricator.wikimedia.org/T178356#8740573.
* Ovi Browser: Redundant, discontinued and presumed rejected.
Either way, unsupported.
* Google Glass: Improve UX (since 2013, T58008).
* NetFront: Redundant. Old versions are presumed rejected.
Current versions are Chromium-based and presumed fine.
The exclusion was not UX based, but due to jQuery explicitly not
supporting it in 2013. This is no longer the case, so we can let
the feature test lead the way here.
* PlayStation: Redundant, same story as NetFront.
The version that matched the sniff is presumed rejected.
Current versions probably fine, but even not, don't match
our sniff so are already enabled today.
Bug: T178356
Change-Id: Ib6263ce3ffd11af5e501de8857f3e48a248c6210
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As part of I0738244e0609b23 (51155b0), I missed that the "once" behaviour
was not limited to importScriptURI but applied to importScript also.
This commit restores that.
In order to balance out the added bytes, optimise the code further
by re-using addLink/addScript from mw.loader.
With mw-docker locally, fresh Main_Page load, measuring total JS
transfer size:
* Before: 97.77KB
* After: 97.71KB
Change-Id: I0516527d5cc05ac41d20ab0891b7bdd1052fe172
|
|
|
|
|
| |
Bug: T309111
Change-Id: I149e36098189893a8bfa80c448a27210e11274bc
|
|
|
|
|
| |
Bug: T299148
Change-Id: I414698b1c8251a5e873a2b6385b61051f32f54c0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Upgrade Vue to @vue/compat version 3.2.23
* Migrate Vue.createMwApp to Vue 3 API
* Add backwards-compatible wrapper emulating Vue 2 behavior for
new Vue( { el: '#foo', ... } ) and
new Vue( ... ).$mount( '#foo' )
* Make @vue/composition-api an alias for vue, for b/c
* Convert resources/src/vue/ to ES6
* Ignore resource/src/vue/ for jsduck, since it doesn't support ES6
* VueComponentParser: Remove check for only one root node
Bug: T251974
Co-Authored-By: Lucas Werkmeister <lucas.werkmeister@wikimedia.de>
Depends-On: Ica0c0d0d6247383796d39199e50a9aff917f5b53
Change-Id: Ibd618765f962f57984994604c61b1aff9e6a778d
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds the MDN polyfills for Array.prototype.find, findIndex, and
includes to core, along with a skip function. Polyfills live a
single "es6-polyfills" module in case additional similar polyfills
need to be introduced in the future.
Introducing these in core will allow certain extensions
to stop shipping local copies.
Bug: T264135
Change-Id: I37953f6fcad693a8d25e1a19764abd55bbbbb242
|
|
|
|
| |
Change-Id: I5e3687be2b197134578126e1b890ee37dbc1bc1b
|
|
|
|
|
|
|
|
|
|
|
|
| |
Release notes:
https://gerrit.wikimedia.org/g/oojs/ui/+/v0.39.2/History.md
Bug: T214477
Bug: T254800
Bug: T255162
Bug: T255316
Change-Id: I6de36ca2ba279dc11d18bdff3c5d138444a13361
Depends-On: I21e2ac16e1a963042a6d5d0513f7f041332793da
|
|
|
|
| |
Change-Id: I1ca2bf9d31b20317e8f8c5992ebccc4b0a05451a
|
|
|
|
|
|
|
|
| |
When watching a page, a toast appears with a message to confirm it has been
watched/unwatched successfully. This replaces the toast with a OOUI popup.
Bug: T249259
Change-Id: Ib1b8e31ce8e6fe271cb0d6e5fbaf80bc65360da1
|
|
|
|
|
|
|
|
|
|
|
| |
I split this out of it back in 2011 with 83a7822df7bd0c.
I don't remember why. I think it had something to do with
Special:JavaScriptTest where I wanted to do something with colors.
Having those functions is useful in theory, but that doesn't require
its own module.
Change-Id: I8815d32c7072da83ddb9fbf955534d1f954692ba
|
|
|
|
| |
Change-Id: I2eaf300015b2954479f5d1d0711ec934a9aa294b
|
|
|
|
|
|
|
| |
Still executed under the same conditional, but no longer exposed
as its own public module bundle.
Change-Id: Ifba3a73b184ce02eeeeb2ccce6d4aece732dea13
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Release notes:
https://phabricator.wikimedia.org/diffusion/GOJU/browse/master/History.md;v0.31.3
Bug: T193731
Bug: T194523
Bug: T217381
Bug: T218408
Bug: T219033
Bug: T219826
Depends-On: I94d1fd4398ec92c2ec63ebf1e57b3b4fc72bd76a
Change-Id: Ibb276860815fc29beaea131401bb5dfeca5159d6
|
|
|
|
|
|
| |
No change to the module names yet.
Change-Id: Ica33520b0128bd56dc06c8951bdc6932fce041fe
|
|
|
|
|
|
|
|
|
|
|
|
| |
Was originally created for Vector, which was originally part
of MediaWiki core. It hasn't been used for a while, and Vector
is in its own repository now.
Found 0 uses of this anywhere in Wikimedia Git, nor elsewhere
indexed by MediaWiki Codesearch.
Bug: T202154
Change-Id: I72ab5ad7f25be87b2f6d2f5f41a672b6a48b8005
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Embed the essential files to define mw.loader directly as part of
the startup module.
* This means the internal 'mediawiki' module no longer exists.
This is safe to remove because:
1) While registered server-side for loading from startup.js, a PHPUnit
structure test disallowed being specified as a dependency.
2) Anything that attempted to load it client-side failed because the
module was marked in the registry as 'raw', thereby excluding it
from the data sent to the client-side. As such, it was seen as an
unknown module that the client refused to fetch from the server.
* Deprecate getStartupModules() and getLegacyModules().
These are no longer needed. There are no known callers anywhere in
Wikimedia Git or elsewhere indexed by Codesearch, but easy enough
to leave as no-op for one release.
* Remove ResourceLoaderRawFileModule class.
No longer needed. Was created as a hack specifically for the 'mediawiki'
module so that it would not leak global variables in debug mode.
It has no usage anywhere in Wikimedia Git, nor elsewhere in Codesearch.
Remove without deprecation given this was meant to be a 'private' class.
* Introduce (private) getBaseModules(). Previously, this list only existed
locally in getStartupModulesUrl() by merging getStartupModules() and
getLegacyModules(). This value was factored out into its own method.
* Make getStartupModulesUrl() private and rename to getBaseModulesUrl().
It is only used internally to export the 'baseModulesUri' value.
Its name was already confusing before, but it would've been even more
confusing now given it doesn't even call getStartupModules() any more.
Bug: T192623
Change-Id: I14ba282d7b65e99ca54b7c2f77ba6e1adaddd11c
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was added in (r99923; 4d8c7e96ed1f) while reviewing the
'gadget-preferences' branch in SVN of the Gadgets extension during
development of MediaWiki 1.18, intended for use in a color picker
on Special:Gadgets as part of an experimental feature that was
never completed (r94051).
The module has no usage anywhere in Wikimedia Git, nor in any
third-party hosted repos indexed by MediaWiki Codesearch, nor
anywhere on-wiki at WMF in site scripts (per mwgrep).
Bug: T193826
Bug: T192623
Change-Id: I8ed6c09dc7efd750ad4688b895b2e3f808a0e52b
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Single-file modules to src/, the remaining as sub directories.
A few highlights:
* mediawiki.Upload.BookletLayout. (stylesheet: no image references)
* mediawiki.feedback - Also move the image to its own images/ subdir.
* mediawiki.searchSuggest. (stylesheet: no image references)
* mediawiki.toc. (stylesheet: no image references)
Also updated any other references to 'src/mediawiki/' that I could find
in core:
* Fixed references in docs/uidesign/*.html
* Remove redundant exclude from jsduck.json.
After this, there are 4 files remaining in src/mediawiki,
which are the 4 files used by the actual 'mediawiki' base module.
Bug: T193826
Change-Id: I8058652892a78b3f5976397bd850741dd5c92427
|
|
|
|
|
|
|
|
|
|
| |
This will make it a lot easier to move files from src/mediawiki/
to src/ without having to enumerate each file because previously
it was included by "src/mediawiki" entirely, but we can't include
"src/" entirely because of the implicitly excluded files.
Bug: T193826
Change-Id: Ib1b1a2e851d2cb8f1426a0d16343adcd6344a14f
|
|
|
|
|
|
|
|
|
|
|
| |
* Reduce clutter in src/mediawiki/.
* Make it easier to see from the repo structure which files
belong to this module, and which files not. For example,
'mediawiki.notification.convertmessagebox' and 'mediawiki.notify' are
logically related, but not actually part of this 4-file module.
Bug: T193826
Change-Id: I274323dffa8af1d046beb21d88f633f432a6ebbc
|
|
|
|
|
|
|
|
|
|
|
| |
mediawiki.widgets.visibleByteLimit→visibleLengthLimit
In change Ia1269fd898dabbcf1582618eab46cef97e10a3b1 I want to add
functions that deal with codepoints instead of bytes to these modules,
after which the names wouldn't make sense. Doing this in a separate
commit to make the diffs clearer.
Change-Id: Ia554eb2265248e72b04fce69a662a9db1a5f1275
|
|
|
|
| |
Change-Id: Iaad0e4aad3e78294667e82b4fbd009e241f765e8
|
|
|
|
| |
Change-Id: I9e4112a75ae7abc8c479efc39a438c3b59933418
|
|
|
|
| |
Change-Id: Ib181b814953bac0153dead95a25040ed2d4ca7ca
|
|
|
|
|
|
| |
Bug: T178450
Change-Id: I4540e5959ea15323b1f54be51fbeea6ca3f35169
Depends-On: I78543abe412d04d61a05e76702cb7681d5fad61d
|
|
|
|
| |
Change-Id: I8ee7c8a609543237f8280c190a9806cf5079de96
|
|
|
|
| |
Change-Id: I2a29689e2697108a5c5206cc61b36b5fb838182f
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Bug: T147646
Bug: T141723
Change-Id: Ic7a3d0cebbf4aec507db195ba8f587cecc1992aa
|
|
|
|
|
|
|
|
|
| |
It should probably be deprecated first after all.
This reverts commit 6fba9a7dc6ac969676c57f85b09bbdac9067a2bd.
Bug: T144974
Change-Id: I830fbfc2e453be6b18d43775a8aa1a366690907c
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Change-Id: Ifb920c055740575edcda0b4f460cc8c5b377ba87
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Follows-up 0bfdd927.
Change-Id: I65b9343ea002c332323ededf4e328e4463faf698
|
|
|
|
|
|
| |
Re-do Ifbb0f6751 in a smaller scope as a first step.
Change-Id: I346f3587d3bfeaf0fe3467cd1f4dcf2d134ecc08
|
|
|
|
|
|
|
| |
Coming next: File API support, stash support
Bug: T64513
Change-Id: I06fa61e7155efe8126ba12cda9376c37f1c45e8e
|
|
|
|
| |
Change-Id: I1715c5bbca8735de8c391dee4e2cec8269414acf
|