Commit graph

17507 commits

Author SHA1 Message Date
WMDE-Fisch 407ff95597 Rename OutlineParameterCheckboxWidget to OutlineParameterCheckboxLayout
This not really just a checkbox widget anymore it inherits from
FieldLayout and became something more in that direction.

Let's use a mixture of these things to make it a bit clearer.

See also comment in Ie81b84be288553343017c4aaf8691c4e266995f5

Change-Id: Iff1746a8e5e94b56eb6c27465405aaf6b74c2310
2021-06-21 09:08:54 +02:00
jenkins-bot 4761ed3b15 Merge "Add missing newline in JSDoc" 2021-06-18 14:30:54 +00:00
jenkins-bot f7726e17e0 Merge "Function to get all potential template parameters, in order" 2021-06-18 13:30:38 +00:00
jenkins-bot 107014ccce Merge "Tests for MWTemplateModel parameter ordering" 2021-06-18 13:00:30 +00:00
WMDE-Fisch 0e04315c66 Add missing newline in JSDoc
Change-Id: I88f5814e3691f4787a04ac8c882a4c836d786bd7
2021-06-18 14:13:31 +02:00
Adam Wight c3c91275ce Function to get all potential template parameters, in order
Splits out a useful intermediate calculation from getOrderedParameterNames,
exposing the full list of parameters including those that are not
present in the transclusion.

This will be used to build the sidebar checkbox list.

Bug: T274545
Change-Id: I1c6a9ea8a5e9a163751fee87f974f63c72fd1f61
2021-06-18 13:43:19 +02:00
Adam Wight 9e1c76f0fc Tests for MWTemplateModel parameter ordering
Documents existing logic.

Bug: T274545
Change-Id: Iebcbdb186862060724d29b36112b2d262112c4c8
2021-06-18 13:43:15 +02:00
jenkins-bot 853fb2710f Merge "Add missing word wrapping to template/param descriptions" 2021-06-18 09:23:32 +00:00
jenkins-bot 595b3a1caf Merge "Better variable names for the template dialog's "single" mode" 2021-06-18 08:34:54 +00:00
Translation updater bot 3d9a316adf Localisation updates from https://translatewiki.net.
Change-Id: Ife24b109ef81051c35ba1826622fcdf662a26eb5
2021-06-18 08:21:25 +02:00
jenkins-bot 841bcd1b54 Merge "Remove unused .onAddParameterBeforeLoad() method" 2021-06-18 01:06:28 +00:00
Thiemo Kreuz 2bdda88ee2 Small documentation updates in transclusion model classes
Bug: T284895
Change-Id: I9cc02518f279b9f165447427b0313bd179085c22
2021-06-17 18:33:06 +02:00
Thiemo Kreuz 2a1defc26f Remove unused .onAddParameterBeforeLoad() method
https://codesearch.wmcloud.org/search/?q=onAddParameterBeforeLoad&i=1

Bug: T284895
Change-Id: Ib521e05d8def8514ffe1b3c3822f0151ab10932e
2021-06-17 18:30:02 +02:00
Thiemo Kreuz bba592460d Better variable names for the template dialog's "single" mode
The "mode" button is the button that allows to expand and
collapse the dialog. It can't be collapsed when multiple
templates are edited. That's what these lines do,
disabling the button.

"Can expand" is not the correct question. It's always
possible to expand the dialog no matter what it contains.

Bug: T284895
Change-Id: I60f3060695c80bf5541ef2156be89b85a62bf91b
2021-06-17 18:24:17 +02:00
jenkins-bot e9411fb71c Merge "Template dialog checkbox list" 2021-06-17 09:15:11 +00:00
jenkins-bot f6f3dfa54e Merge "Make use of Array.some() in a few places" 2021-06-17 08:52:54 +00:00
Adam Wight 988cda65dd Template dialog checkbox list
Introduces new widgets forming the backbone of the experimental
template dialog sidebar.

FIXME: `text-overflow: ellipsis` is not working yet, the container
styles need adjustment.

Bug: T274543
Change-Id: Ie81b84be288553343017c4aaf8691c4e266995f5
2021-06-17 08:47:47 +00:00
jenkins-bot 4e126871f0 Merge "Add tooltip to "dismissible message" close button" 2021-06-17 07:16:54 +00:00
Translation updater bot 204fa2c00f Localisation updates from https://translatewiki.net.
Change-Id: I247911e098bf982f24ebf955b0874a960bf784ce
2021-06-17 08:21:07 +02:00
Thiemo Kreuz d9596c7f20 Add tooltip to "dismissible message" close button
Bug: T284742
Change-Id: Ibf0cb23c44d440e7a986bc85120f4ea0f844d999
2021-06-17 07:57:10 +02:00
Thiemo Kreuz 6da5b9269b Add missing word wrapping to template/param descriptions
Both the template description as well as the parameter
description (including default value and examples) typically
contain longer texts. These can contain longer words that
"explode" the design. This is trivial to avoid.

Note this is not meant to fix this issue in all places where
it can appear. For example, a long parameter name causes the
same issue. But:
* Technically, it's not that easy to fix.
* Even if, it's not obvious how to fix it. Cut off the
  container? Add ellipsis? Or wrap? How should the
  surounding stuff float then?
This is all left out because of this. Focus on what's
obvious.

Bug: T284890
Change-Id: Id6700af168f5ab5ddde97d3f5ae63829b65a3be5
2021-06-16 14:31:35 +02:00
jenkins-bot 8b64e54149 Merge "Fix bad parameter ID "…/undefined" on placeholders" 2021-06-16 12:28:12 +00:00
jenkins-bot 6d101fb9d7 Merge "Extract "show all" to placeholder class" 2021-06-16 12:25:55 +00:00
jenkins-bot ab47e5ff9a Merge "Small code cleanups for the MWDismissibleMessageWidget" 2021-06-16 11:11:47 +00:00
jenkins-bot 2a74f10909 Merge "Dismissible feedback message for the template search" 2021-06-16 11:02:50 +00:00
Thiemo Kreuz feb902aba0 Small code cleanups for the MWDismissibleMessageWidget
* Re-focus the input field after closing the message.
* Store only the message key. That's all that's needed.
* Avoid a class property that's not needed.
* Use the config object instead of calling .setLabel() manually.

Bug: T284742
Change-Id: If8e8bb6460fa5aea8ddd46c2e27b5f08b7772896
2021-06-16 10:32:08 +02:00
Andrew Kostka 13d1c4d2ac Dismissible feedback message for the template search
Bug: T284742
Change-Id: I5dc32521b899c3c9d35d1bf77d346384e4cc87e6
2021-06-16 10:03:04 +02:00
jenkins-bot 09933c4905 Merge "Method for getting the currently selected element" 2021-06-16 07:22:28 +00:00
Thiemo Kreuz 50fbddb459 Fix bad parameter ID "…/undefined" on placeholders
This currently conflicts with parameters that are actually
called "undefined".

Bug: T285002
Change-Id: I8078f51971c7e2a335dae497c3fc3c827684640c
2021-06-15 15:33:44 +00:00
jenkins-bot 4c7f5ff805 Merge "Introduce a new class to encapsulate booklet inter-pane wiring" 2021-06-15 14:55:16 +00:00
Adam Wight 950a5300dc Extract "show all" to placeholder class
We can skip all the up and down message passing by persisting the
parameter placeholders for each template dialog.  If the parameter
list is expanded then the placeholder is deleted, on being created
again it will still have state.

To test: create a transclusion with two templates, each having many
parameters.  "Add more information" to add parameters, expand the
list by clicking "Show <num> more fields", then delete the parameter
placeholder using the trash cans.  Try different permutations to fool
the cache or collide with another template.

This is preparation for other template sidebar dialog work.

Bug: T284636
Change-Id: I23bdd38b173114c2a9afafc7465c4beb92d25869
2021-06-14 18:09:26 +02:00
jenkins-bot 8ee1c0f66e Merge "Remove @param/@return docs that literally repeat the code" 2021-06-14 14:42:38 +00:00
jenkins-bot 5674921e0e Merge "Update VE core submodule to master (fec141b51)" 2021-06-14 13:57:46 +00:00
Thiemo Kreuz c2017f74b2 Remove @param/@return docs that literally repeat the code
These don't add any knowledge but make the code harder to read
and maintain, and are an additional source of errors.

Change-Id: Ied57741a3f985e355adfddb4e75378d5c497faa9
2021-06-14 15:44:51 +02:00
jenkins-bot 1030601543 Merge "Remove docs that repeat what the code already says" 2021-06-14 13:38:30 +00:00
Bartosz Dziewoński 0da437efd3 Update VE core submodule to master (fec141b51)
New changes:
6b37c819f ve.dm files: Move var declarations inline
5a4b7aa99 ve.dm.LinearData: Move var statements inline
ebf53dc0c ve.dm.annotations/nodes/selections: Move var statements inline
fec141b51 Remove @param/@return docs that literally repeat the code

