Commit graph

137 commits

Author SHA1 Message Date
Ed Sanders e9b29e7714 Messages: Remove 'visualeditor-donebutton-tooltip'
This was removed from the code a while ago when we switched
to a single toolbar on mobile.

Change-Id: Ic2a807bd8e17a692ad3a6974bbb3028fa1d2d434
2022-05-18 01:06:45 +01:00
Amir E. Aharoni 66cfaa8ba4 Rephrase messages about changes that will be lost
Make the two related messages the same, and more
grammatically logical and clear.

Change-Id: I30752a28626945e6ca974a726cb10a1022a8c820
2022-05-10 15:56:40 +03:00
jenkins-bot 0e77a51898 Merge "Stop hide unused label from overflowing" 2022-04-29 08:45:20 +00:00
WMDE-Fisch 4377893297 Stop hide unused label from overflowing
Will implicitly set a max width for the button due to the margin.
Long words will break in the middle of the word.

Also includes a shorter label.

Bug: T300008
Change-Id: I37505af8383d8c0c2bd4af3987ec5e2a3049688a
2022-04-29 10:26:20 +02:00
WMDE-Fisch d996288169 Move message about missing parameters to sidebar
Will be removed when parameters are added. Needs different margins
depending on beeing shown in the single transclusion mode without
header or on multiple transclusions.

Bug: T300710
Change-Id: Ieb95d7276aa4d4b0fcbb74f87ab734e4a393dc21
2022-04-29 10:03:23 +02:00
Adam Wight 9922e1c61e Use natural language rather than the brand name
Bug: T306283
Change-Id: I6dcf99d6997d8272ede4e07f0783efa374be59fb
2022-04-27 15:10:07 +02:00
Ed Sanders c9046685fa eslint: Lint all files except those in .eslintignore
Fix resulting errors (mostly useless escape in i18n files).

Change-Id: Id29c6aecece75d4a462bddb7e547ca5b4eb5c2db
2022-04-13 15:44:49 +01:00
Ed Sanders 699899c8c4 i18n: Remove unused "VisualEditor" tab messages
Hasn't been used in years, and we no longer use the CamelCase product name.

Change-Id: I8bda918a9db3ac7bf683dc6115af7a89d04ab9b7
2022-04-13 15:43:43 +01:00
Ed Sanders 2fa21ebcdb Use "Author" in media dialog
"Author" is used on Commons and in various places in
MultimediaViewer. Artist is not used in these places.

Bug: T267501
Change-Id: Iccd2d926537a7d4147e6cc8b5c2c9c1ecf4d6b27
2022-03-19 22:22:00 +00:00
jenkins-bot 401da7ee13 Merge "Remove MWDismissibleMessageWidget and use MessageWidget's showClose option instead" 2022-03-17 11:43:33 +00:00
jenkins-bot 3424cf9c86 Merge "Improve messages about duplicate template parameters" 2022-03-14 13:19:59 +00:00
WMDE-Fisch 99a251c8e6 Add section fragment to keyboard help link
Bug: T302004
Change-Id: I656f4b4826c8528e304b387f762aef35ec6404b2
2022-02-28 13:33:57 +01:00
Thiemo Kreuz 0b47a8c85b Improve messages about duplicate template parameters
There are some combinations that can result in a message that is
more confusing than helpful. For example, when a parameter is
already in a template, but via an alias, that alias is potentially
shown in the sidebar (only when the parameter doesn't have a
label). When the user enters the primary name of this parameter,
the message talks about a "duplicate", but the user can't
understand what this duplicate is.

Just make all messages repeat the parameter's label as shown in
the sidebar. This is often redundant, but sometimes crucial
information.

This patch also improves the qqq.json documentation. All messages
get 2 parameters, even if some of them use only 1.

Bug: T285869
Bug: T291059
Change-Id: I826e341cebd8f89dba63d64de67baba1ec8f2001
2022-02-21 17:35:47 +01:00
Ed Sanders b0e32c22fa Remove MWDismissibleMessageWidget and use MessageWidget's showClose option instead
This option was added in 0.43.0. Now that the close button is handled,
the remaining functionality (store a flag in local storage, and fixing
link targets) doesn't really justify a separate class, especially as
it's currently only used once.

Change-Id: I0fd81cadccc077dbf957302f9f41409c5a1f4f20
2022-02-03 16:37:52 +00:00
jenkins-bot 9ec8a68891 Merge "Link to a list of keyboard shortcuts from the template help dialog" 2022-01-21 18:28:30 +00:00
Andrew Kostka eaa438abcb Link to a list of keyboard shortcuts from the template help dialog
Bug: T299487
Change-Id: Ieef99eeb9c43817981e2ae5b5340a58c2aca4920
2022-01-21 17:24:34 +01:00
WMDE-Fisch cede096333 Update accept button in confirmation dialog
The only places where this dialog is used now will have the same
button labels and format. We want to use "normal" destructive here
so no additional "primary" styling.

