Skip to content

feat(toolbox/native): add platform-specific toolbar thresholds for iOS and Android#17187

Open
iospro wants to merge 1 commit intojitsi:masterfrom
iospro:feat/add-platform-specific-toolbar-thresholds-for-iOS-and-Android
Open

feat(toolbox/native): add platform-specific toolbar thresholds for iOS and Android#17187
iospro wants to merge 1 commit intojitsi:masterfrom
iospro:feat/add-platform-specific-toolbar-thresholds-for-iOS-and-Android

Conversation

@iospro
Copy link
Contributor

@iospro iospro commented Mar 22, 2026

Summary

  • Added separate toolbar button thresholds for iOS (IOS_THRESHOLDS) and Android (ANDROID_THRESHOLDS) based on real device screen widths
  • Middleware now selects the correct threshold set at runtime via Platform.OS
  • Disabled auto-promotion of a single overflow menu button into the main toolbar
  • NATIVE_THRESHOLDS kept as an alias to IOS_THRESHOLDS for Redux initial state compatibility

Changes

File Details
toolbox/constants.ts Added IOS_THRESHOLDS (428, 375) and ANDROID_THRESHOLDS (412, 360); NATIVE_THRESHOLDS aliased to IOS_THRESHOLDS
toolbox/middleware.native.ts Added Platform.OS check to dispatch platform-specific thresholds on config load
toolbox/functions.native.ts Disabled single-button overflow promotion logic

iOS breakpoints (points)

Width Devices
500+ 8 buttons (screensharing visible)
428 iPhone Pro Max
375 iPhone SE / 8
320 fallback

Android breakpoints (dp)

Width Devices
500+ 8 buttons (screensharing visible)
412 Pixel 7, Galaxy S24+
360 Samsung A-series, mid-range
320 fallback

Why disable single-button overflow promotion

The original logic automatically moved a button from the overflow menu into the main toolbar when only one button remained in overflow. This caused unpredictable toolbar layout: the "More" button would disappear and a random button would appear in its place depending on which features were enabled. With explicit per-platform thresholds the button sets are already carefully defined — auto-promotion contradicts that intention and produces inconsistent UX across devices and configurations.

@jitsi-jenkins
Copy link

Hi, thanks for your contribution!
If you haven't already done so, could you please make sure you sign our CLA (https://jitsi.org/icla for individuals and https://jitsi.org/ccla for corporations)? We would unfortunately be unable to merge your patch unless we have that piece :(.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants