Commit graph

7866 commits

Author SHA1 Message Date
Arlo Breault 2402f430b4 Preserve inline media tag name in galleries across edits
Follow up to I37799076852fa6f062c9d85bcebb15998fb44a80

Hat tip to Bartosz for pointing this out.

Change-Id: Ic2968240a015bac2f831203e586535d2f9574963
2020-12-16 17:28:51 -05:00
WMDE-Fisch 2ce9934ab9 Add tracking of template usage
The names in the schema are roughly following what's
done in Schema:TemplateWizard. The information if
templates have TemplateData will be logged seperatly.

Bug: T259705
Change-Id: Iafa7256f675dbfd6a5a6de794061901780e3c55d
2020-12-16 12:56:45 +01:00
jenkins-bot ac04c9a644 Merge "Switch back to using <span> for gallery images" 2020-12-16 01:01:31 +00:00
jenkins-bot 5783dc75cd Merge "Preserve the passed in inline media tag name in gallery" 2020-12-16 01:01:28 +00:00
jenkins-bot 6029c3565a Merge "Switch back to using <span> for inline images" 2020-12-16 01:01:24 +00:00
Arlo Breault 895274c20b Switch back to using <span> for gallery images
Similar to I74fe96a47d8a4d7717891c16e49f5a4d6599018a

Bug: T266143
Change-Id: I632cff28ec428828d82fcd7cc66e5545c45c2161
2020-12-15 15:43:48 -05:00
Arlo Breault e3daaaf280 Preserve the passed in inline media tag name in gallery
Similar to Ic79aba4d4364227c3ecf7fb5411e90532b531f44

This only works if the gallery goes unedited.  Probably something needs
to be done in ve.ce.MWGalleryImageNode if we care to be complete.

However, as noted in T214648, the DOM diff'er doesn't traverse into
gallery content and notice these element names.  So, it's purely
academic to be doing this anyways.

Bug: T266143
Change-Id: I37799076852fa6f062c9d85bcebb15998fb44a80
2020-12-15 14:42:00 -05:00
WMDE-Fisch 094a9aa044 Replace deprecated doNotIgnoreMissingTitles
This parameter name was deprecated and replaced in 1.31. See also
Ie5fe2097cda45968bb080643d3afcac0b2868a6c

Change-Id: Ie9d6c70d3dfe3954504d3d698c122dceede7603d
2020-12-15 12:52:55 +01:00
Ed Sanders 85a856e016 MWDefinedTransclusionContextItem: Add param getter
Change-Id: I7fdd4810118e72b9719b840fa5e0887006a74a25
2020-12-14 14:29:06 +00:00
Ed Sanders 5e170b63ca Switch back to using <span> for inline images
Bug: T266143
Change-Id: I74fe96a47d8a4d7717891c16e49f5a4d6599018a
2020-12-13 18:02:06 +00:00
jenkins-bot 4974c3a362 Merge "Reset originalDmDocPromise when setting doc" 2020-12-11 18:33:22 +00:00
jenkins-bot 5edd5045aa Merge "MWInlineImageNode: Rename figureInline to container" 2020-12-11 18:29:31 +00:00
jenkins-bot 46a00601a3 Merge "Preserve the passed in inline media tag name" 2020-12-11 16:42:50 +00:00
Ed Sanders eafa3d2861 MWInlineImageNode: Rename figureInline to container
Change-Id: Ieda967dbd26532f44f71b4388e2357e780a381ce
2020-12-11 16:09:42 +00:00
Arlo Breault 6acddba351 Preserve the passed in inline media tag name
Bug: T266143
Change-Id: Ic79aba4d4364227c3ecf7fb5411e90532b531f44
2020-12-10 18:19:35 -05:00
WMDE-Fisch 185875f5ea Update link to TemplateData spec
Change-Id: I656ac283e38540c915c5e38e703caec3e5f6419b
2020-12-10 16:48:33 +01:00
Ed Sanders 069e9c68ed Reset originalDmDocPromise when setting doc
originalDmDocPromise is dervied from target.doc, so if that changes
ensure the promise is cleared.