It seems that the focus on the action will only be applied
automatically when it is primary. So extra code is needed.

Bug: T299647
Change-Id: Ib5250b79e85d27ea197b83c6380863d0749e5d89
2022-01-21 15:32:58 +00:00
Andrew Kostka d4fff29148 Update the context menu title for multipart templates
Bug: T299495
Change-Id: I082a4e925c15ba5966a575127046e33f2fc3f62a
2022-01-21 11:51:31 +01:00
Thiemo Kreuz 33a2f21589 Disable edit button while loading template dialog
Bug: T297773
Change-Id: I51fc0af4c3b29fd0801fc06a1dc07ad3fd7f1da3
2022-01-18 12:29:27 +00:00
jenkins-bot 2819958a8a Merge "Add button to sidebar to hide/show unused fields" 2022-01-14 11:35:19 +00:00
WMDE-Fisch 20435b319c Add button to sidebar to hide/show unused fields
Bug: T298259
Change-Id: I8e5091b97dfb19eba981b2a919b82b6f14823990
2022-01-14 11:09:04 +00:00
Adam Wight 7264e2ee42 Change confirmation-reject text for consistency
Use the same language as the core `mw-widgets-abandonedit-keep`
message.

Bug: T297792
Change-Id: I64f72bbd3a7656b0b677856f0bbd3cb4b342a614
2022-01-13 10:59:21 +01:00
Adam Wight 587ba4c662 Confirm before closing template dialog
Reuse the back button confirmation dialog for the close button.  The
condition is slightly different: need confirmation if there are any
manually-entered values for any parameter AND the user has edited
the template in this session.

The "reset" action was synthetic, only used internally and not
connected to buttons or menus.  Canonically, action='' is the close
action for OOUI.

Bug: T297792
Change-Id: I4ff644c7ab24ed9ba1a4c27d762563c5d6771cfc
2022-01-12 10:47:21 +01:00
Adam Wight cbe2fd634f Replace confirmation overlay with a popup dialog
Currently, the insert template dialog includes a back button in the
upper corner.  Confirmation of abandoning unsaved changes was
accomplished in an overlay panel.  This patch rewrites as a dialog
and updates the on-screen text.

Bug: T297792
Change-Id: Ifa2ff97c9284609ee2a784f455789c56a762ba50
2022-01-11 18:37:29 +01:00
WMDE-Fisch 742aee7f9d Add link to undocumented parameter help
Bug: T284985
Change-Id: Ie5a61beed39aa3572c2a5e82dbc3711fdcd35ba8
2021-12-07 15:12:20 +01:00
Svantje Lilienthal a2afdee49f Remove suggested values message for custom inputs
Bug: T296915
Change-Id: Iecd90b02ea5bebceda1e87ddddb43fdb71b91d9e
2021-12-03 15:28:04 +00:00
jenkins-bot efcc1a6742 Merge "Add links to documentation in help messages" 2021-12-01 10:52:51 +00:00
WMDE-Fisch 07f105fd76 Add links to documentation in help messages
This also updates all links to include [[Special:MyLanguage]].

Bug: T284985
Change-Id: Id5fb43c87a9458fd00524508f063fb1e7fc558a0
2021-12-01 10:02:00 +00: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 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
Andrew Kostka 72641151e4 Implement floating help dialog for templates
Bug: T294839
Change-Id: Id224b61bd0cd57f5e970ab62db2d82dab1db9252
2021-11-09 15:28:23 +01:00
jenkins-bot f223046fc8 Merge "Introducing a mixin for ARIA descriptions on parameter selection" 2021-11-01 15:56:51 +00:00
WMDE-Fisch f9fda0594f Introducing a mixin for ARIA descriptions on parameter selection
Allows setting aria labels and descriptions on elements in a
convinient way. I did not use the the .mixin. convention here for
because there's already another mixin in that folder that's also
not having .mixin. as part of its name. And then there's also no
no need to open up that extra namespace here.

If we move this upstream at some point this can be changed though.

Bug: T291284
Change-Id: I1b3d40400d539f851f13719e16ced200968a7f92
2021-11-01 13:20:00 +01:00
WMDE-Fisch dab5b5daae Add ARIA descriptions to sidebar widgets
When changing the source in the described-by attributes the screen
reader will read the text of the new source when the status changes.

Just changing the text within the elements holding the descriptions
does not work.

Bug: T291284
Change-Id: I31cc3061cf6c1f699babe41e99e0711f0eb03646
2021-10-29 12:07:53 +02:00
jenkins-bot 4de710ca71 Merge "Add a11y label to sidebar parameter selection" 2021-10-22 11:51:44 +00:00
jenkins-bot 9a0d34aeae Merge "Add title to sidebar search" 2021-10-22 11:34:04 +00:00
WMDE-Fisch 6e7332193b Add title to sidebar search
Also to improve screen reader a11y.

