Commit graph

1604 commits

Author SHA1 Message Date
DannyS712
f6863777cc apisandbox.js - rename UploadParamWidget to UploadSelectFileParamWidget
More informative, since it extends SelectFileWidget
Per code review on prior patch

Bug: T269952
Change-Id: I2a579c3b48822f34b378addc586d3cff1e789a48
2020-12-16 17:32:25 +00:00
DannyS712
6f1515ee28 apisandbox.js - split UploadParamWidget to separate file
Bug: T269952
Change-Id: I13b05f91b008cf31c70ff26b6f29889c42d08fc1
2020-12-15 23:04:01 +00:00
jenkins-bot
b1f69cc6dd Merge "Merge mediawiki.special.undelete into mediawiki.misc-authed-ooui" 2020-12-15 22:37:13 +00:00
DannyS712
1473989a35 Merge mediawiki.special.undelete into mediawiki.misc-authed-ooui
Keep the former as a deprecated alias for now

Change-Id: Ib6fb6493ad5f7b2f3aae5607a5a94c0fd0738a0a
2020-12-15 21:41:03 +00:00
jenkins-bot
773c223ac4 Merge "mediawiki.action.edit: Move module files to their own subdirectory" 2020-12-14 23:52:31 +00:00
jenkins-bot
04fb8689b4 Merge "apisandbox.js - split OptionalParamWidget to separate file" 2020-12-14 23:45:39 +00:00
Timo Tijhof
9ba5c1dd5b mediawiki.action.edit: Move module files to their own subdirectory
This makes it easier to understand which files belong together,
which ones can "see" each other, and to find the files through
code browsers and text editors without having to look up
in Resources.php.

Bug: T193826
Bug: T270141
Change-Id: Id87c11f66cbd8c699c9bb01261523f2500df718d
2020-12-14 22:52:25 +00:00
jenkins-bot
17c9533b45 Merge "Split mw.Feedback.Dialog class into its own file" 2020-12-11 20:01:41 +00:00
DannyS712
7ccfddc050 apisandbox.js - split OptionalParamWidget to separate file
Bug: T269952
Change-Id: I43b71ddfa59d47fd27f1840b7728e9c42b795965
2020-12-11 18:32:03 +00:00
DannyS712
6f1b9b326e Split mw.Feedback.Dialog class into its own file
Independent of the rest of mw.Feedback, cleaner/clearer
to define separately.

Change-Id: Iac12ea3764472fd2e65ee15e6907c383d1011c12
2020-12-11 18:09:47 +00:00
Arlo Breault
a6c769e976 Share Parsoid's media styling with content
Since the legacy parser will also be emitting the new media structure
that requires these styles.  For now, the feature is only shipped by
default when $wgUseNewMediaStructure is enabled.

Bug: T51097
Bug: T266148
Change-Id: Id20d716ce145e0bae37621fd6e218a793b5332ae
2020-12-11 11:47:00 -05:00
Petr Pchelko
76d200b83f Add baseline MW REST API client for frontend
Bug: T268680
Change-Id: Ib09bf6b1e8cbfb3c51cfed24fc2e1e5bfc14a6eb
2020-12-09 23:05:15 +00:00
jdlrobson
384939260d Deprecate mediawiki.toc.styles
The only known usage is Cargo skin.
Note, that Minerva references the module but only to remove it from
the page. This is removed in 0e61c55ea.

Follow up to db3c8ea16b

Bug: T252774
Change-Id: I05d79f073f5303b036e47c2a0b37e9bfbaf0d2d1
2020-12-09 16:42:26 +00:00
jdlrobson
63c4125a29 The mediawiki.skinning.content.externallinks styles are moved into ResourceLoaderSkinModule
Going forward all skins will have a single ResourceLoader module
defining their styles.

This deprecates the module moving its functionality into ResourceLoaderSkinModule.
Skins can continue to get those styles by enabling the new feature in their
main module.

Bug: T267577
Change-Id: I27c9f2c6ed9e4014afb231f690190c67b03b5d02
2020-11-23 11:26:01 +00:00
jdlrobson
db3c8ea16b Add new 'toc' feature to ResourceLoaderSkinModule
The table of content styles will now be loaded on all pages rather than
just pages which have it. This will lead to less stylesheet fragmentation
across page views.

