New changes:
44d2d666c Remove custom icon sizing from block slugs
793d131f9 Ignore covering annotations when looking for plain text pastes
b0025f3ab dm.Document fixupInsertion: check suggestedParents as well
73ce638f1 ve.ui.TableLineContext: Fancier popups
9d54d531e Visual Diff: add internal list diff
4f4e121b5 DiffElement: Add hacky support for template-defined references
Local changes:
dm.SurfaceFragment tests: exercise fixupInsertion for mwHeadings
Core VE doesn't have any elements with suggestedParents, so make sure this is
properly tested.
Bug: T153315
Bug: T162819
Bug: T164017
Bug: T165865
Change-Id: I01489226d282abe71020e65358ead24fe07692f7
As I understand it, the button should be enabled whenever there's more than
one option in the sidebar, and disabled otherwise. The previously chosen
conditions weren't perfectly proxying this, and the button would be disabled
whenever editing an already-existing transclusion.
Bug: T167710
Change-Id: Id303b680c072642ae7b66066e28ecc9f1dc90fd7
Only shown if VisualEditorEnableDiffPage is set, or query
string param 'visualdiff' is present.
Currently:
* All VE javascript is loaded (could be cut down to just DM code)
* The entire Parsoid HTML of both revisions being compared is loaded
* Both Parsoid HTML docs are parsed into VE DM trees and diffed
Bug: T167508
Change-Id: I151fc9bab3d3032f50c8d11be6b54e45a06fcc34
We were incorrectly handling transclusions with trailing
newlines after the template name.
This also improves handling of non-template transclusions,
e.g. parser functions like `{{int:mainpage}}`, which are
no longer mangled as if they were page names.
ve.dm.MWTransclusionNode#isSingleTemplate will now match
a template even if it's name is itself template-generated.
Logic for turning Parsoid's hrefs into page names stolen
from ve.dm.MWImageNode.prototype.getFilename.
Bug: T167613
Change-Id: Ibecf71338eb37bb3da81a7372e4ed41140a9af57
OOjs UI Popups position themselves automatically relative to their
$floatableContainer these days.
Also added explicit `$floatableContainer: this.$element` in the config
(although not strictly needed, since the parent node is used by
default, this makes the code more robust in case we move the popup
somewhere else in the DOM).
Bug: T167751
Change-Id: Id4267fce6499a4c217f7dc1d18871c02dd078aee
No longer needed after I2ede6c88be569224c0b2a4e388a133ad98b86a7b
in VisualEditor core.
* 'transform: none' from 049a32c60a
(that change does not describe what the issue was, but clearly
it wasn't a complete fix and I see no problems without it).
* 'z-index: 4' from 6fff13b898 (I can't
reproduce the issue there after removing it).
Bug: T167616
Change-Id: I7e0d603af2668269e5587eaa5e4761166a1b4097
Reverting a new weird hack for an issue and bringing back the
old, tried and true hack that was removed in the mistaken belief
that if a bug is marked as fixed, it is really fixed.
* Revert "MWTransclusionDialog: size footer correctly"
This reverts commit 032fb2924e.
* Revert "Remove dialog height hack tagged against resolved bug"
This reverts commit a97eacd05b.
Bug: T93290
Bug: T167483
Change-Id: If1cc07837892bb0248c74025d5403f9698e77705
This fixes the focussing problems from T166150.
As a separate consequence, when loading a template/transclusion
takes a while (it can take several seconds for e.g. a template with
100 parameters), we will now display nothing while the user waits.
Previously we displayed an empty frozen dialog (note that this only
worked the first time for some reason).
Bug: T166150
Change-Id: I414a72ee248517867eef63a75f2d327aa5d5b908
New changes:
26085a853 Make author list a ListPopupTool
c4ea53eef Update OOjs to v2.1.0
8c94697f3 Update OOjs UI to v0.22.0
cdebc4817 Follow-up 8c94697f: Actually commit the icon changes I had locally
8be817396 Update OOjs UI to v0.22.1
Local changes for author list popup
Change-Id: I36bcaf122528a4a12882aaff3b33ef936082a391
Add 'require' to eslint global whitelist for this extension,
since ResourceLoader provides this in all contexts now.
Bug: T166254
Depends-On: I0e6a95bd4fbaba06eae5137ac7af84f62bebf6f0
Change-Id: I6b2fe57317dcff18ec6d9ea0cd9e4eb9c894c169
Any MW target may want to get a wikitext fragment, not just
ArticleTargets. Requires us to move refreshEditToken up as well.
Change-Id: I27d30e20fefd5ba266d3d8e5f99383e9b4d4993a
Sub-classes want to dynamically change type, e.g. inlineFoo/blockFoo,
but doing this after storeGeneratedContents invalidates the cache,
so ensure this is done as soon as the element is generated.
Bug: T151130
Change-Id: I80e2f2587cff8e9d9fe6ded5d8581263268deaa8
Follow-up to fefb76eebc. Prior to that
change, the condition for this looked like this:
// … if on a ?veaction=edit/editsource page
(
isViewPage &&
uri.query.veaction in editModes &&
(
uri.query.veaction === 'editsource' ||
init.isVisualAvailable
)
)
In the refactor, the `uri.query.veaction === 'editsource'` check was
lost.
Since that code is pretty messy (probably predating the source editor
and hastily adjusted), instead change the check for `isVisualAvailable`
to just `isAvailable`. If the requested mode turns out to not be
available later, the editor will not load.
Bug: T165146
Change-Id: Idfaf9115dd20cec8f8e044a704b93b07984cdcee
Back in de98382a55, references to MWTransclusionTableCell were introduced,
but weren't followed through on. So, actually add it. Have cellable
Transclusions use it as their type.
Bug: T144122
Depends-On: I054f12f4218102a12d7a9ea843f9c61e8825c52c
Change-Id: I367f878bfd1c58e20b62368cb78120604b48d791
Ideally we could use the preferred editor, but this breaks
tab switching to the old editor.
Bug: T165238
Change-Id: I5f5ee5566cdd2080ba7c89d43cf127b457537768
We added support loading NWE from action=edit in I35208cce069
but missed this check in the front-end.
Bug: T165238
Change-Id: I2732eaa81a3f968b34c4e878b2ad36de981dd567
Using the forthcoming wgRelevantPageIsProbablyEditable.
Bug: T165010
Depends-On: I6c6ca1cfd93e7be917952980f1e1d57aec3a1292
Change-Id: I6c6ca1cfd93e7be917952980f1e1d57aec3a1229
Renaming CardLayout to TabPanelLayout and all connected code instances.
Follow-up to Icfe1652cc038dc131b6b855ce9b45040b8ee5178
Bug: T164903
Change-Id: I9ce4e31e390522d469e126fb3a4b05787cef7fef
New changes:
d61440346 Add logging to the rebase server and client
d1d2539ae rebaser: Add script to convert a log file to a test case
0896d5f05 lib: Update README files for OOjs and OOjs UI
045ae87fb Localisation updates from https://translatewiki.net.
04b276e16 VisualDiff: Make annotation whitespace trimming configurable
dd04912e5 Localisation updates from https://translatewiki.net.
11fc30709 MobileContext: fix button spacing
7898acd0b Fix typos and minor lint issues
4e3e2deb9 Avoid using the global namespace in test files
1ed81efa1 build: Update eslint to 0.4.0 and make a pass
Bug: T163473
Bug: T164166
Change-Id: I4bab4260d6b05ff0277cacd167186336acc02080
This lets us avoid a fraction of a second lag when someone pastes a plain URL
into source mode.
Bug: T163237
Change-Id: I0e673856dec5f273fb92731b27494762299d2d6c
* Fix focus and resize/scroll into view after the
captcha has loaded (so after the image has loaded
for FancyCaptch).
* Add margin between input and captcha
* Enable enter-to-submit on captch input field.
* Unify code for simple/math/questy and correctly
render math as HTML (by looking at the mime type)
Change-Id: I10433cefbfea8569674c120dde5b489570e20966
* Do not try to load the editor on protected pages, or if the user
doesn't have permission to edit pages.
* Move the check for required DOM elements after the check for
pages without the editor (T162411) and after DOM ready (T163307).
Bug: T162411
Bug: T163307
Change-Id: I8149694ba8155682701f2cda6ca212d60f446caa
Previous the media upload panel didn't support this. This makes Chrome
behave in the same way as Firefox when pasting images into a document.
Bug: T39932
Change-Id: I12f190a48ae9b62d4ad2f33b2a4ee546fdf7b354
Expanding from a single if-expression lets us make the
code much more readable, and reveals some minor bugs.
Change-Id: I49e57bfc093e019c837a73eab5c25fdbd14de0af
Follows-up 914eb1cde3; reverts the logic to have the label change, but
sticks with new "-current" i18n messages, so the "X editing" instead of
"Switch to X editing"; the old i18n messages are now dropped entirely.
Bug: T162864
Change-Id: Icdad6c5bb06ff86e9b8976840bb1a94b939609a8
Sites like to customize 'readonlywarning' with things that we can't parse.
Instead, use 'apierror-readonly'. The old message is still shown in edit
notices.
Bug: T163455
Change-Id: I592accde17b256ecee27820df12d9d312499f8f7
If we retry and get another 'badtoken' error, something is very wrong,
and trying again and again is probably pointless. This behavior also
matches how mw.Api#postWithToken handles bad tokens.
Bug: T163493
Change-Id: I488fd7e74e37922044491695d6c9025a45531281
Previously we completely disabled the loading of notices
when switching, instead of just not showing them (so they
don't clash with the "switched" popup).
Bug: T162812
Change-Id: I3f8e787630e196cee1dbb1aa449b3558b74fcd04
New changes:
57f8064b6 tests: Enforce dm unit test coverage at 20% per file and 80% globally
6f757c670 LinkAnnotation: add a getFragment method for consistency with MWInternalLinkAnnotation
c40a3f152 Drop the classList polyfill for IE9
d1af6c6bb Update OOjs UI to v0.21.1
bfb35aaef Localisation updates from https://translatewiki.net.
Bug: T162277
Change-Id: I5146bc421bb88e56bafadccefc7bbdee106504ea
OOjs UI v0.21.0 changed DraggableElement's padding. Override it here, so it doesn't look broken any more.
Bug: T163404
Change-Id: Ic0bc4f9e3e060cf89e6bc7cb22068d1fe1441d75
Figuring out why it broke doesn't seem like a very interesting task,
so let's just throw the whole logic out and use OOjs UI PopupWidget's
new built-in ability to position itself relative to anything.
Bug: T163269
Change-Id: Ie464e4668001f4bc6151b40cef469937aa8c6e48
New changes:
719f8c667 ve.ce.DocumentNode: toggle all contentEditable properties, not just the outer one
35cadd7db Introduce single-line mode for surfaces
41fe321b2 Restore pointer-events comments for IE10 support
42f556820 Upgrade to jQuery v3
c1b8f142c Pass toolbarConfig position to actions toolbar by default
0d4c6a5fc Fix styling of table context in MW theme
db6eb4ebf Localisation updates from https://translatewiki.net.
Bug: T161944
Bug: T162808
Bug: T162830
Change-Id: I9b11673b4a77b7aebcdc282953d83ade08a8d8bd
This is run after the targetPromise completes (via the platform-agnostic
setDefaultMode proxy), which is the correct time to do so. We should not
do this twice, and we definitely shouldn't do this before the target has
successfully loaded, lest a user ends up with us setting their option to
"prefer" an editor that they actually can't load. Whoops.
Bug: T156316
Change-Id: Icf4b5ddd9c8265ade55f43328f807344b41db350
With precise timing, the lookup menu could appear after the add template
button had been pressed and the user had moved on to the next page.
Bug: T162707
Change-Id: I36941dc7288c6031a0fb189c0946aa6d8f8697e8
We're getting rid of meta item grouping, so we need to prepare.
Merged:
* ve.dm.MWIndexMetaItem
from ve.dm.MWIndexDisableMetaItem and ve.dm.MWIndexForceMetaItem
* ve.dm.MWNewSectionEditMetaItem
from ve.dm.MWNewSectionEditDisableMetaItem and ve.dm.MWNewSectionEditForceMetaItem
* ve.dm.MWTOCMetaItem
from ve.dm.MWTOCDisableMetaItem and ve.dm.MWTOCForceMetaItem
These three now inherit from ve.dm.MWFlaggedMetaItem to avoid code duplication.
Change-Id: Ic8a9cdb1226dccac2c27e7f4b965c1590a7387c0
* Pass a wikitext promise, instead of wikitext
* Handle writing of content to the dialog from within
the dialog.
* Handle diff errors within the dialog.
* Never disable the 'Return to save form' (approve) button
* Remove redundant messages
Change-Id: Ibd76e8951998f751abfb4f407682202c2f73ac7e
New changes:
ae0204885 stylelint: Remove no-unsupported-browser-features overrides
d744cd576 Localisation updates from https://translatewiki.net.
1338c50f5 [BREAKING CHANGE] Remove resize handlers from within DiffElement
Local changes:
Trigger diff element resize on dialog resize
Depends-On: I82a67a4309bf76db5407ea38c26c47d14c01e921
Change-Id: I912a99edca25ff576e2872723f91afe54e36a170
New changes:
dc0cad28c tests: Factor out ve.dm.TestRebaseClient/Server into their own files
98061108b Convert RebaseServer tests to data provider
3e746a51b Update OOjs to v2.0.0
16231a812 [BREAKING CHANGE] Drop support for Internet Explorer 9
64daeb4b5 Localisation updates from https://translatewiki.net.
3310e876c Update DOMPurify to 0.8.5
579033a83 Follow-up 16231a81: Drop IE9 support in createDocumentFromHtmlUsingIframe
Bug: T162277
Change-Id: If17c6a3fac0920db29f80069f344ffd6be46c3c9
This will be required later when we have to fetch the original
document from the server before running a visual diff.
Change-Id: I351688f4d1fec892bc297f40c209939cbb2ccf95
Since the PopupWidget rewrite, margins for aligning popup anchors
should be set on the anchor itself, not on the popup.
Change-Id: If8237ae5edbc2e8c5cb99147f392aae52e642765
The styles are not specific to the Vector and MonoBook skins, but rather
to the MediaWiki and Apex themes of OOjs UI. Rename them to reflect that.
Change-Id: I757e8d96625feb8290cbf7837b5d801961cda344