Commit graph

439 commits

Author SHA1 Message Date
Ed Sanders d42a0772bb Move verbose copyright message to AUTHORS.txt
Avoids having to update the date in every file every year,
which we stopped doing.

Change-Id: I7bf7aa0937eef911e00772470091753a7b06fd3d
2023-12-01 16:07:39 +00:00
Nardog 9b9f2c50b0 Recognize DEFAULTSORT again
Since Parsoid now treats DEFAULTSORT like any other template, we have to
scan mw:Transclusion spans.

Bug: T337398
Change-Id: Icba92fc14c1c56ec4711ba49407e8be368d57842
2023-11-09 21:26:20 +00:00
Bartosz Dziewoński 5667832c1b Attach content to teleport target instead of <body>, remove Vector hacks
In MediaWiki, OO.ui.getTeleportTarget() is overridden to return
a different element (itself attached to body), which is supposed
to be styled appropriately by skins (e.g. z-index above any
floating header, font-size same as body text, etc.).

As a result, we no longer need to do weird things with the
'vector-body' class to achieve correct font size on Vector,
and we can remove some font-size overrides for Vector and MonoBook.

Bug: T348288
Bug: T339058
Change-Id: I6329b3023573b3dcfc8f471c4693be9bb1e9e430
2023-11-06 14:29:12 +00:00
Ed Sanders 1fcf167028 Template dialog: Use wrapping/expanding input for "line" inputs
Bug: T348482
Change-Id: I5cbbd84723c042dee176be8d77a7beec7d86e226
2023-10-26 09:16:24 -05:00
thiemowmde a6a61983c1 Make "add undocumented parameter" hotkey ctrl+shift+d work much better
* Make it always work when there is only a single template anyway, no
  matter if the template is selected or not.
* Auto-expand the widget and focus the input field when it receives
  focus. The only way it can receive focus is via the hotkey. It can
  not be selected from the sidebar.

Bug: T338108
Change-Id: I567a0b99a8ad2e837993437e47f07d62e8b003d2
2023-06-06 17:22:30 +02:00
Ed Sanders 56489cabd0 Follow-up I1a81484: Replace MetaItem#remove with SurfaceFragment#removeMeta in other pages
Change-Id: Ie5c79b2099b5c293534c82ae4ba8a17f801060e9
2023-03-30 16:19:41 +01:00
Ed Sanders 2e492d4de7 Follow-up Id21c122d4: Replace MetaItem#remove with SurfaceFragment#removeMeta
Also fix one typo of 'frament' -> 'fragment'.

Change-Id: I1a814847213c81ecf08af6c40586752c513f7725
2023-03-15 13:10:23 +00:00
Ed Sanders 7954f5897c Update VE core submodule to master (f5142bc0d)
New changes:
1b912ce6b ve.ui.DiffElement: Don't override margin on added/removed block elements
a43720b34 [BREAKING CHANGE] Move ve.dm.MetaList to ve.dm.Document
e7d6d2317 ve.dm.VisualDiff: Include metadata in diff

Local changes:
* Use new ve.dm.MetaList API

Bug: T331925
Change-Id: Id21c122d48519013a5c3325cc4bc316cedcb63f6
2023-03-14 23:07:14 +01:00
Ed Sanders a0b09412af Fix line height in templates used dialog
Bug: T287733
Change-Id: I5a9a9d8d397e255509966001abe069b988478a64
2023-03-13 08:49:02 +00:00
Bartosz Dziewoński 1165a06f47 ve.ui.MWTemplatePage: Use <p> instead of <hr> in the description
I've never liked how this looked, it feels so 1995. Let's just use
multiple paragraphs instead of a <hr> to separate the text, similar to
what we do in ve.ui.MWParameterPage. The second paragraph is already
emphasized with italics.

Change-Id: I324cd1d81e61cf8a23095b4f8aed68040eb1bd8d
2022-12-29 16:14:47 +00:00
Bartosz Dziewoński fe77d35c36 ve.ui.MWTemplatePlaceholderPage: Remove cleanup for old mw.storage entries
Follow-up to 13f5637290.

Change-Id: Iba92f42831839bbf66ecbb8963cbd44e407392db
2022-12-29 16:14:41 +00:00
Bartosz Dziewoński 62d3fc128e Remove unused message 'visualeditor-dialog-transclusion-placeholder'
Unused since e1ea921f76.

Change-Id: I88a51de0ae5583ba52bb3477625879d273150b39
2022-12-29 16:14:35 +00:00
Bartosz Dziewoński 4fb3db27e6 ve.ui.MWTemplatePlaceholderPage: Move label to real label for accessibility
By using OOUI 'label' instead of 'help', the label is associated with
the input using <label for=...> in HTML.

The result looks almost the same, except for font size. I like the
change, and I don't think it was intentional to make the font smaller
here.

Bug: T277028
Change-Id: If178ca8feb9970c9287ab6dfe51fdf0a81df1c45
2022-12-29 12:40:11 +00:00
thiemowmde a8fc627f3c Remove redundant/conflicting ARIA label in template dialog
The ARIA label was added via Ieeb29de. It was reusing an existing
message.