Change-Id: Iabe5db5bf493d666f9737baaca35072578155a6f
2021-06-14 15:36:11 +02:00
jenkins-bot c29dc420e0 Merge "Fix object vs. array initialization in template search" 2021-06-14 13:25:30 +00:00
jenkins-bot 38a8ebac34 Merge "Use term "wikitext" when working with TempWikitextEditorWidget" 2021-06-14 08:50:51 +00:00
jenkins-bot 3f4cfb0fd8 Merge "Rename "value" to "wikitext" in TransclusionContent… classes" 2021-06-11 14:10:24 +00:00
WMDE-Fisch 950a689063 Move suggestedvalues-warning to match alphabetical order
Change-Id: Id79223b63cc88d5e61f43d1b07afe380b9faf85a
2021-06-11 13:20:31 +02:00
WMDE-Fisch 09d98669df Rename expand and collapse button msg key names
These are currently more confusing than helpfull. Also applied
alphabetical order.

Change-Id: I4d48f7bc28b403142a5818d1c7a062872afc660d
2021-06-11 13:16:44 +02:00
Translation updater bot 0f858a9f7c Localisation updates from https://translatewiki.net.
Change-Id: Ia4d1f225bdfe6d069aa54b10e5d752ffe035c3de
2021-06-11 08:34:36 +02:00
James D. Forrester 92f1829f01 Update VE core submodule to master (59f813e80)
New changes:
3a987ff96 ve.init.Target: Simplify toolbar keyboard handling code
526c58b4d TableAction: Rewrite getTableSelectionFromSelection to be model only
4b11e5763 TableAction: Increase test coverage
da352029a Remove hardcoded surface placeholder text "placeholder"
d85f87f6f Localisation updates from https://translatewiki.net.
6e6bda1ec ve.ui: Move var statements inline
37e5474c1 Avoid exceptions if node teardown happens before setup
01d85e95a ve.init files: Move var statements inline

Bug: T280180
Change-Id: I5e5700d3bc0af364773dbf49c797cfcf871c745f
2021-06-10 14:17:43 -07:00
jenkins-bot 7ca81e991b Merge "Use a new tab when linking to the project page for feedback" 2021-06-10 16:13:31 +00:00
jenkins-bot 76196703b2 Merge "Add message linking to project page for feedback" 2021-06-10 15:49:55 +00:00
Adam Wight a2daf5f6c6 Method for getting the currently selected element
Continue refactoring booklet pane access.

Bug: T284632
Change-Id: I866f8550d269d05b40eaddf8abb4ed5be03f902d
2021-06-10 15:32:07 +02:00
Adam Wight 44035a2384 Introduce a new class to encapsulate booklet inter-pane wiring
Begin to extract the wiring between a sidebar and the content pane of
the template dialog booklet layout.  Eventually, this helper class
will present a high-level interface like "addPart(id)" and will take
care of creating the outline item, content page, and connecting
events.

Start very simple, take over the "focus" method.

Bug: T284632
Change-Id: I7bc73cc4386b99d95941fc6ed88ab5bd998de014
2021-06-10 15:30:51 +02:00
Thiemo Kreuz df419335bb Rename MWTransclusionDialog.setMode() to toggleSidebar()
This reflects better what the method actually does. This patch
is a direct follow-up for the renames started in Ib029fd4.

Change-Id: Ie3e87139a5c2f5ac196e0fcc02fb897fadc99177
2021-06-10 14:05:40 +02:00
Andrew Kostka 0c310d03d3 Use a new tab when linking to the project page for feedback
Bug: T284560
Change-Id: I13e7461299ccd1a584e0f661a5506e7b52b8fe4b
2021-06-10 13:06:35 +02:00
WMDE-Fisch ecf317e0bd Fix message keys to show options in template dialog
The names of the messages keys are very confusing. The order was set
wrong during refactoring in Ib029fd48b393d2ab7d7cff6c842789e22989e944.

We should rename the keys in a follow up in sync with translatewiki.

Bug: T284649
Change-Id: I43794d80b7df7d00441cb583ca53bcab03999e65
2021-06-10 10:50:40 +00:00