Page MenuHomePhabricator

Tabs not all the same size on iPad mini
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • Open tabs on iPad mini, some without images and some with ("List of ...articles usually don't have images)
  • Open tabs overview

What happens?:

  • Tabs are not uniform in size

What should have happened instead?:

  • Tabs are uniform in size, regardless of image

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):
iPad mini (Not able to reproduce on iPad Pro 12.9 or iPhone)
7.7.6 (260)

Other information (browser name/version, screenshots, etc.):

image.png (2×1 px, 933 KB)

QA Notes

Can be tested in TestFlight Wikipedia 7.8.3

Event Timeline

Seddon moved this task from Needs Triage to Bug Backlog on the Wikipedia-iOS-App-Backlog board.

I figured out what's causing the issue. This line tells each tab's view that it should have an aspect ratio of 3/4, and that works fine on every single device *except* iPad mini.

So why does this only impact the one device? When we determine the size for the tab's image, every iPad gets an image height of 160. But this is slightly too tall for the iPad mini to maintain a 3/4 aspect ratio, and as a result tabs with images are forced to be taller, breaking the ratio. The "List of" tabs show the bug because they tend not to have images and can always maintain 3/4 (as an aside, isLandscape doesn't actually tell us whether or not the iPad is rotated - the images always get a height of 160).

You can actually see in the below screenshot that this means there's more variation than just photo vs no photo tabs. The "List of Spongebob Characters" tab similarly has to stretch its view, but not as far as the others because there's no subtitle. The main page tab has different padding than the standard tabs so it also stretches to its own extent.

Main tab padding before [iPad mini].png (2×1 px, 1 MB)

To test the theory I changed the ipad image height from 160 to 200 and lo and behold, the 11-inch iPad Air which previously looked fine now has the same size variation that we see on the mini:

Simulator Screenshot - iPad Air 11-inch (M3) - 2025-09-08 at 11.52.04.png (2×1 px, 790 KB)

Some fix options

  1. Reduce the image height for all iPads just enough that this is no longer an issue on the mini. Easiest to implement, but potentially will break again if a more narrow iPad is introduced to the lineup.
  2. Check the available screen size and reduce image height if the width is smaller than a predetermined threshold. The fix then sustains for possible smaller screens, but doesn't guard against changes to the fixed height content below the photos. For example if the subtitle font size is increased, a second line of article text is added for image tabs, etc.

I'll attach a diff for option 1 because it's dead simple, but happy to revise with something a little more sophisticated if desired.

A third option:

I can fix the code that's expecting to be told when iPad is portrait orientation (which currently doesn't work due to GeometryReader being wrapped in a Group and ScrollViewProxy), and modify the number of columns to be 3 across when in portrait orientation. That'll let us maintain the existing height for all current devices, is least likely to break from future changes or future device sizes, and will fix the feature to behave the way it was intended.

https://github.com/wikimedia/wikipedia-ios/blob/db0e34eee7cacfdd7160f9a4877331128ab92ca3/WMFComponents/Sources/WMFComponents/Components/Article%20Tabs/WMFArticleTabsViewModel.swift#L130-L134

ABorbaWMF subscribed.

Looks good on 7.8.3 (5840)

Tested on iPhone 16 on iOS 26 and iPad Pro 12.9 on iOS 26. Tested with tabs with and without images, and with different article title lengths.