Later we added a placeholder to the same input field via I07c6e60.
Since then screenreaders possibly read two texts: "Find template" and
"Add template".

Bug: T296465
Change-Id: Icb8d5419b4a4e34a224744873c557cb873e17c40
2022-12-22 15:07:24 +01:00
Thiemo Kreuz 299738307e Make "(undocumented parameter)" part of the parameter label
This makes it possible to click on "(undocumented parameter)"
to focus the input field – the same effect as when clicking the
parameter name.

This also lower-cases the initual "(U…". This is not the beginning of
a sentence.

Change-Id: Ibfa5bbaee39c2b3a4fefbcee33102b85ca3ba9c0
2022-08-29 17:00:23 +02:00
jenkins-bot f842d6fa97 Merge "Rename value state variable" 2022-08-05 09:23:08 +00:00
WMDE-Fisch c66e700469 Rename value state variable
Is more intuitive like that.

Change-Id: Ib36d6fa1bce9a564f5b9a1c027f2573a5775d2c5
2022-08-05 10:07:18 +02:00
WMDE-Fisch 6cfa2e7dd0 Fix typos
Change-Id: Iaa7bf09877f32f7c19217103773657a8d8a81d16
2022-08-05 10:00:54 +02:00
Andrew Kostka dc91a39f8b Use the same styling for add template and add parameter buttons
Bug: T314052
Change-Id: I62d4e282b0e8f0a32e37e144db358144224119f1
2022-07-28 16:24:15 +02:00
Adam Wight d77728bd4f Document some classes touched in the sidebar rewrite
Depends-On: I385dca1d95033961d3844e888521750443e49c95
Change-Id: Ic515b41863bcf2ac4daa0272f67e1d30238a4b85
2022-07-12 12:49:31 +02:00
Andrew Kostka d5b8107902 Use "Add template" label in the sidebar and as the header
Bug: T311107
Change-Id: Ib85c08c5d72e621a7687dc393b2f8d9443f13b06
2022-07-06 10:55:43 +00:00
Adam Wight 1653815e8c Rename event to be descriptive, not prescriptive
Events should be named based on what happened, not what the
side-effect will be.

Change-Id: I563db48181e1db79ca22ef2ba1e25d5186976110
2022-07-01 12:42:23 +02:00
Thiemo Kreuz 5077780216 Remove all BookletLayout OutlineItem code
No longer need to manage the connection between outline items and
content pane pages.

Bug: T310866
Change-Id: I8dae7efa18e97ce5e1c84d963f1a32f09dd7e7cb
2022-06-30 05:29:46 +00:00
Thiemo Kreuz 76f563c929 Move .addPromptedParameters() calls to more canonical places
This was done in 3 rather "random" places:
1. Whenever a template is manually added. But rather late, after the
   template was added, in an event handler that is about focus
   behavior. It should not continue to manipulate the template that
   was just added.
2. When the dialog opens with a template preloaded by name, as it is
   done from the citation menu.
3. When the dialog is about to finish loading.

This patch fixes 2 issues:
* Get rid of a duplicate call (number 2 and 3) when using the
  citation menu.
* Move number 1 to a place where it's executed much earlier, and
  only when the user clicks "add template" in a template placeholder.
  There is no other way to add a template to an existing transclusion,
  but it's still a more appropriate place I feel.

Bug: T311069
Change-Id: I8a65ad703b95ba2092e9ef73493e9903e96b0dd6
2022-06-28 08:40:24 +02:00
Thiemo Kreuz 8854d03552 Inline template parameter id to page name connection
It's never used in a different way. A lot of other code depends
heavily on this fact. Let's hard-code it.

Bug: T310859
Change-Id: I65bbaea47341d74b49ce447c896eb2340f730e17
2022-06-23 12:24:08 +02:00
WMDE-Fisch 11f5f6cb59 Remove dead code in MWTemplatePage
Bug: T310859
Change-Id: Ie55d82fb6f3be0b90b8f42aecdd761624b94afca
2022-06-22 00:20:00 +00:00
jenkins-bot 9d3ebeba60 Merge "Remove invisible stuff from BookletLayout OutlineItems" 2022-06-20 10:09:10 +00:00
jenkins-bot db6852c1a5 Merge "Bold parameters that contain some value" 2022-06-20 10:04:57 +00:00
Thiemo Kreuz d5857c20f5 Remove invisible stuff from BookletLayout OutlineItems
Technically the old BookletLayout sidebar is still there. But it's
never visible, effectively dead, and meant to be removed. This patch
just empties the OutlineItems of all template dialog related pages
without actually disabling the old sidebar.

Note this partly reverts Ie57f462.

Bug: T310859
Bug: T310866
Change-Id: Ic0b7d703f369045ed342426563f8eeb3e47046db
2022-06-20 09:31:53 +00:00
jenkins-bot 1962bf6dda Merge "Remove dead code in MWTemplatePlaceholderPage" 2022-06-20 08:53:46 +00:00
WMDE-Fisch 6396b030d5 Remove dead code in MWTemplatePlaceholderPage
Bug: T310859
Change-Id: I04de9c4bd3828e8769136d5776037e927ba7b4ab
2022-06-20 10:30:31 +02:00
jenkins-bot 30bd135a94 Merge "Remove small pieces of dead code from MWParameterPage" 2022-06-20 08:29:38 +00:00
WMDE-Fisch 5dd32ea95d Bold parameters that contain some value
Value changes are triggerd and tracked from the parameter page and
change events will be forwared to the outline, if they are relevant.

