Skip to content

Conversation

@kean
Copy link
Contributor

@kean kean commented Jan 19, 2026

Fixes CMM-1159: Fix an issue with AdaptiveTabBar .fill distribution.

Changes

Refactors AdaptiveTabBar to automatically select the optimal layout based on available width.

  1. Fill Equally – when all buttons with equal width fit the screen
  2. Fill Proportionally (Full Width) – when all buttons with proportional widths fit the screen
  3. Fill Proportionally (Scrollable) - when buttons can't fit

Additionally:

  • Custom TabButton control replaces UIButton to prevent layout jumping when selection changes font weight
  • Improved accessibility with proper button traits and selected state

Screenshots

Before / After

Screenshot 2026-01-19 at 4 25 59 PM Screenshot 2026-01-19 at 5 23 53 PM

Stats:

Screenshot 2026-01-19 at 5 32 27 PM

Interactions:

Screen.Recording.2026-01-19.at.5.23.58.PM.mov

@kean kean added the General label Jan 19, 2026
@kean kean added this to the 26.7 milestone Jan 19, 2026
@sonarqubecloud
Copy link

@kean kean added the Stats label Jan 19, 2026
@kean kean requested a review from crazytonyli January 19, 2026 22:33
@wpmobilebot
Copy link
Contributor

App Icon📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
App NameWordPress
ConfigurationRelease-Alpha
Build Number30486
VersionPR #25146
Bundle IDorg.wordpress.alpha
Commit08a5b43
Installation URL01331rqc3331o
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@wpmobilebot
Copy link
Contributor

App Icon📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
App NameJetpack
ConfigurationRelease-Alpha
Build Number30486
VersionPR #25146
Bundle IDcom.jetpack.alpha
Commit08a5b43
Installation URL4t0i9j8409a0g
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@wpmobilebot
Copy link
Contributor

🤖 Build Failure Analysis

This build has failures. Claude has analyzed them - check the build annotations for details.

width: ceil(size.width) + contentInsets.leading + contentInsets.trailing + 2,
height: ceil(size.height) + contentInsets.top + contentInsets.bottom
)
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to use auto layout instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there something specific that's wrong with the current implementation? I was also kind of skeptical – it was generated – by it seems to make complete sense. This part is in intrinsicContentSize and it calculates how much space is needed and always based on the .medium font. I don't see how you could use Auto Layout in it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see anything obvious that's wrong. It's just that we don't typically do layout manually, right? It feels like something you'd do 5 years ago?

Base automatically changed from task/jetpack-stats-ads-tab to trunk January 20, 2026 18:54
@kean kean added this pull request to the merge queue Jan 21, 2026
@kean kean removed this pull request from the merge queue due to a manual request Jan 21, 2026
@kean kean added this pull request to the merge queue Jan 23, 2026
Merged via the queue into trunk with commit f9bf54b Jan 23, 2026
32 of 38 checks passed
@kean kean deleted the fix/adaptive-tab-bar-layout branch January 23, 2026 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants