Last week, `nativeGalleryEnabled` was enabled in production https://gerrit.wikimedia.org/r/c/operations/mediawiki-config/+/889257
Running rt testing this week reported a number semantic differences when serializing from html instead of from data-mw,
https://parsoid-rt-tests.wikimedia.org/regressions/between/eced3e2/798eef3b
Note that selser will prevent any dirtying for unedited galleries and galleries edited by VE would drop the data-mw properties so there's no change to production. This is just about reporting during roundtrip testing but might yield some issues worth fixing.
---
`|thumb` media option dropped
ex. https://parsoid-rt-tests.wikimedia.org/resultFlagNew/eced3e2/798eef3b/jawiki/%E5%A4%A7%E5%88%86%E7%A9%BA%E6%B8%AF
This was known in T214601 and felt fine to normalize away since it isn't a valid media option in galleries. It seems like we can do better than the patch that was merged for that by having another argument to `renderMedia` that prevents other formats from rendering (first one wins T305628),
https://github.com/wikimedia/mediawiki-services-parsoid/blob/master/src/Ext/ParsoidExtensionAPI.php#L938-L946
In any case, the reason this is classified as a semantic difference is that the `alt` attribute on the `img` is suppressed for thumbs and not for plain floated images because the caption is visible for thumbs.
---
From https://parsoid-rt-tests.wikimedia.org/resultFlagNew/eced3e2/798eef3b/enwiki/MESSENGER_probe
```
------
ages of the spacecraft">
File:MESSENGER - Sonda.png|alt=Diagram of ''MESSENGER''|Diagram of ''MESSENGER''.
File:MESSENGER - installa
++++++
ages of the spacecraft">
File:MESSENGER - Sonda.png|alt=Diagram of MESSENGER|Diagram of ''MESSENGER''.
File:MESSENGER - installa
```
Here `|alt` formatting is lost. This can probably be fixed by T252246. The alt attribute is text though so the normalization seems fine.
The reason this is classified as a semantic difference is because the formatting in an attribute forces an `mw:ExpandedAttrs` typeof, which isn't there after roundtripping.
---
From https://parsoid-rt-tests.wikimedia.org/resultFlagNew/eced3e2/798eef3b/frwiki/Cormery
This seems to be because we're trimming the alt for the purpose of comparison with the caption but then using that for serialization. Should be fixable.
```
------
="packed" heights="150">
Cormery moulin6.jpg|alt= photograpgie en noir et blanc d'un bâtiment au dessus d'une rivière|<center>Moulin avant l'incendie de 1908.</center>
Cormery moulin3.jpg|alt=P
++++++
="packed" heights="150">
Cormery moulin6.jpg|alt=photograpgie en noir et blanc d'un bâtiment au dessus d'une rivière|<center>Moulin avant l'incendie de 1908.</center>
Cormery moulin3.jpg|alt=P
```
---
From https://parsoid-rt-tests.wikimedia.org/resultFlagNew/eced3e2/798eef3b/frwiki/Citro%D1%91n
The difference here seems to be that `WTUtils::textContentFromCaption` needs to strip non-breaking spaces before doing the comparison with the alt. Other entities probably need checking as well.
```
------
ains et ruraux|AMTUIR]].
Fichier:Citroën Type 23 - Coupe Florio 2013 (avant).jpg|thumb|Citroën Type 23.
Fichier:Belfégor.JPG|Camion Citroën type [[Citroën Belphégor|Belphégor]] 600 de 1966 : Poids vide : 4,610 T, PTAC 10,300 T.
</gallery>
==== Concept
++++++
ains et ruraux|AMTUIR]].
Fichier:Citroën Type 23 - Coupe Florio 2013 (avant).jpg|Citroën Type 23.
Fichier:Belfégor.JPG|alt=Camion Citroën type Belphégor 600 de 1966 : Poids vide : 4,610 T, PTAC 10,300 T.|Camion Citroën type [[Citroën Belphégor|Belphégor]] 600 de 1966 : Poids vide : 4,610 T, PTAC 10,300 T.
</gallery>
```
---
From https://parsoid-rt-tests.wikimedia.org/resultFlagNew/eced3e2/798eef3b/hewiki/%D7%A1%D7%A4%D7%A8%D7%98%D7%A7_%D7%9E%D7%95%D7%A1%D7%A7%D7%91%D7%94_(%D7%9B%D7%93%D7%95%D7%A8%D7%92%D7%9C)
Similar to thumb above, dimensions are dropped but, considering T305628, the gallery implementation should be updated to add its dimension last so that they are assured to be selected.
```
------
חק נגד צסק"א, עונת 2008.
קובץ:Spartak-Dinamo (7).jpg|250px|אוהד ספרטק — אוטו פישר, בן ה-102.
קובץ:Fratria perf.jpg|ארג
++++++
חק נגד צסק"א, עונת 2008.
קובץ:Spartak-Dinamo (7).jpg|אוהד ספרטק — אוטו פישר, בן ה-102.
קובץ:Fratria perf.jpg|ארג
```
---
On a few pages, media options like `upright`, `thumbtime`, `left`, etc. are dropped. Those are captured in T214603 / T275074
From https://parsoid-rt-tests.wikimedia.org/resultFlagNew/eced3e2/798eef3b/nlwiki/1952
```
------
[[Lineair B]].
<gallery>
Voorschip van de War Diwan bij Vlissingen gelicht.ogv|thumbtime=0:52|Bioscoopjournaal uit mei 1952: In 1944 zonk de Engelse tanker "War Diwan" tgv een mijnontploffing in het water van de Wielingen bij Vlissingen. Het schip brak daarbij in tweeën. Het voorschip wordt nu gelicht door met perslucht het water uit het wrak te blazen zodat het weer gaat drijven. Deze nieuwe manier van schepen lichten is bedacht door de Nederlandse ingenieur W. Van Wienen die zelf leiding geeft aan het gebeuren.
++++++
[[Lineair B]].
<gallery>
Voorschip van de War Diwan bij Vlissingen gelicht.ogv|Bioscoopjournaal uit mei 1952: In 1944 zonk de Engelse tanker "War Diwan" tgv een mijnontploffing in het water van de Wielingen bij Vlissingen. Het schip brak daarbij in tweeën. Het voorschip wordt nu gelicht door met perslucht het water uit het wrak te blazen zodat het weer gaat drijven. Deze nieuwe manier van schepen lichten is bedacht door de Nederlandse ingenieur W. Van Wienen die zelf leiding geeft aan het gebeuren.
```
---
Keep going ...