Commit graph

16487 commits

Author SHA1 Message Date
Ed Sanders 71157aab76 NWE: Don't change editor preference if visual mode not available
Bug: T246259
Change-Id: I1513098be707ca5c1a40a061917487785f5100e8
2020-02-27 16:53:45 +00:00
jenkins-bot 983afd6793 Merge "Update VE core submodule to master (244656506)" 2020-02-27 14:38:11 +00:00
Translation updater bot b260f4196f Localisation updates from https://translatewiki.net.
Change-Id: Id2a5c1176cfeac39c180eeb1eedc73b12b9c327c
2020-02-27 08:38:02 +01:00
James D. Forrester 7c69172310 Update VE core submodule to master (244656506)
New changes:
d1c82e84e build: Updating npm dependencies
403f247bf Localisation updates from https://translatewiki.net.
1f6f21ed9 Localisation updates from https://translatewiki.net.
0ac184f4b README.md: Drop DavidDM badges, we use LibraryUpgrader now
6fbfe1a05 Fix: paragraph node image fix
05d04c90a Update OOUI to v0.37.0
3d6031eb8 Update OOjs to v3.0.1

Bug: T245319
Change-Id: I41b69b1645d66c3636d1a622c3cb8051a27f2e7b
2020-02-26 18:32:19 -08:00
Derk-Jan Hartman 9655bee7de Fix dimensions of WE2017 switch to VE
Correct dimensions are 32px, not 34px.

Bug: T223155
Change-Id: I74da7fc12b642984a680d58c20af054ebaf2e64c
2020-02-26 14:02:41 +01:00
jenkins-bot 4a2d636dab Merge "Fix: non descriptive announcement of version no." 2020-02-25 22:00:52 +00:00
Akinwale Alagbe dd91c3cd09 Fix: non descriptive announcement of version no.
When user navigate to the version number,
the screen reader only narrates the hexadecimal number
associated with the version label without providing context
about what this number represents

Bug: T245470
Change-Id: If9cccac0d71de2de5da96a3a053d21e3deb0d80c
2020-02-25 21:45:31 +00:00
jenkins-bot a2ceb67351 Merge "Fix:Internal and External Link annotation widget" 2020-02-25 16:03:01 +00:00
jenkins-bot a0cf9cb9f6 Merge "ve.ui.MWEducationPopupTool: Autofocus the button to close it" 2020-02-25 14:28:05 +00:00
jenkins-bot e736c3037b Merge "screenshots: Fix local test runner" 2020-02-25 13:51:03 +00:00
jenkins-bot 7c1b3d3af7 Merge "screenshots: Fix some timing issues" 2020-02-25 13:50:25 +00:00
Ed Sanders 5428f5452a screenshots: Fix local test runner
Broke after selenium-webdriver update

Change-Id: I424607c9ba741a88b993d2d279045f30c1d50ab7
2020-02-25 12:45:20 +00:00
Ed Sanders bd848eb386 screenshots: Fix some timing issues
Change-Id: I5cfb4025833699bffd4ade3fb659f41c268b8bb2
2020-02-25 12:45:20 +00:00
Translation updater bot 91debd78af Localisation updates from https://translatewiki.net.
Change-Id: Ic96374cc56315af5011207a135ebc7454f0e0c98
2020-02-25 09:37:33 +01:00
Akinwale Alagbe d3292378cc Fix:Internal and External Link annotation widget
Adding the ability to special aria-label for the link annotation widgets
in order to aid accessibility to visually impaired audience

Bug: T245294
Change-Id: I3e1fd4a3e3a951092b5212397acc38b2b89a23c2
2020-02-24 16:40:19 -08:00
James D. Forrester fc44f6c9b9 README.md: Drop DavidDM badges, we use LibraryUpgrader now
Change-Id: I1485727e8ed96f1be98c2c0bcbc1b443dbfbeb5d
2020-02-24 13:42:58 -08:00
Translation updater bot cae5f665b8 Localisation updates from https://translatewiki.net.
Change-Id: I4a355569d662dc1e8d9ad378d8cc7d9d1f23a1d1
2020-02-24 09:04:34 +01:00
Translation updater bot d5bb38c078 Localisation updates from https://translatewiki.net.
Change-Id: Id8f9087599424ccec471879e94b55a57b7c2933b
2020-02-21 09:39:51 +01:00
libraryupgrader 362e96e9d3 build: Updating mediawiki/mediawiki-codesniffer to 30.0.0
Change-Id: I60daaa0abe00ac7d4cc536e6d7baf3c6c3f6769d
2020-02-21 04:29:45 +00:00
jenkins-bot 119d3df502 Merge "Remove incorrect init special case for wikitext single edit tab" 2020-02-20 22:39:13 +00:00
Bartosz Dziewoński 387e0d3cb3 Remove incorrect init special case for wikitext single edit tab
This line was added in 9eebfbcac5
and I can't tell what it was supposed to do (that commit's message
only says "Fix NWE-only edit tab", thanks a lot).

Since then the init code was refactored a lot, at some point this
line was moved to be a part of a completely different check (???),
and now it's causing visual mode to be disabled even though the
user only set their preferences to *prefer* wikitext mode.

Bug: T243723
Change-Id: I3c1f502c3cd079fc5eeb2e9587b22d854ae3a72c
2020-02-20 22:37:45 +01:00
jenkins-bot 95c0f52f19 Merge "Purge autosave before submitting merged content" 2020-02-20 18:47:59 +00:00
Adam Wight c0ad11b960 Purge autosave before submitting merged content
When using TwoColConflict with VisualEditor, the autosave buffer wouldn't
be cleared after saving the successful merge.  This would cause a user to
see a "restore changes?" prompt the next time they entered the editor,
with the potential to confuse them and cause them to do extra work,
repeating the conflict resolution unnecessarily.

This change purges the autosave buffer before submitting a merge.

Note that it is not transactional, so there is a chance we're losing the
autosaved content even if the submit will fail.

Bug: T245119
Change-Id: I150023f548c5565412769d644a828176f907bc25
2020-02-20 09:43:26 +01:00
Translation updater bot c21380cd5a Localisation updates from https://translatewiki.net.
Change-Id: I58af5e859a97df404cc60cf23d904d7617c9e997
2020-02-20 09:28:08 +01:00
Translation updater bot e5de680272 Localisation updates from https://translatewiki.net.
Change-Id: I1f69b23613709c810ace50e22e984b01ec7b6f88
2020-02-19 08:27:05 +01:00
Bartosz Dziewoński 8c949955e6 ve.ui.MWEducationPopupTool: Autofocus the button to close it
Change-Id: I4c2a3620b0477492713580baab8c3ae503009ed5
2020-02-19 00:25:37 +01:00
Translation updater bot d20925df7f Localisation updates from https://translatewiki.net.
Change-Id: Icf185665f5be0b40e37f8acb46019cca0ccad8c7
2020-02-18 08:25:49 +01:00
Bartosz Dziewoński e25ef41c50 Update VE core submodule to master (a5f81e9fb)
New changes:
b95828590 ve.ui.Surface: Fix exception in #scrollSelectionIntoView during teardown
078e9731a Fix: Added aria-label attribute to elements in find and replace dialog.
2c7206491 ve.ce.ResizableNode: Include padding and border when measuring the element
6d4094caa Improve/add accessible titles for toolbar dialogs
3164cd81a Localisation updates from https://translatewiki.net.
d46cf946b Fix: Add aria-label to comment inspector