Change-Id: I51219e06109b0ccf1a17c920131b764862be85e1
2020-12-08 17:28:28 +00:00
jenkins-bot eb9ab46d16 Merge "ve.dm.MWExternalLinkAnnotation: Alienate malformed links" 2020-12-07 14:22:35 +00:00
Bartosz Dziewoński d52097cfdb ve.dm.MWExternalLinkAnnotation: Alienate malformed links
Parsoid sometimes emits malformed links (with no 'rel') when a
misnested <figure-inline> tag is moved around. Converting them to
internal links, and adding the 'rel' attribute, makes the element no
longer match in selser, and causes dirty diffs. Alienate them instead.

Bug: T64473
Bug: T150196
Bug: T267282
Change-Id: Ic7b48eb2e61585445a1fb98dc2b516d3b6da3cc4
2020-12-07 13:56:43 +00:00
jenkins-bot b4c26620e1 Merge "Send EventLogging when adding template parameters" 2020-12-04 17:09:28 +00:00
jenkins-bot 18be32a9dd Merge "Send EventLogging when editing parameter values" 2020-12-04 17:06:22 +00:00
jenkins-bot 4e436dc2ea Merge "Send an event when the template doc link is clicked" 2020-12-04 16:50:49 +00:00
jenkins-bot 2cba844265 Merge "ve.dm.MWInlineImageNode: Alienate malformed figures" 2020-12-03 11:49:46 +00:00
Thiemo Kreuz fb0e33f987 Fix incomplete return in DesktopArticleTarget.tryTeardown()
If a teardown has started, there should be a teardownPromise,
otherwise return a rejected promise.

Bug: T268358
Change-Id: Ia5cbd6b409a38f97243234ea7c87d24f71bdf3d6
2020-12-02 21:22:10 +00:00
Ed Sanders 3e6d5c6817 Remove upstreamed clearfix
Change-Id: I9c5c56bd8a30b96b43fe680bcc8a7151de5f78be
Depends-On: I840ecdf2cfd3f4fba51418199346164fd0c439b6
2020-12-02 21:21:49 +00:00
James D. Forrester 688edf1d64 build: Use "Grade A" rules for stylelint
Change-Id: I54b16407450960fefd5522a25cb733853d2f9372
2020-12-01 08:35:03 -08:00
David Lynch efd2cc0d03 Give revision_id a fallback that'll validate
In the new-page case, wgRevisionId will be 0 so it'll try looking for
parentRevId and the cast-to-int on an undefined will get us NaN. That
fails validation, so we should give one last fallback to 0.

It's _possible_ that we could instead make this an explicit check for
using wgRevisionId if it's anything not-undefined, but I'm not certain
about whether there are cases that wouldn't cover.

Bug: T237063
Change-Id: I8a38c0f3b8f8b2b596f5d0933e1a9e7f1326d7be
2020-11-30 11:17:23 -06:00
jenkins-bot 2b34787241 Merge "Don't block media dialog on initialising upload booklet" 2020-11-26 20:10:47 +00:00
Adam Wight 9925ad3a88 Send EventLogging when editing parameter values
The first edit to a parameter will cause an event to be sent,
subsequent edits to the same parameter will not send an event.

Bug: T258920
Change-Id: Ibe663ce99a8fdf85a5add17186fb44fdbd4176bf
2020-11-26 11:13:14 +01:00
Adam Wight 46dad92e7d Send an event when the template doc link is clicked
Bug: T258920
Change-Id: I579472f2f9a683f63a08abc97f69c080e84bed35
2020-11-26 11:12:20 +01:00
Adam Wight 19723ba681 Send EventLogging when adding template parameters
Record that a parameter was added, and whether it was known or
unknown--whether it's documented the TemplateData.  Note that
`.isParameterKnown` returns true after an unknown parameter is added
to the template, so we need to set up the event early.

Bug: T258920
Change-Id: I5f8d8d06226474160a0a82c2e85a7fa4e22ba8cb
2020-11-26 11:10:48 +01:00
jenkins-bot df622d3b9e Merge "Remove maxLength from new section title in NWE" 2020-11-26 00:03:45 +00:00
Bartosz Dziewoński c49f919d90 Remove maxLength from new section title in NWE
MediaWiki doesn't have such a limitation. This might have been copied
from the edit summary code, which used to be limited to 255 bytes.

