Skip to content

fix(ios): keep bottom triggers clear of the tab bar when it changes - #35

Merged
onurhanavci merged 2 commits into
fix/mobile-sdk-issues-6434-6437from
fix/ios-tab-bar-clearance-refresh
Oct 27, 2026
Merged

onurhanavci merged 2 commits into
fix/mobile-sdk-issues-6434-6437from
fix/ios-tab-bar-clearance-refresh

Conversation

@onurhanavci

Copy link
Copy Markdown
Member

Stacked on #34. Follow-up from the #34 review: the host tab bar was measured once, when the trigger was built.

  • The overlay manager keeps a bottom-docked trigger's bottom constraint and measures the tab bar again on the reuse path (after a host transition in flight, e.g. a push with hidesBottomBarWhenPushed, finishes), on overlay size changes (rotation), and when the widget sheet closes
  • Only moves the trigger when the clearance changed, and marks the layout stale so the next pass applies it
  • Not covered: a bar that changes without any of those (e.g. iOS 26 minimize-on-scroll), and the hide-on-push path, which the example app has no screen for; covered by the unit test only

Test: example app, Shop tab: the card sits 70pt above the tab bar in portrait and in landscape (measured 70.0 / 70.3pt; the stale value left ~76pt in landscape).

#34 measured the host tab bar once, when the trigger was built, so a
trigger that stayed up didn't follow the bar hiding
(hidesBottomBarWhenPushed), coming back, or changing height on rotation.
The overlay manager now keeps the bottom constraint and measures the bar
again on the reuse path (after any host transition in flight finishes),
when the overlay window changes size, and when the widget sheet closes.
A new constant also marks the layout stale; without it the next layout
pass kept the old position.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces dynamic adjustment of the bottom clearance for bottom-docked triggers in PoltioOverlayManager to ensure they correctly clear the host tab bar during rotations, screen transitions, or when the tab bar is hidden/shown. It also adds corresponding unit tests. The review feedback points out a potential issue where coordinator.animate(alongsideTransition:completion:) might return false if the transition is not animated or has already finished, which would prevent the clearance refresh logic from executing. It is recommended to handle this fallback case to guarantee the layout is always updated.

@onurhanavci onurhanavci self-assigned this Oct 27, 2026
@onurhanavci
onurhanavci merged commit 0739fcf into fix/mobile-sdk-issues-6434-6437 Oct 27, 2026
6 checks passed
@onurhanavci
onurhanavci deleted the fix/ios-tab-bar-clearance-refresh branch October 27, 2026 16:03
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.

1 participant