Commit graph

3006 commits

Author SHA1 Message Date
jenkins-bot 53ad459b27 Merge "ve.ui.MWMediaDialog: Clean up image metadata display" 2021-12-17 16:42:39 +00:00
jenkins-bot 6dc75d8283 Merge "Remove obsolete performance bottleneck from TransclusionModel" 2021-12-17 13:24:19 +00:00
jenkins-bot 26d22ee4bc Merge "Delay initialization of all invisible "add parameter" components" 2021-12-17 11:52:48 +00:00
jenkins-bot 4a1063e87a Merge "Skip bad suggestedvalues and aliases in the template dialog" 2021-12-17 11:16:21 +00:00
Bartosz Dziewoński 97be4e21ad ve.ui.MWMediaDialog: Clean up image metadata display
* Fix incorrect use of .append() instead of .text() (which was causing
  some l10n messages to be treated as raw HTML)
* Avoid escaping and parsing HTML several times when plain text was
  intended
* Remove some unused options and variables

Follow-up to 839b64d882.

Change-Id: I124257c73fe09713afefccdec8e90200e6ae433d
2021-12-16 01:52:54 +01:00
sbassett 839b64d882 SECURITY: ve.ui.MWMediaDialog: Escape plaintext image metadata fields
CVE-2021-44855

Bug: T293589
Change-Id: I691b4065e67c53c4276599c8d16c31ab5591db3a
2021-12-15 16:14:35 +00:00
Thiemo Kreuz 7cf10ea474 Delay initialization of all invisible "add parameter" components
The "Add parameter" page always starts collapsed. Even if a template
doesn't contain anything but this. But most of the content isn't
visible, unless the user presses the button. It's not only a lot of
content, it's also rather expensive, including .parseDom(),
LinkCache.styleElement(), and ve.targetLinksToNewWindow(). This adds
up in large multi-part transclusions. In an example with 200 parts
the total blocking time goes down from 2.9s to 2.4s. Which means this
is not a major bottleneck, but still worth it.

Bug: T296335
Change-Id: Ieab9fd35d145142b04d2267d8e5a2e10a4c02784
2021-12-15 08:28:16 +00:00
jenkins-bot 6bfd3ab7c0 Merge "Add link to undocumented parameter help" 2021-12-13 13:56:52 +00:00
Thiemo Kreuz 66636e1dd8 Skip bad suggestedvalues and aliases in the template dialog
Bug: T297386
Change-Id: I6456d720c923e8cff9b4500b6cfe52bc6fbc9dad
2021-12-09 16:58:13 +00:00
Thiemo Kreuz 845cd69bf5 Don't scroll to template parameters while the dialog loads
Bug: T296743
Change-Id: Icd501ae89695a202e8c264d1b5e9811e812a56d1
2021-12-09 14:57:20 +01:00
Andrew Kostka 887a01a355 Revert "Hide more button on parameter descriptions for screen readers"
This reverts commit 3e23d78d32.

Bug: T296997
Change-Id: I74a338aa4e8cb7754feaabc348b6c308f7f2eeae
2021-12-09 10:10:53 +01:00
jenkins-bot 39199ae44f Merge "Remove unused CSS from template dialog" 2021-12-07 14:43:51 +00:00
WMDE-Fisch 742aee7f9d Add link to undocumented parameter help
Bug: T284985
Change-Id: Ie5a61beed39aa3572c2a5e82dbc3711fdcd35ba8
2021-12-07 15:12:20 +01:00
Thiemo Kreuz 847ab1800b Remove unused CSS from template dialog
These pieces are only relevant when the new "inlineDescription"
feature is enabled. In other words: This can't have an effect on
the old dialog.

The 2.5em left and right are from an old styling when the
parameter pages have been indented.

Change-Id: I022b0dd94ee66f7de114c055c3f453317a7f6131
2021-12-07 13:57:18 +00:00
jenkins-bot 131f7e940d Merge "Add safe-guard for early template dialog resize events" 2021-12-07 13:08:42 +00:00
Thiemo Kreuz fd669a4d16 Remove obsolete performance bottleneck from TransclusionModel
This sorting algorithm was introduced via Ic6bc348 (T274544). Note
there is no index parameter in the .onReplacePart() handler at this
point. When a part was moved, it was removed and simply appended
to the end. The additional sorting was needed to move it back to the
correct position.

This changed a few days later via Iafe29f1. There is now an index
parameter. The .onReplacePart() handler does the same as before, but
puts the part at the correct position right away. The additional
sorting is pointless since then.

The removed code alone is responsible for 1/3 of the total blocking
time when the template dialog opens.

Bug: T296335
Change-Id: I6c3fa70b532d34cd29d59c3b48ab81ebf608d548
2021-12-06 17:36:53 +00:00
Svantje Lilienthal 65bef19f73 Prepend multipart message in onReplacePart to prevent it from moving around
onReplacePart is being called when templates are being moved up or down. 
To prevent that the multipart message gets moved around passively e.g. 
by one element being added above it, this patch adds it to the top after each movement.

Bug: T292829
Change-Id: I946c9bc4ba5e1d261aefbb28a8c642bb58964842
2021-12-06 13:58:09 +00:00
Svantje Lilienthal a2afdee49f Remove suggested values message for custom inputs
Bug: T296915
Change-Id: Iecd90b02ea5bebceda1e87ddddb43fdb71b91d9e
2021-12-03 15:28:04 +00:00
WMDE-Fisch eef0ce91f7 Parse new link in multipart message
We forgot change the way that message is build while adding the link
in 07f105fd7. Now it gets parsed correctly and the link will open in
a new tab.

Bug: T284985
Change-Id: I1ed9dfdafd08d08c5aff45f4b74c540b35ec14a1
2021-12-03 10:36:44 +00:00
WMDE-Fisch 1467800331 Remove temporary hacks that got fixed upstream
Fixes are part of OOUI v0.42.1

Change-Id: Ic133d6cc503538fb8b4319bed037bc6e8596bd1c
2021-12-02 13:27:40 +01:00
Thiemo Kreuz 35bc600aa9 Fix action icons breaking into multiple lines on narrow screens
This is only relevant with the old design. It's only noticable when
a field shows all 3 action icons: info, raw wikitext mode, and
trashcan. The last icon can wrap to the next line when the screen
is very narrow.

I tried to apply nowrap, but this causes other style issues.

Removing the arbitrary width allows the action container to be
as wide as it needs to be. I can't tell why this restriction was
there. It is in no way necessary, as far as I can see. I can only
guess it's a temporary artifact from when the dialog was designed.

Bug: T296730
Change-Id: I77129ccc3afe002ba697b1787b41d0a388d5f4b8
2021-12-01 14:57:49 +01:00
jenkins-bot 85d64d57bc Merge "Performance: Don't add empty action <div>s to template dialog" 2021-11-30 13:59:53 +00:00
Adam Wight e82eb4832c Cleanups
Split from I280f814e72.  Should have no effect on behavior.

Change-Id: I4a43cbc863c58a4977e8093fa8c1371b56ec9b90
2021-11-30 14:07:32 +01:00
Thiemo Kreuz a40947ed18 Performance: Don't add empty parameter descriptions to dialog
This does have a significant impact on the performance of the
template dialog. Not only on construction time, but also because
MWExpandableContentElement objects do some quite expensive
.updateSize() calculations the moment they become visible.

I profiled a template with (only) 200 undocumented parameters.
Construction time goes down from ~600ms to ~520ms. The mentioned
.updateSize() runtime goes down from ~300ms to ~10ms.

Bug: T296335
Change-Id: I280f814e722b299aae0ec6a5a2fa59292e3e5887
2021-11-30 14:07:11 +01:00
WMDE-Fisch f65eac3d66 Add placeholder for finding a template
Bug: T296465
Change-Id: I07c6e601111073b1269a3ab6c552f83e12196156
2021-11-26 16:30:19 +01:00
WMDE-Fisch bc89f1d8fd Set search icon on template placeholder search
Bug: T296465
Change-Id: I02932821b26c21eb559fdb391054b83d1da41d2a
2021-11-26 14:34:44 +00:00
Thiemo Kreuz b435f02efc Performance: Don't add empty action <div>s to template dialog
This doesn't have much of an impact on performance according to my
profiling. But I think it's worth it nevertheless. The idea is to
skip that <div> entirely when it's empty.

Bug: T296335
Change-Id: Id155725fbc2e3453acc1cdcabfdc2d687285d694
2021-11-23 21:38:19 +00:00
jenkins-bot e6b9a91ee9 Merge "Fix missing Meta+D shortcut on Mac" 2021-11-23 10:32:37 +00:00
Thiemo Kreuz ddaa6a18c1 Fix missing Meta+D shortcut on Mac
I also discovered and applied ways to make this code more compact.