Skins in WMF production were updated long ago to automatically opt
into new features so will automatically gain this module:
I98b7e49b8a3bcba31284385d2f45e0164df2fbb4
I50afd035360ff2eccd5a934a02a218d093f9583d
I5b3920ae6e98111582b93e60a2b9950c478bff7d
If9283742a83ecfbe8c4246e3624022a56be8f161
If9ae25c41b91a8b47c154f0fd98984eac526654f

Skins that are using ResourceLoaderSkinModule with opt-in approach or
the existing mediawiki.skinning.interface, will automatically get these
new styles. Skins that are use neither of these mechanisms will need to
be modified if they wish to retain the collapsing functionality of the
table of contents. As of now, I am not aware of any such skins.

Note in a follow-up, the mediawiki.toc.styles module will be marked as
deprecated in 1.35. This is done separately to allow WMF caches
some time to roll over to the new code first.

Bug: T252774
Change-Id: Ie28b7e732664eb332be795d7e33cd9a227c21370
2020-11-16 20:33:05 +00:00
jenkins-bot
e836dfa404 Merge "Support the WebRequest / WebResponse SameSite behavior on the JS side" 2020-11-10 03:08:10 +00:00
jenkins-bot
b8c277c932 Merge "Add API validator for titles" 2020-11-07 00:22:42 +00:00
Gergő Tisza
84e9702349
Add API validator for titles
The ISMULTI logic is copied from UserDef.

Change-Id: I794e2277c462b86cb5c3888d1ba509b11fad62aa
2020-11-06 14:09:04 -08:00
Bartosz Dziewoński
9c02f572bc mediawiki.action.edit.preview: Add versionCallback to improve startup perf
Bug: T266311
Change-Id: I4486ae32cffd803e0c86e8499101cd4a250f7d99
2020-11-04 20:30:14 +01:00
Bartosz Dziewoński
42351616f2 mediawiki.action.edit.preview: Parse 'previewnote' message on the server
It appears that many Wikimedia wikis have complex overrides for
this message. Only a small set of wikitext syntax is supported in
messages that are used client-side [1]. So, parse it on the server.
'packageFiles' and callbacks make this almost convenient.

[1] https://www.mediawiki.org/wiki/Manual:Messages_API#Feature_support_in_JavaScript

Bug: T266311
Change-Id: If3d675ac0232c378feca825e989ea9cd7daee8cc
2020-10-28 03:04:50 +01:00
Ed Sanders
e96d76ea42 ApiSandbox: Use LESS
Change-Id: I5368ff7b43c8eb504b4d1a0699eac0d1a031c447
2020-10-22 10:50:19 +01:00
Gergő Tisza
22c0986019 Support the WebRequest / WebResponse SameSite behavior on the JS side
Provide the equivalent functionality of WebRequest::getCrossSiteCookie()
and the sameSite and sameSiteLegacy options in WebResponse::setCookie()
in mediawiki.cookie.

Bug: T257936
Change-Id: I88a970bb00c672a9c23569ec791be51d07cae59d
2020-10-19 06:50:29 +00:00
jenkins-bot
7702eafcd8 Merge "Add new OOUI messages to the module definition" 2020-10-15 16:55:51 +00:00
Bartosz Dziewoński
5a99685af7 Add new OOUI messages to the module definition
New messages were added in OOUI v0.40.4.

Follow-up to b4edfa6d9b.

Change-Id: Ife0f8bc9ce6c0b3e9dda8ede232ebb586158c4be
2020-10-15 16:06:08 +00:00
Derk-Jan Hartman
7e9cac27d1 LivePreview: Show parse warnings and preview header/warning
Bug: T91167
Bug: T190120
Change-Id: Ifec1e8fa12f1d774bef2722eaf963f1fba4d6223
2020-10-15 14:33:24 +00:00
jenkins-bot
d7280851ec Merge "Add days left messages to changes-lists' clock icons" 2020-10-06 17:14:57 +00:00
Nardog
c40211cf4c LivePreview: Show "Templates used in this preview" when creating a new page or editing a section
mediawiki.action.edit.preview.js now reconstructs "Templates used in
this preview" beneath the edit box if it doesn't exist, so that the list
of transclusions in the preview returned by the Parse API will now be
available to the user even when creating a new page or editing a
section. It also now correctly replaces the label "Templates used on
this page" with "Templates used in this preview", or "Template" if there
is only one, thus more closely matching the default PHP behavior.

Bug: T102286
Change-Id: I9976067d9c3a42d2a93d56da677354a8f352eb2f
2020-10-03 07:30:47 +00:00
jenkins-bot
e3039adc22 Merge "WatchlistExpiryWidget: Move focus to expiry dropdown after hitting Tab" 2020-09-29 05:38:54 +00:00
MusikAnimal
c857e76480 WatchlistExpiryWidget: Move focus to expiry dropdown after hitting Tab
This commit allows the user to tab into the expiry dropdown directly
from the watch link. This reason for this is becuase there is limited
time to get to the popup before it is automatically dismissed.

To avoid redundantly listening to keystrokes for the entire session, the
listener is only valid for the initial keystroke after the popup is
shown.

So the workflow for someone with motor impairment might be to hit
[alt-shift-w] to watch via the watch link, then hit [tab] to jump to the
expiry dropdown and change the expiry as desired.

Hitting [tab] again when focus is on the dropdown will move focus bcak
to the watch link. This is because we can't be certain what elements
follow #ca-unwatch across all skins (also scripts and gadgets could
cause conflicts).

Bug: T261430
Change-Id: Ia7d3f8d963810821f7915690dc62a66c7c778de3
2020-09-28 12:41:03 -04:00
Sam Wilson
070ffce218 Add days left messages to changes-lists' clock icons
Add a new resource module for watchlist expiry behaviour in
changes lists, to add a message when the clock is clicked on
mobile.

Bug: T261415
Change-Id: I621b1571b57686beb9fb5802533b1e70d293bc2a
2020-09-16 12:00:32 +08:00
jenkins-bot
36f8470453 Merge "Make ApiSandbox copyable URL absolute" 2020-09-14 08:56:19 +00:00
Gergő Tisza
987c72388c
Make ApiSandbox copyable URL absolute
These URLs are typically used with curl or a similar tool; having
to manually turn them into an absolute URL is an annoyance.

Change-Id: I3c3229e228e9ccb25c4b1b8642736b7e9d213ff2
2020-09-13 16:57:37 -07:00
jenkins-bot
59dbeee852 Merge "resourceloader: Give SkinModule 'features' option an extensible default" 2020-09-09 22:37:47 +00:00
jdlrobson
6ab14857b9 resourceloader: Give SkinModule 'features' option an extensible default
The previous method of using an array was restrictive in that core
could not add new features automatically to skins.

This change allows an opt-out policy as well as the existing
opt-in policy. Wikimedia deployed skins will soon be adapted to take
the opt-in policy.

Bug: T252774
Change-Id: I517f9f80760348da589852cda53cbd0c14231f86
2020-09-08 21:00:42 +00:00
Timo Tijhof
0d6236608c Remove unused 'mediawiki.page.startup' alias
Follows-up Ic418c23a7400abba22fd0.

Bug: T260210
Depends-On: I250b38a836f28bfb440f19282a9677977f30c615
Change-Id: I2a9199ba2bd58085424f333dc0b34d0f808ff384
2020-08-31 23:56:25 +00:00
jenkins-bot
cbdefbef48 Merge "Update language in watchlist expiry" 2020-08-17 20:56:24 +00:00
jenkins-bot
26a1bcd01f Merge "mediawiki.page.startup: Merge with mediawiki.page.ready module" 2020-08-17 20:54:50 +00:00
hmonroy
0c2cc49bdc Update language in watchlist expiry
Update watchlist expiry language indicators (dropdowns, tooltips, watch
via star, watch via edit):
 * Change "Permanently" to "Permanent"
 * Change "XX days left" and "Expires in X days" to "XX days left in
   watchlist"
 * Update the "Click.." sentence by star to "Click to remove it."
 * Change watch period for a page that is less than "1 day left" to "A
   few hours left"

