Skip to content

Conversation

@scottkicks
Copy link
Contributor

@scottkicks scottkicks commented Jan 6, 2026

📲 What

When the Floating Tab Bar feature flag is enabled, replace our current tab bar UI with the new Floating Tab Bar.

🤔 Why

We're moving to a new tab bar UI. See figma: https://www.figma.com/design/kTLSpgGAE8N4Ql00LSYqSn/Visioning--Components?node-id=0-1&p=f&m=dev

🛠 How

  • Quick update to the feature flag name
  • Update RootTabBarViewController to use the new FloatingTabBar when FF is enabled
  • Update DiscoverViewController's bottom constraint so that the view extends to the bottom of the screen and the FloatingTabBar can appear to be "floating".
  • Update some colors

👀 See

Keep in mind the new design system colors being used in the Figma designs aren't finalized.
We've agreed to use the closest colors of our current design system for now.
This really only effects the green selection indicator behind the selected tab.

Light Dark
Light Dark

✅ Acceptance criteria

  • Floating Tab Bar is used when feature flag is on
  • Current Tab Bar is used when feature flag is off
  • Floating Tab Bar matches designs and behaves as expected.

⏰ TODO

  • Fix Dynamic Type Support
  • Test how the tab bar updates in the Beta when the FF is toggled on and off

@scottkicks scottkicks self-assigned this Jan 6, 2026
Comment on lines +374 to 382
color: featureFloatingTabBarEnabled() ? .clear : tabBarDeselectedColor
)
let selectedImage = strokedRoundImage(
fromImage: avatar,
size: tabBarAvatarSize,
color: tabBarSelectedColor,
color: featureFloatingTabBarEnabled() ? Colors.FloatingTabBar.profileIconBorderColor
.uiColor() : tabBarSelectedColor,
lineWidth: 2.0
)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sets the border color of the profile image when logged in

@scottkicks
Copy link
Contributor Author

There is a bit of an issue where the tab bar doesn't fully swap out when the feature flag is turned and then the app is reopened after being backgrounded.

It isn't until the app is fully closed and reopened that the tab bar changes correctly. Will need to test how this works on the Beta of course, but just noting it.

@scottkicks scottkicks marked this pull request as ready for review January 6, 2026 17:29
@scottkicks scottkicks requested review from a team and stevestreza-ksr and removed request for a team January 6, 2026 17:29

if featureFloatingTabBarEnabled() {
let customTabBar = FloatingTabBar()
self.setValue(customTabBar, forKey: "tabBar")
Copy link
Contributor

Choose a reason for hiding this comment

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

What's going on here? Can a comment be added as to why this is here if this is necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is how we can replace the UITabBarController’s tab bar with our custom subclass.

UITabBarController has a read-only tabBar property and Apple doesn't provide a public setter or override for it.
UITabBarController also still uses Key-Value Coding internally to assign its tab bar which is why we need "tabBar" as the key.

profileNav.setViewControllers([profileVC, threadsVC, messageThreadVC], animated: true)
}

private func configureFloatingTabBarItems(isLoggedIn: Bool) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Curious why we are reusing tab bar items here, can we just recreate the array here? Don't need to worry about how many items there are in the existing array then.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah I figured reusing the existing tab items keeps all of UIKit’s built in wiring for selection, VC mapping, state, etc. intact. We’re really only changing the visuals here so recreating the items could lead to weird edge cases around controller selection/binding.

I haven't take the time to explore that deeply tbh, but I didn't think that was worth the effort here.

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.

3 participants