Bug: T245074
Bug: T245315
Change-Id: Ia3012964adb9ba0ecdf8df104ff346a202bfa54e
2020-02-17 21:38:21 +01:00
Translation updater bot f9f2ef6c8e Localisation updates from https://translatewiki.net.
Change-Id: I38496e87be951e9c540afe9862731272ad2093c0
2020-02-17 08:48:10 +01:00
jenkins-bot 13108d8f4d Merge "ve.init.mw.DesktopArticleTarget.init: Update for Minerva changes yet again" 2020-02-16 00:13:18 +00:00
libraryupgrader 7b6124ae64 build: Updating npm dependencies
* grunt-stylelint: 0.13.0 → 0.14.0
* stylelint-config-wikimedia: 0.8.0 → 0.9.0

Change-Id: I03e09c1152d0d9bebfdd9278c5f410a24f306234
2020-02-15 20:15:05 +00:00
jenkins-bot 95a20dbc08 Merge "ve.dm.MWGalleryNode: Preserve 'class' attribute unchanged" 2020-02-15 16:59:56 +00:00
Bartosz Dziewoński a0c603a137 ve.init.mw.DesktopArticleTarget.init: Update for Minerva changes yet again
This continues to take more effort than all other skins combined, but
still every time our overrides get less crazy. Maybe, and stay with me
here, maybe a year and five patches from now I'll remove the last one.
See 91f99ce78d for the last time.

Change-Id: Id880d1cd1ecef59635b347102dc2107204382fb2
2020-02-15 16:40:57 +01:00
Bartosz Dziewoński 8065fdf2b9 Clean up code related to token and bad token handling
Things I noticed while writing I37f8e89b6d92c419d1b6569891612256342f8139,
but which felt too messy to include in that commit.

* Use promise chaining
* Update documentation
* Remove redundant code
* Split a method that now handles two different errors
* Grumble about localisation messages

Change-Id: I81e28a03af4f6c3452679ef6bbcaa89bb1235122
2020-02-15 03:52:40 +01:00
Bartosz Dziewoński 58757d4e3e Use built-in mw.Api 'badtoken' handling, also 'assert'/'assertuser'
When the user is saving their edit, we want to ensure that they
understand how it will be attributed. If the user gets logged out or
logs in in another tab, we want to display a message about it before
saving.

Instead of manually managing tokens and handling the 'badtoken' error
to detect this, use the 'assert'/'assertuser' parameters for the API
to detect it for us. Thanks to this we can rely on automatic retrying
for 'badtoken' errors in mw.Api#postWithToken.

It will be possible to share some of this code with other extensions
that already use ArticleTargetSaver, namely DiscussionTools, now that
it doesn't need to manage tokens for VisualEditor.

Bug: T245327
Depends-On: I485f99e1f5f493262b0c9af22370da01adf1e09c
Change-Id: I37f8e89b6d92c419d1b6569891612256342f8139
2020-02-15 03:37:22 +01:00
Bartosz Dziewoński 26062fd3a0 ve.dm.MWGalleryNode: Preserve 'class' attribute unchanged
By removing this line, we fall back to the default behavior,
which is to copy the attribute from the original DOM element.

The gallery is supposed to have a class indicating the type (packed,
traditional, etc.). However, Parsoid doesn't care about that and
instead reads the type from 'data-mw'. Instead, changing the attribute
is causing dirty diffs.

Bug: T214649
Change-Id: I96b5a21777046b1caf07a3b1def9fad81bb15939
2020-02-14 22:05:50 +01:00
jenkins-bot 6f7ef2fd76 Merge "Improve rendering of audio files (for real this time)" 2020-02-14 16:04:23 +00:00
Translation updater bot e95bb8cc6c Localisation updates from https://translatewiki.net.
Change-Id: Icbc3acdecf9cd802141959b1825585687c8567ab
2020-02-14 08:26:51 +01:00
Bartosz Dziewoński 9119e57a2e Improve rendering of audio files (for real this time)
ve.dm.MWImageNode:
* Define sensible scalable properties for audio files. They are now
  scalable to any width but have a fixed height. (Ideally they would
  have no concept of height, but that would require many more changes.)
  This prevents them from resetting to 0x0 when resized.