Bug: T291284
Change-Id: Ib56d3ee542cb880edd7788ff524a72436e102627
2021-10-22 12:34:57 +02:00
WMDE-Fisch 79f1270593 Add a11y label to sidebar parameter selection
Bug: T291284
Change-Id: I581800d2c92c06c3585ac48be0242860f476022b
2021-10-22 12:31:24 +02:00
Isabelle Hurbain-Palatin 3a3437007a Handle annotation tags as nodes rather than metaitems.
Preserve the place of annotation meta tags; adds information for the
users about annotation and, if necessary, annotation range extension.
The messages and individual handling of annotations for the annotation
range can be defined by the extensions: see I0b58a418 for an example
of how that can look like.

The structure of this patch closely follows the one from I104e7abbd
(handling of <noinclude> et al.).

Bug: T261181
Change-Id: I39029e4a63d22b37107edec066006557bcff34bf
2021-10-21 10:39:04 +02:00
Thiemo Kreuz bebecdc812 Refine wording of "template name with subst/syntax" message
As discussed in T290140. This should be the final bit to close
T290140.

Bug: T290140
Change-Id: I337e4a8806e05db534874f1514e6429b93588133
2021-09-28 10:33:18 +02:00
Thiemo Kreuz 224cc9ab12 Consolidate messages about missing/bad templates
This is mostly re-arranging existing code. Actual changes made:
* Remove the message that claims a template can't exist. We can't
  really know this.
* Instead show the message about "modifiers" in cases where curly
  braces and other wikitext syntax is involved.

Bug: T290140
Change-Id: I713d7f54cad2510f9a02c113600980cba8c3e58b
2021-09-22 10:12:16 +02:00
Andrew Kostka 7165efd491 Improve messaging for when a template is not found
Bug: T290140
Change-Id: Ie43c7e2bd72ed92a8a336f6d87a54e6d51cc3f17
2021-09-17 13:39:11 +02:00
Andrew Kostka a38338259d Improve input validation for the add parameter page
This patch improves the error handling for when a user tries to add
a parameter which is either an alias of a existing parameter, the
primary name of a existing aliased parameter, or a name/alias of an
existing parameter which is shown with an override label.

The error message was modified to always refer to the conflicting
parameter using the same name that is has in the sidebar.

Example: A parameter named "Parameter B" is already present in the
sidebar under its alias "B". When a user tries to add "Parameter B",
the new error message will inform the user that the parameter they
are trying to add already exists as "B".

Bug: T285869
Change-Id: I762b72b6cf14eb8ff5fcef63b4dcb70e297050de
2021-09-13 16:58:11 +02:00
Andrew Kostka 4c0666fd19 Don't allow users to add parameters that contain forbidden chars
Bug: T285869
Change-Id: I1011949c2724939f3cec1e1a2ae1c821c33eff84
2021-09-09 11:43:49 +02:00
Andrew Kostka 075ca72fe8 Add input validation to the add parameter page
Bug: T285869
Change-Id: Iebb982e95aa19bd61fcda915981d505cc243c4b2
2021-09-09 11:42:53 +02:00
Adam Wight d8dcc89fa0 Update template dialog help messages
* New help text for the case where TemplateData is present, whether
  or not it includes a description.
* Remove help text when TemplateData is missing.

Bug: T288465
Change-Id: I0668ccae8eeb5ffffc626e3b7d24c1d7ed99bbed
2021-09-02 14:24:35 +02:00
WMDE-Fisch 1673f9f8bf Add notes and warning for missing parameter documentation
Bug: T276574
Change-Id: Iba0dd661ccdfd6cbb13aef7e8ace25995ecf0cf8
2021-09-01 17:29:25 +02:00
WMDE-Fisch 14d3e8144c Text improvements for unkown parameter input
- Change description text according to ticket
- Make sure link to template page opens in new tab
- Add missing placeholder text

Bug: T272487
Change-Id: Ie8189e9cb9db5908e8fc5fc8bf7ff20df5595094
2021-08-31 14:57:24 +02:00
Thiemo Kreuz c8536f1a71 Remove unnecessary title parsing from template related code
There are 2 situations:

1. Either the template name is used in a [[…]] link. In this case
we must provide the namespace. MWTemplateModel.getTitle() does
this. However, it's not a mw.Title object and therefor not really
guaranteed to be a valid title. This is fine. The worst thing
that can happen is that the link points to an error message.
But this should be entirely unreachable anyway.

2. Some messages want to display the name of the template.
Ideally without the namespace. That's what
MWTemplateSpecModel.getLabel() is for. Again this is not
guaranteed to be a valid mw.Title. But it doesn't need to. It's
only used as a label.

Change-Id: I03d0481201620a2f5c444ee32b656bcaade98aac
2021-08-26 15:58:15 +02:00
jenkins-bot 6c33cc4a35 Merge "Add message on multipart content" 2021-08-26 07:34:15 +00:00