mediawiki-extensions-Visual.../modules/ve-mw/ui/dialogs
Bartosz Dziewoński 86f2057c81 Always generate empty wrapper paragraph inside image captions (slugs begone!)
While all of the following are valid in the model:

1. <mwBlockImage></mwBlockImage>
   Image with no caption. Must use the media dialog to insert one.
2. <mwBlockImage><mwImageCaption></mwImageCaption></mwBlockImage>
   Image with empty caption. There is a slug to insert a paragraph.
3. <mwBlockImage><mwImageCaption><paragraph></paragraph></mwImageCaption></mwBlockImage>
   Image with caption with empty paragraph. Nice and intuitive!

(Same for <mwGalleryImage> / <mwGalleryImageCaption>.)

The third option is the most convenient for the user. We should always
generate that when converting documents from HTML and from the editing
tools (MWGalleryDialog, MWMediaDialog/MWImageModel).

Previously, the editing tools generated option 2 if no caption text
was entered, and the converter generated option 2 if there was no
caption node or if it was empty. Curiously, option 1 was never used.

Wikitext for manual testing:

```
[[File:Foo.png|thumb]]
[[File:Foo.png|thumb|]]
[[File:Foo.png|thumb|Caption]]

<gallery mode="packed">
File:Foo.png
File:Foo.png|
File:Foo.png|Caption
</gallery>
```

Bug: T200387
Change-Id: Ie82fb339f6bd8ae1b289235bf5402490722d9a7c
2018-08-01 05:40:57 +02:00
..
ve.ui.MWCancelConfirmDialog.js Remove unused static overrides from dialog 2018-03-26 15:49:04 +01:00
ve.ui.MWCommandHelpDialog.js
ve.ui.MWExtensionDialog.js
ve.ui.MWExtensionPreviewDialog.js
ve.ui.MWGalleryDialog.js Always generate empty wrapper paragraph inside image captions (slugs begone!) 2018-08-01 05:40:57 +02:00
ve.ui.MWMediaDialog.js ve.ui.MWMediaDialog: Fix confusion between #getSetupProcess and #getReadyProcess 2018-07-18 06:30:46 +02:00
ve.ui.MWMetaDialog.js Fix confusion between #getSetupProcess and #getReadyProcess 2018-07-11 23:47:55 +02:00
ve.ui.MWMobileSaveDialog.js
ve.ui.MWPreDialog.js
ve.ui.MWRequiredParamBlankConfirmDialog.js *Dialog: Drop verbose option, ignored since v0.20.0 2018-03-26 08:55:03 -07:00
ve.ui.MWSaveDialog.js Fix window target when opening feedbackUrl 2018-07-03 17:36:35 +01:00
ve.ui.MWTableDialog.js
ve.ui.MWTemplateDialog.js ve.ui.MWTemplateDialog: Prevent focus changes in the setup process 2018-07-19 01:43:31 +02:00
ve.ui.MWTransclusionDialog.js Fix confusion between #getSetupProcess and #getReadyProcess 2018-07-11 23:47:55 +02:00
ve.ui.MWWikitextConvertConfirmDialog.js Use WindowAction to open the wikitext paste dialog 2018-06-13 13:28:15 +01:00
ve.ui.MWWikitextSwitchConfirmDialog.js *Dialog: Don't set to small size, which is the default 2018-03-26 15:02:11 -07:00