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

Fix issue where disabling TabberNeueEnableAnimation didn't actually work #165

Closed jayktaylor closed 1 month ago

jayktaylor commented 1 month ago

Setting $wgTabberNeueEnableAnimation = false; doesn't actually do anything in the current version of TabberNeue.

This is because shouldShowAnimation() is checking whether the user has not enabled reduced motion or config.enableAnimation is not true. The second condition check is short-circuited because the first (effectively whether reduced motion is NOT enabled) is true, so the function always returns true.

Instead, we should check whether reduced motion is not enabled and whether config.enableAnimation is true.

alistair3149 commented 1 month ago

Thanks for the PR and merged! You're right that it was indeed short circuited, probably a missed oversight from the refactor.