Skip to content

Add back search tab detachment if Explore is the last tab - #2524

Open
jadetheda wants to merge 1 commit into
Dimillian:mainfrom
jadetheda:patch/conditional-search-tab-role
Open

jadetheda wants to merge 1 commit into
Dimillian:mainfrom
jadetheda:patch/conditional-search-tab-role

Conversation

@jadetheda

Copy link
Copy Markdown
Contributor

PR #2508 removed role: .search from compact tabs to prevent iOS 18+ from forcibly reordering the Explore tab to the end of the bar when placed earlier in custom user tab configurations.

However, this also prevented Explore from rendering as a detached FAB when users deliberately position it at the end.

Solution: We conditionally assign role: .search only when iosTabs.tabs.last == .explore, falling back to role: .none otherwise. This preserves custom tab ordering when Explore is in slots 1–4 while restoring the detached search button when placed last.

This is great for me, cuz I really prefer this look.

Behold:
Search in the middle, attached
Search at the end, detached

PR Dimillian#2508 removed `role: .search` from compact tabs to prevent iOS 18
from forcibly reordering the Explore tab to the end of the bar when placed
earlier in custom user tab configurations.

However, this also prevented Explore from rendering as the detached floating
action button when users deliberately position it at the end.

Conditionally assign `role: .search` only when `iosTabs.tabs.last == .explore`,
falling back to `role: .none` otherwise. This preserves custom tab ordering
when Explore is in slots 1–4 while restoring the detached search button when
placed last.
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