ve.ce.MWBlockImageNode:
* Remove override for #isResizable, audio files can be resized now.
* Move #updateMediaType to MWImageNode mixin so it applies to
  MWInlineImageNode as well.

ve.ce.MWImageNode:
* Add #updateMediaType from MWBlockImageNode.
* Hide the real image 'src' using CSS rather than changing the
  attribute. It seems the previous solution depended on the order in
  which methods are called, because it stopped working when I moved
  the code here. (This depends on VE/VE change If5b1b5b5d.)

audioPlayer.svg:
* Make the file nicely resizeable. The dimensions of the "play" icon
  and time are fixed, the bar adjusts to the width of the container.

Bug: T206022
Change-Id: Ia0f38ca11e0d55a5b725fd9aeb6c79ec1345376d
2020-02-14 04:18:28 +01:00
Translation updater bot 6c6662b7d0 Localisation updates from https://translatewiki.net.
Change-Id: Ibb9127f6832356ccc762920b5fdb57d7dfe83413
2020-02-13 08:55:56 +01:00
jenkins-bot 5bcfdcd963 Merge "Localize remaining hardcoded English error messages" 2020-02-13 00:20:07 +00:00
James D. Forrester eb02880f20 Hooks::isSupportedEditPage: Re-format to make the logic clearer
Change-Id: I8959f1bc4c632fb80fc02374d6ecfc94ef06d9fc
2020-02-12 15:39:55 -08:00
James D. Forrester b7b526a8a5 Update VE core submodule to master (178f5e9e1)
New changes:
178f5e9e1 Update OOUI to v0.36.5

Change-Id: Ifb6ef2e1282fa3ba1f2cab2b969b157ac8e0ac41
2020-02-12 15:37:16 -08:00
jenkins-bot 2b8f2c276d Merge "Fix reporting of loading errors from ArticleTarget#loadSuccess" 2020-02-12 23:33:06 +00:00
jenkins-bot 99b0a33e99 Merge "ArticleTargetSaver: Fix error messages" 2020-02-12 23:33:03 +00:00
Esanders c9b2e8b4d2 Only preserve data-parsoid/RESTBase ID on transclusion nodes
The previous attempt to fix this didn't preserve any attributes
but removing data-parsoid can result in a loss of wikitext formatting.

This reverts commit bdfd4b6d8f.

Bug: T207325
Change-Id: I2a38e651d17262889eddb149c72c9e08b4e56ed0
2020-02-12 22:51:43 +00:00
Bartosz Dziewoński c95be08cc4 Localize remaining hardcoded English error messages
Bug: T227325
Change-Id: Ibee27bd8457f83910da03ecb8801e5f26bdb3b2a
2020-02-12 22:18:40 +01:00
Bartosz Dziewoński f491196559 Fix reporting of loading errors from ArticleTarget#loadSuccess
It was broken on desktop and on mobile, but for different reasons:

Desktop: In change 5f1c68945d,
I removed some code from DesktopArticleTarget that was checking for
`typeof errorDetails === 'string'`. I thought it was unused, but it
was actually needed for this code.

Mobile: overlay.reportError() doesn't work here: that method displays
the error inside the save panel, which is not visible at this point.

This is now solved by treating those errors as if they were API errors,
which is something we were already doing in ArticleTargetSaver.

Change-Id: I5207836f56d65171b1240cef02fc17b9956036ef
2020-02-12 22:18:40 +01:00
Bartosz Dziewoński 6d993fee49 ArticleTargetSaver: Fix error messages
Follow-up to 5f1c68945d, which renamed
these messages while moving them into MediaWiki core.

Also, parse HTML in them. This is consistent with real API error
messages, and with the behavior of mw.Api#getErrorMessage. (And also
fixes potential HTML escaping issues.)

Change-Id: I307ca9873e245169a0d4b43499317acbac69fb9b
2020-02-12 22:18:40 +01:00
jenkins-bot 1a426d8614 Merge "Remove use of Title::quickUserCan" 2020-02-12 18:22:34 +00:00