Skip to content

Hide indicators wrapper when empty

Justin Reese requested to merge 121-hide-indicators into main

Prior to this change, we always generated a wrapper DIV to contain MediaWiki indicators, even when there were no indicators. Consequently, the layout could be thrown off by the visible margins of this otherwise invisible (empty) element: https://code.librehq.com/ots/clients/lfc/torque-tracker/-/issues/121

This change adds a check for the existence and non-emptiness of the indicator array and only renders the wrapper if there are indicators.

Testing:

  1. Load Explore on main
  2. The right edge of the Explore interface shouldn't be aligned with the right edge of the Favorite icon/button
  3. Change to this branch and reload
  4. Now the right edges should be aligned
  5. Additional test: Load a page that does have indicators and make sure the element still renders. (I don't know how!)

Closes https://code.librehq.com/ots/clients/lfc/torque-tracker/-/issues/121

Merge request reports

Loading