Initial value is read from the model.

Bug: T308730
Change-Id: I0a3b0faf40aee44889404dcce31d850714360580
2022-06-20 10:27:59 +02:00
Thiemo Kreuz b53c38f411 Remove small pieces of dead code from MWParameterPage
Small pieces we forgot to remove in Ie57f462.

Bug: T310859
Change-Id: I29afb65456c4a0a6f482fcdd56785bf6232c0470
2022-06-20 09:49:00 +02:00
WMDE-Fisch bf2f40e8d4 Remove dead code in MWTransclusionContentPage
The outline item is only used by the new sidebar for the move and
remove flags it seems.

Bug: T310859
Change-Id: Ia74e5b0e3dbf81e745137b181ed34a4d48dac42c
2022-06-17 16:46:30 +02:00
WMDE-Fisch 3273b7e5bd Remove dead code in MWParameterPage
Parameters do not have an "OutlineItem" anymore so the code for
that was completely removed.

Bug: T310859
Change-Id: Ie57f462b8fda4505b99ee5bc9d788908d18d9c64
2022-06-17 12:25:40 +02:00
Thiemo Kreuz 218ac78960 Remove obsolete "search for a parameter" page and widgets
… as well as messages, CSS, and icons that are now unused.

Bug: T310859
Change-Id: I1a2797728788cf1a86299414c1430ded0b362d4e
2022-06-17 10:23:00 +02:00
Thiemo Kreuz 1a2bb91310 Stop using deprecated "ParameterPlaceholderPage" class name
Removing a class name that's going to be deleted from places where
it's not strictly needed, e.g. comments.

Bug: T307188
Change-Id: Ifb14695d05510d2c0e25623afa99c4e84af3aaf9
2022-06-16 18:09:26 +02:00
Adam Wight 1b4c81c27d Remove $wgVisualEditorTransclusionDialogInlineDescriptions feature flag
The feature is always enabled now.

Bug: T307188
Change-Id: Id8b39d44901dee9118837fc4670d7faa4ef19b43
2022-06-15 12:09:47 +02:00
Adam Wight e1ea921f76 Remove $wgVisualEditorTemplateSearchImprovements feature flag
The feature is always enabled now.

Bug: T307188
Change-Id: I34a3db44355d93413f611b99cd80b876d8737413
2022-06-14 10:48:19 +02:00
WMDE-Fisch 13f5637290 Clean-up users storage after search message removal
I'm more in favor of leaving no garbage behind. The TODO with a date
is a good way of making sure this gets removed eventually.

This could have been part of Ie6eea76. The new code is added to the
same spot where the code removed in Ie6eea76 originally was.

Bug: T296471
Depends-On: Ie6eea76dacdc614ecb910c48e7e1f519b8c69322
Change-Id: Idec63201ff4aa52a0c53c6d007577a93c94e0ec0
2022-06-14 06:59:46 +00:00
jenkins-bot fcf849ddb0 Merge "Remove $wgVisualEditorTransclusionDialogBackButton feature flag" 2022-06-13 08:12:40 +00:00
Adam Wight 2e2e40e76e Remove $wgVisualEditorTransclusionDialogBackButton feature flag
Feature is always enabled now.

Bug: T307188
Change-Id: I70305ec3d2ed9cfb767ee9ea90e8ed6c93cfbdbb
2022-06-10 17:33:56 +02:00
Adam Wight 23f0bdf822 Remove $wgVisualEditorTransclusionDialogSuggestedValues feature flag
Feature is always enabled now.

Bug: T307188
Change-Id: I6f8288d31fecc6827a7a9e5e9705239e15c86ae2
2022-06-10 16:40:06 +02:00
Svantje Lilienthal 58fd0531d9 Remove updated feature message about search
Bug: T296471
Change-Id: Ie6eea76dacdc614ecb910c48e7e1f519b8c69322
2022-06-10 13:13:51 +00: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
jenkins-bot 401da7ee13 Merge "Remove MWDismissibleMessageWidget and use MessageWidget's showClose option instead" 2022-03-17 11:43:33 +00:00
Ed Sanders 1b5550f485 Move var declarations inline
Mostly ve-mw/ui and a few left overs.

Change-Id: Idea0c94d974e661c49af8ad4545cd8fd98179ca8
2022-03-01 17:50:24 +00:00
Thiemo Kreuz 5a92880da5 Fix bad visualization of empty suggested value
Bug: T299430
Change-Id: I9a0d26c7fc88e1a0c2c68152b3e15a9ba7662991
2022-02-28 08:49:08 +01:00
jenkins-bot 839a62829d Merge "Add and fix default values in parameter documentation" 2022-02-21 13:41:51 +00:00