Change-Id: I4afe9b1cde0663c47c0c2502b6e32116b912208b
2020-11-26 00:22:36 +01:00
Ed Sanders 6a238b784e stylelint: Remove needless disables
Change-Id: I83c778f1b08b96e6a34068f497c7a72f2887ad4c
2020-11-19 23:38:11 +00:00
James D. Forrester 726e63cca7 build: Upgrade stylelint-config-wikimedia from 0.10.1 to 0.10.3
Change-Id: Idca06a9c5f8e3b1fa7be156613380e1ed99973fd
2020-11-19 23:37:03 +00:00
jenkins-bot f612cb90d5 Merge "ArticleTargetLoader: Add ve.loadModules hook" 2020-11-11 01:37:37 +00:00
Roan Kattouw 4f5c27be09 ArticleTargetLoader: Add ve.loadModules hook
This provides a consistent entry point for registering plugins on both
desktop and mobile, without needing to do strange things if the right
ResourceLoader module hasn't loaded yet.

Without this, registering a plugin module in JS requires ugly code,
and on mobile it wasn't possible at all.

Bug: T267692
Change-Id: Ie2c320c33ec2b064fba4fb45ba62545b9211439a
2020-11-10 23:31:07 +00:00
Bartosz Dziewoński 0337f665af Update reference paste test with "reference" class
Needed by I9d6856f03071c09617b8ae7db938135a3e30fe8e in Cite.

Change-Id: I61a2132f3876e2d9567d985358f51eb51c479813
2020-11-06 18:50:00 +01:00
Bartosz Dziewoński 80691d9404 ve.dm.MWInlineImageNode: Alienate malformed figures
Parsoid sometimes emits empty <figure-inline> tags. We can't edit
that, so alienate them, instead of throwing exceptions.

Bug: T267282
Change-Id: Ie6a659a9137a1c5e82f10e0a51abb5d60f68d43e
2020-11-05 22:47:35 +01:00
jenkins-bot 46678e1d57 Merge "Allow alien extension node encapsulation wrappers to be of various types" 2020-11-05 00:55:37 +00:00
jenkins-bot 098778cada Merge "Tweak alignment of save checkboxes" 2020-11-05 00:40:37 +00:00
jenkins-bot b92f3ac6d7 Merge "[vector modern] VisualEditor margins are tied to Vector variables." 2020-11-05 00:33:25 +00:00
Ed Sanders 5e1e619949 Tweak alignment of save checkboxes
Change-Id: Id48eb28535ecc2decc1f3203ac92237137738f2f
2020-10-27 21:43:53 +00:00
jdlrobson 80415f3b0f Change selector vectorTabs => vector-menu-tabs
the former is no longer present
note: i assume the style is still needed, I have
not tested

Bug: T255718
Change-Id: I4e7851362fc0d64097aeff5ec1535f8fe7480682
2020-10-26 18:17:42 +00:00
Arlo Breault d02c0bbf45 Allow alien extension node encapsulation wrappers to be of various types
Like transclusions, extensions can contain nodes of other types.  This
hasn't been an issue because the legacy parser doesn't generate content
with these annotations.  But, moving forward, as Parsoid becoming
responsible for more extensions.  This is the case for the new ImageMap
implementation.

Matches I95767e466803f0744b6626204a0a3a1514fff174

Change-Id: I6ff81a01207e2734090c626b177e5f4d10bb6d61
2020-10-20 11:44:54 -04:00
jenkins-bot 37cd9d77a3 Merge "Convert ve.init.mw.DesktopArticleTarget.init-vector.css to LESS" 2020-10-15 14:52:15 +00:00
Gergő Tisza de7c6e913b
Avoid undefined in Math.max
Math.max( undefined, x ) is NaN.

Change-Id: I60bde01d4fc6e9a52182753f79232045f48d1f8b
2020-10-14 23:51:02 -07:00
jdlrobson 9954dd0bc4 [vector modern] VisualEditor margins are tied to Vector variables.
Bug: T259331
Bug: T259272
Depends-On: Ibbc6f1905ea384a3d159088e3f5eca947eb6ec08
Change-Id: Ic918e9c4ba580ecc54ef51607ce9698e2461c679
2020-10-14 14:52:32 +01:00
Ed Sanders 6c36e403aa Convert ve.init.mw.DesktopArticleTarget.init-vector.css to LESS
Change-Id: I5e7c56ebf9e68706e8fc39b1bd4bf81be878ffe4
2020-10-14 13:11:48 +01:00
David Lynch cf9d3a29df MWLinkAction: update call to window.open
Bug: T264146
Change-Id: Ie3f91cb0ca281d57976b71045f2b54ec96160068
2020-10-08 18:37:47 +00:00