Bug: T253135
Bug: T255632
Change-Id: I114c6f77e86ad81b1810fedcd49f52c88700ca16
2020-08-14 11:47:03 -07:00
Timo Tijhof
274c4232b9 mediawiki.page.startup: Merge with mediawiki.page.ready module
The distinction between the two was lost several years years ago
when the "position top" queue ceased to be a thing. Since then,
the two have been loaded and executed together in the same batch,
and are doing similar things.

mediawiki.page.ready is publicly used in several places
as dependendency, but mediawiki.page.startup is entirely internal
to core, which makes it the easier one of the two to dissolve.

Keep an alias for two weeks for cache compat to avoid console
warnings about unknown modules. Although even some cache still
refers to it, this is harmless since the errors are recoverable
and the correct module was also loaded by the cached pages
already.

Bug: T260210
Change-Id: Ic418c23a7400abba22fd07b17f173d3c5f1d1d10
2020-08-14 01:35:15 +00:00
jenkins-bot
02c533e837 Merge "Combine mediawiki.action.delete.js and mediawiki.action.delete.file.js" 2020-08-13 07:07:57 +00:00
jdlrobson
34c16612f9 mediawiki.page.ready: Allow skins to disable search lazy load
Minerva does not make use of this code at all and going forward
as we migrate to Vue, Vector will provide its own search module.

Both use cases are supported by a simple boolean.
See Ib6c8f890fb3d6e751f5f01a6576614b9cc9b440c for Vector usage.

Bug: T250851
Change-Id: I0dc38e74052027f26a70d58b5f520e5830e0d55d
2020-07-28 23:55:35 +01:00
jenkins-bot
1454621d09 Merge "Allow skins to override mediawiki.page.ready initialisation" 2020-07-28 20:49:20 +00:00
Peter Ovchyn
ae3104c46d Allow skins to override mediawiki.page.ready initialisation
Add 'ready.config.json' to resource
Add 'collapsible', 'sortable'  field to be possible override via hook.
In order to override setting, new hook ResourceLoaderPageReadyConfigHook has been introduced.

A new config field for search will follow.

Bug: T250851
Change-Id: I041d4a4b9114f1190f28e0283d96cd33b81f9850
2020-07-28 20:08:27 +00:00
Roan Kattouw
7343814314 RCFilters: Remove feedback link
This feature has been in maintenance mode for years now.

Bug: T258960
Change-Id: Ied4c904d21889e293d3d90de7fcbc2d22bfc9891
2020-07-28 10:38:12 +01:00
gopavasanth
ace32df020 Remove mediawiki.legacy.oldshared module and file 'oldshared.css'
Bug: T248357
Change-Id: I2edb9bbbc480a3d52369325a8a82a0f8cf410fcc
2020-07-24 16:05:35 -07:00
suecarmol
436d7fbf06 Display remaining watch period in watchstar
Add a new tooltip message that displays the remaining watch period of a
page, if it is being watched temporarily. The tooltip message remains
the same if it is being watched indefinitely.

Bug: T250215
Change-Id: Ic9d1301427d477de71fb6f63fe77554a33684cd1
2020-07-18 01:45:51 +00:00
hmonroy
68d81806ca Implement ability to select and save watch temporarily.
Add functionality that allows users to select a watch period via a
drop-down in the pop-up that shows up when a user watches a page via star.

Update the expiry dropdown when user is in a page edit-form.

Bug: T249262
Change-Id: I9a7dfcaf84be8083e0319789dc95f2d15cee245a
2020-07-17 16:53:53 -07:00
edwintam
eedfbbdaaa MediaSearchWidget: Added aria-label for screen reader for the search input box
Bug: T245899
Change-Id: I70eee08c159b079a609b0221ba7151f7487feb01
2020-07-13 22:29:58 +02:00
jenkins-bot
a4832c9705 Merge "rcfilters: Fix focus order on the limit/duration popup" 2020-07-13 20:26:32 +00:00
Akinwale Alagbe
6c6f78fbd2 rcfilters: Fix focus order on the limit/duration popup
Narrator not announcing popup dialog when
when changes and limit button is clicked.

Focus order is not logical when for keyboard only users

This fix here attempts to make the focus logical, it binds a handler
to the ready and close event placing focus on the button select widget
and place focus back on the button when the popup closes.

Bug: T257171
Change-Id: I66355d5d4d45a9b4aeb14974d228e4a193645a1e
2020-07-13 22:05:11 +02:00