StarCitizenWiki / mediawiki-extensions-EmbedVideo

GDPR focused EmbedVideo. Supports YouTube, Twitch, Spotify and SoundCloud
https://www.mediawiki.org/wiki/Extension:EmbedVideo_(fork)
Other
27 stars 15 forks source link

Packed style galleries destroy embed #95

Open betta7776 opened 2 months ago

betta7776 commented 2 months ago

Describe the bug When a gallery is set to mode=packed, and no height is defined, embedded videos get smashed into a width of only a few pixels. Normal images work with no height is defined.

To Reproduce Steps to reproduce the behavior:

  1. Go to a wiki page such as https://helldivers.wiki.gg/wiki/Clapping
  2. Add the following code to the page:
    <gallery mode="packed">
    Clapping Victory Pose Icon.png|Victory Pose Icon
    Clapping.png|In-Game Victory Pose Representation
    Clapping.mp4|In-Game Victory Pose Video
    </gallery>
  3. Show Preview
  4. See error

Expected behavior The embed should be visible even with no height defined.

Screenshots mode="packed" heights="241px" widths="241px": image

mode="packed" heights="241px", no width defined: image

mode="packed" widths="241px", no height defined: image

mode="packed", no width or height defined: image

Technical information:

Additional context Also not sure that height is correct when width and height are both defined.

alistair3149 commented 2 months ago

Page with the issue: https://helldivers.wiki.gg/index.php?title=Clapping&oldid=38062 Something weird is going on. The EmbedVideo content has the width 640px and height 320px defined, but the gallerybox from MediaWiki core is not respecting that. We probably have to do a deep dive into MW core to see what is going on with the gallerybox parsing.

@octfx It might be quite time consuming and hack to implement a fix for the legacy parser while the gallerybox have already moved to Parsoid completely since MW 1.41. I don't have a timeline of fixing this, perhaps maybe you can take a look?