StarCitizenTools / mediawiki-extensions-TabberNeue

A MediaWiki extension that allows wiki to create tabs.
https://www.mediawiki.org/wiki/Extension:TabberNeue
GNU General Public License v3.0
10 stars 15 forks source link

Height of tabber body is wrong when used with Navbox state=collapsed #137

Closed csalinezh closed 3 months ago

csalinezh commented 3 months ago

A wiki I use put <tabber> inside {{navbox}}. One of the navbox that has state=collapsed slightly breaks after the rewrite in https://github.com/StarCitizenTools/mediawiki-extensions-TabberNeue/commit/bb110c6d982f250c914818e6899272798ca0944d (v2.1.0): Only the header of tabber (<header class="tabber__header">) appear after clicking the "[show]" link of navbox. The body part (<section class="tabber__section">) is not visible because it gets style="height: 0px;". The body shows up after clicking any tab link in the header.

The direct cause is the container of navbox content bears display: none when it's collapsed. Therefore its children do not have layout info when TabberNeue initialized at: https://github.com/StarCitizenTools/mediawiki-extensions-TabberNeue/blob/82328dbeca60576b611c24d3c74d33566c18d682/modules/ext.tabberNeue/ext.tabberNeue.js#L136

I'm not sure if it's a use case that should be supported. Nevertheless it should count as a regression.