Bug: T294905
Change-Id: I1edc2b3b0a77e02bf8e7ac789cabe007c5f5c527
2021-11-23 10:38:50 +01:00
jenkins-bot 1a4fb339eb Merge "Make better use of the ARIA mixin" 2021-11-22 17:18:51 +00:00
jenkins-bot 2d6cae4684 Merge "Add mw-show-empty-elt to MW surfaces" 2021-11-19 21:06:45 +00:00
jenkins-bot eb26dc10b2 Merge "MWSaveDialog: Fix specificity of margin override for monobook" 2021-11-19 17:25:41 +00:00
jenkins-bot 9f6c431fbd Merge "MWSaveDialog: Move header out of mw-body-content" 2021-11-19 17:25:38 +00:00
jenkins-bot 4c02fb7cef Merge "MWSaveDialog: Move var declarations inline" 2021-11-19 17:23:45 +00:00
Ed Sanders a4ab89648d MWSaveDialog: Fix specificity of margin override for monobook
Change-Id: Ic37d312cf10777dd5e45c0641295b2f2e766acde
2021-11-19 16:55:22 +00:00
Ed Sanders 69e367464f Add mw-show-empty-elt to MW surfaces
Bug: T295984
Depends-On: Ife0e908edc12b2eb04c5f0b4def969ce843606a0
Change-Id: I49a2b5226a770334a05a51c8ea7b835c8c2c574f
2021-11-19 16:08:53 +00:00
jenkins-bot 90643ef6d0 Merge "Prefere ve.extendObject over $.extend" 2021-11-18 21:22:16 +00:00
WMDE-Fisch c1c167a17f Make better use of the ARIA mixin
Bug: T295353
Change-Id: I7ccb1e771516df8198c6e07cbf37e9739bc0ed71
2021-11-18 15:21:47 +00:00
Ed Sanders 86c405a2e1 Prefere ve.extendObject over $.extend
Change-Id: I37fef45701653cef08de9ec699865aa4fdf477bc
2021-11-15 21:30:19 +00:00
jenkins-bot e4f444624d Merge "Only use aria description on multipart transclusions" 2021-11-15 15:34:44 +00:00
jenkins-bot 609f589557 Merge "Move feedback icon to correct position in template dialog" 2021-11-15 14:45:57 +00:00
jenkins-bot b84a6198db Merge "Update shortcut to add a part in the template dialog, take #3" 2021-11-15 14:34:52 +00:00
Thiemo Kreuz 0e1a5379da Move feedback icon to correct position in template dialog
Bug: T294839
Change-Id: Ib1a895735d795e0d38f38952fd8bce6ad3fee50e
2021-11-15 14:04:18 +00:00
WMDE-Fisch 26cab3125d Only use aria description on multipart transclusions
Moving responsibility to the part widget to check if we're in a
single transclusion.

Bug: T295353
Change-Id: I61b7891c04eb729647e2600318a97987fd88cb90
2021-11-15 12:22:12 +01:00
jenkins-bot 1cbeb7c4ac Merge "Move misplaced close button back to standard position" 2021-11-15 08:16:52 +00:00
Ed Sanders 42b5fddf61 MWSaveDialog: Move header out of mw-body-content
Change-Id: I684e3025b97b546a391a64dd647365246e37d36c
2021-11-12 23:00:02 +00:00
Ed Sanders e111c40d09 MWSaveDialog: Move var declarations inline
Change-Id: I163dc057961e8d530ba394dbb92b97e4d866d867
2021-11-12 22:54:52 +00:00
jenkins-bot d8329b36a3 Merge "Minor fixes to floating help dialog in desktop mode" 2021-11-12 16:34:17 +00:00
jenkins-bot d4a25fdbe7 Merge "Use a fullscreen help dialog for templates on mobile" 2021-11-12 16:25:32 +00:00
Thiemo Kreuz 198e62be83 Move misplaced close button back to standard position
In OOUI the close button is always on the left side. See
https://doc.wikimedia.org/oojs-ui/master/demos/?page=dialogs&theme=wikimediaui&direction=ltr&platform=desktop

The CSS hack to move it to the other side doesn't work and must be
removed. You can see the problem the moment the text is longer (which
can easily happen in translated versions).

I tried to come up with a more official way to move the button to the
other side, but gave up. One way is to replace the existing

		flags: [ 'safe', 'close' ]

with:

		flags: [ 'primary', 'close' ],
		framed: false

But this causes other style problems. Let's remove the bogus CSS
first and possibly try again in a later patch.

Bug: T294839
Change-Id: Ia6ddefd99e4a03a87b0450ab94712ff19bb268e4
2021-11-12 16:48:13 +01:00