GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(mobile): add One UI navigation preference on Android by PixPMusic · Pull Request #25758 · pingdotgg/t3code

feat(mobile): add One UI navigation preference on Android #25758

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Sign up for GitHub

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
juliusmarminge merged 9 commits into pingdotgg:main from PixPMusic:feat/samsung-floating-navigation
Oct 27, 2026

Uh oh!

There was an error while loading. Please reload this page.

Merged

feat(mobile): add One UI navigation preference on Android #25758

Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
9 commits
Select commit Hold shift + click to select a range
3cb59de
feat(mobile): add Samsung floating workspace navigation
PixPMusic Oct 27, 2026
47fa780
fix(mobile): align floating navigation and clear thread toasts
PixPMusic Oct 27, 2026
55bd753
feat(mobile): let Android users choose One UI or Material navigation
PixPMusic Oct 27, 2026
e630897
fix(mobile): keep floating navigation width stable and fill cover rows
PixPMusic Oct 27, 2026
ac4e79c
fix(mobile): hide compose behind workspace utility pages
PixPMusic Oct 27, 2026
970d4ee
fix(mobile): keep floating shadows outside the touch layout
PixPMusic Oct 27, 2026
00ad860
fix(mobile): avoid counting the floating list safe area twice
PixPMusic Oct 27, 2026
c798bb7
fix(mobile): align floating controls and preserve sidebar clipping
PixPMusic Oct 27, 2026
4f4f4a4
fix(mobile): share settled pane width with floating compose
PixPMusic Oct 27, 2026
File filter
Filter by extension

Clear filters
Conversations
Failed to load comments.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Jump to
Jump to file
Failed to load files.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Diff view
Diff view
Prev Previous commit
Next Next commit
fix(mobile): keep floating navigation width stable and fill cover rows
  • Loading branch information

Uh oh!

There was an error while loading. Please reload this page.

@PixPMusic
PixPMusic committed Oct 27, 2026
commit e630897ba4d2ea65b70f9c7b592d9594333e4946

Some comments aren't visible on the classic Files Changed page.

There are no files selected for viewing

7 changes: 3 additions & 4 deletions 7 apps/mobile/src/features/home/AndroidHomeFab.android.tsx
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,11 @@ import { updateFabScroll } from "./fab-scroll";
import { useAndroidControlSizing } from "../../components/ui/useAndroidControlSizing";
import { useEnabledNavigationTabs } from "../workspace/navigation-tabs";
import { WorkspaceTabsContext, useWorkspaceTabs } from "../workspace/WorkspaceTabsContext";
import { FLOATING_TABS, floatingTabsMetrics } from "../workspace/floating-workspace-tabs";
import {
useAppearancePreferences,
useAndroidFloatingTabs,
FLOATING_TABS,
floatingTabsMetrics,
} from "../workspace/floating-workspace-tabs";
import { useAppearancePreferences } from "../settings/appearance/AppearancePreferencesProvider";
} from "../settings/appearance/AppearancePreferencesProvider";

export function AndroidHomeFabLayout(props: ComponentProps<typeof SharedAndroidHomeFabLayout>) {
const floatingTabsEnabled = useAndroidFloatingTabs();
Expand Down
2 changes: 1 addition & 1 deletion 2 apps/mobile/src/features/home/ThreadUndoNotice.tsx
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { useAndroidFloatingTabs } from "../settings/appearance/AppearancePreferencesProvider";
import { useState } from "react";
import { useKeyboardState } from "react-native-keyboard-controller";
import { Platform, View } from "react-native";
Expand All @@ -10,7 +11,6 @@ import {
useNativeColumnLayoutMetrics,
} from "../../native/native-layout-metrics";
import { workspaceSearchBottomClearance } from "../workspace/workspace-tabs-state";
import { useAndroidFloatingTabs } from "../workspace/floating-workspace-tabs";
import { useWorkspaceTabs } from "../workspace/WorkspaceTabsContext";
import {
dismissThreadUndoNotice,
Expand Down
15 changes: 9 additions & 6 deletions 15 apps/mobile/src/features/layout/AdaptiveWorkspaceLayout.tsx
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { useAndroidFloatingTabs } from "../settings/appearance/AppearancePreferencesProvider";
import { SafeAreaInsetsContext, useSafeAreaInsets } from "react-native-safe-area-context";
import { AdaptiveWorkspaceContext, useAdaptiveWorkspaceLayout } from "./adaptive-workspace-context";
import { threadSelectionDeferral } from "./deferred-navigation";
Expand Down Expand Up @@ -57,11 +58,7 @@ import {
} from "../keyboard/hardwareKeyboardCommands";
import { useAndroidControlSizing } from "../../components/ui/useAndroidControlSizing";
import { useEnabledNavigationTabs } from "../workspace/navigation-tabs";
import {
useAndroidFloatingTabs,
FLOATING_TABS,
floatingTabsMetrics,
} from "../workspace/floating-workspace-tabs";
import { FLOATING_TABS, floatingTabsMetrics } from "../workspace/floating-workspace-tabs";
import { AndroidHomeFabLayout } from "../home/AndroidHomeFab";
import {
AndroidWorkspaceNavigation,
Expand Down Expand Up @@ -955,7 +952,13 @@ function AdaptiveWorkspaceLayoutContent(
</SafeAreaInsetsContext>
{floatingTabsEnabled &&
(compactAndroidSettings || (layout.usesSplitView && workspacePage)) ? (
<FloatingWorkspaceTabs onNewThread={handleStartNewTask} />
<FloatingWorkspaceTabs
paneWidth={
layout.usesSplitView ? (layout.listPaneWidth ?? undefined) : undefined
}
fillWidth={compactAndroidSettings}
onNewThread={handleStartNewTask}
/>
) : compactAndroidSettings ? (
<AndroidWorkspaceNavigation onNewThread={handleStartNewTask} />
) : null}
Expand Down
5 changes: 5 additions & 0 deletions 5 apps/mobile/src/features/settings/appearance/AppearancePreferencesProvider.tsx
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -390,3 +390,8 @@ export function useAppearancePreferences(): AppearancePreferencesContextValue {
}
return context;
}

export function useAndroidFloatingTabs() {
const { androidNavigationStyle } = useAppearancePreferences();
return Platform.OS === "android" && androidNavigationStyle === "one-ui";
}
11 changes: 5 additions & 6 deletions 11 apps/mobile/src/features/threads/ThreadNavigationSidebar.tsx
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ import { useActiveNewTask } from "../../state/active-new-task";
import { ThreadUndoNotice } from "../home/ThreadUndoNotice";
import { useAndroidControlSizing } from "../../components/ui/useAndroidControlSizing";
import { resolveScratchProjectScopeKey } from "@t3tools/client-runtime/state/project-grouping";
import { useAppearancePreferences } from "../settings/appearance/AppearancePreferencesProvider";
import {
useAppearancePreferences,
useAndroidFloatingTabs,
} from "../settings/appearance/AppearancePreferencesProvider";
import type {
EnvironmentProject,
EnvironmentThreadShell,
Expand All @@ -18,11 +21,7 @@ import { Platform, StyleSheet, TextInput, View } from "react-native";
import { GestureDetector, useNativeGesture } from "react-native-gesture-handler";
import type { SwipeableMethods } from "react-native-gesture-handler/ReanimatedSwipeable";
import { useEnabledNavigationTabs } from "../workspace/navigation-tabs";
import {
useAndroidFloatingTabs,
FLOATING_TABS,
floatingTabsMetrics,
} from "../workspace/floating-workspace-tabs";
import { FLOATING_TABS, floatingTabsMetrics } from "../workspace/floating-workspace-tabs";
import { useSafeAreaInsets } from "react-native-safe-area-context";
import type { SearchBarCommands } from "react-native-screens";

Expand Down
10 changes: 9 additions & 1 deletion 10 apps/mobile/src/features/workspace/AndroidWorkspaceNavigation.android.tsx
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export function AndroidWorkspaceNavigation(props: {
readonly onNewThread: () => void;
readonly rail?: boolean;
readonly floating?: boolean;
readonly fillWidth?: boolean;
readonly paneWidth?: number;
readonly onSelect?: () => void;
/** The rail needs the whole workspace while it widens over the list. */
Expand All @@ -84,7 +85,13 @@ export function AndroidWorkspaceNavigation(props: {
const rail = Boolean(props.rail);
const floating = !rail && Boolean(props.floating);
const tabs = [...visibleNavigationTabs(order, hidden, rail ? 5 : 4), "settings"];
const metrics = floatingTabsMetrics(tabs.length, scale, fabSize, props.paneWidth ?? window.width);
const metrics = floatingTabsMetrics(
tabs.length,
scale,
fabSize,
props.paneWidth ?? window.width,
props.fillWidth,
);
const { containerColor, indicatorColor, selectedColor, unselectedColor } =
androidWorkspaceNavigationColors(colors, rail, floating);
const selectedTab = selectedNavigationTab(
Expand Down Expand Up @@ -159,6 +166,7 @@ export function AndroidWorkspaceNavigation(props: {
}

export function FloatingWorkspaceTabs(props: {
readonly fillWidth?: boolean;
readonly onNewThread: () => void;
readonly paneWidth?: number;
readonly onSelect?: () => void;
Expand Down
2 changes: 2 additions & 0 deletions 2 apps/mobile/src/features/workspace/AndroidWorkspaceNavigation.tsx
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ export function AndroidWorkspaceNavigation(_props: {
readonly onNewThread: () => void;
readonly rail?: boolean;
readonly floating?: boolean;
readonly fillWidth?: boolean;
readonly paneWidth?: number;
readonly onSelect?: () => void;
readonly onOverlayChange?: (overlay: boolean) => void;
Expand All @@ -12,6 +13,7 @@ export function AndroidWorkspaceNavigation(_props: {
export const ANDROID_WORKSPACE_RAIL_WIDTH = 72;

export function FloatingWorkspaceTabs(_props: {
readonly fillWidth?: boolean;
readonly onNewThread: () => void;
readonly paneWidth?: number;
readonly onSelect?: () => void;
Expand Down
7 changes: 2 additions & 5 deletions 7 apps/mobile/src/features/workspace/AndroidWorkspaceSidebar.android.tsx
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
import { useAndroidFloatingTabs } from "../settings/appearance/AppearancePreferencesProvider";
import { WorkspaceNoTabs } from "./WorkspaceNoTabs";
import { useEnabledNavigationTabs } from "./navigation-tabs";
import { NAVIGATION_TAB_ORDER } from "./navigation-tab-order";
import { useMemo, type ReactNode } from "react";
import { useSafeAreaInsets } from "react-native-safe-area-context";
import { useAndroidControlSizing } from "../../components/ui/useAndroidControlSizing";
import {
useAndroidFloatingTabs,
FLOATING_TABS,
floatingTabsMetrics,
} from "./floating-workspace-tabs";
import { FLOATING_TABS, floatingTabsMetrics } from "./floating-workspace-tabs";
import { View } from "react-native";
import { ScreenContent } from "../../components/ui/ScreenContent";
import { PullRequestsScreen } from "../pull-requests/PullRequestsScreen";
Expand Down
9 changes: 3 additions & 6 deletions 9 apps/mobile/src/features/workspace/WorkspaceRootScreen.android.tsx
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { useAndroidFloatingTabs } from "../settings/appearance/AppearancePreferencesProvider";
import { WorkspaceNoTabs } from "./WorkspaceNoTabs";
import { useEnabledNavigationTabs } from "./navigation-tabs";
import { NAVIGATION_TAB_ORDER } from "./navigation-tab-order";
Expand All @@ -15,11 +16,7 @@ import { PullRequestsScreen } from "../pull-requests/PullRequestsScreen";
import { PullRequestToolbar } from "../pull-requests/PullRequestToolbar.android";
import { useAdaptiveWorkspaceLayout } from "../layout/AdaptiveWorkspaceLayout";
import { AndroidWorkspaceNavigation, FloatingWorkspaceTabs } from "./AndroidWorkspaceNavigation";
import {
useAndroidFloatingTabs,
FLOATING_TABS,
floatingTabsMetrics,
} from "./floating-workspace-tabs";
import { FLOATING_TABS, floatingTabsMetrics } from "./floating-workspace-tabs";
import { WorkspaceTabsContext, useWorkspaceTabs } from "./WorkspaceTabsContext";
import { WorkspaceTabPanes } from "./WorkspaceTabPanes";
import type { WorkspaceTab } from "./workspace-tabs-state";
Expand Down Expand Up @@ -129,7 +126,7 @@ export function WorkspaceRootScreen() {
)}
</SafeAreaInsetsContext>
{floatingTabsEnabled ? (
<FloatingWorkspaceTabs onNewThread={startNewTask} />
<FloatingWorkspaceTabs fillWidth onNewThread={startNewTask} />
) : (
<AndroidWorkspaceNavigation onNewThread={startNewTask} />
)}
Expand Down
22 changes: 22 additions & 0 deletions 22 apps/mobile/src/features/workspace/floating-workspace-tabs.test.ts
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { expect, it } from "vite-plus/test";

import { floatingTabsMetrics } from "./floating-workspace-tabs";
import { resolveAndroidNavigationStyle } from "../../lib/androidNavigationStyle";

it.each([
Expand All @@ -17,3 +18,24 @@ it.each([
expect(resolveAndroidNavigationStyle(preference, manufacturer, preview)).toBe(expected);
},
);

it.each([
[475, 1, 56],
[411, 1, 56],
[475, 1.25, 70],
] as const)(
"fills a %sdp cover row at scale %s with a %sdp compose button",
(width, scale, fabSize) => {
const metrics = floatingTabsMetrics(4, scale, fabSize, width, true);
expect(metrics.sharesRow).toBe(true);
expect(metrics.pill + 2 * 16 + 12 + fabSize).toBe(width);
expect(metrics.height).toBe(fabSize);
},
);

it("stacks compose above a full-width pill when a cover row is too narrow", () => {
const metrics = floatingTabsMetrics(4, 1, 56, 300, true);
expect(metrics.sharesRow).toBe(false);
expect(metrics.pill).toBe(268);
expect(metrics.fabOffset).toBe(68);
});
12 changes: 3 additions & 9 deletions 12 apps/mobile/src/features/workspace/floating-workspace-tabs.ts
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
import { Platform } from "react-native";
import { useAppearancePreferences } from "../settings/appearance/AppearancePreferencesProvider";

export function useAndroidFloatingTabs() {
const { androidNavigationStyle } = useAppearancePreferences();
return Platform.OS === "android" && androidNavigationStyle === "one-ui";
}

// Native shadows need room inside the Expo view, which clips its children.
export const FLOATING_TABS = { edge: 16, gap: 12, shadow: 8 };

Expand All @@ -14,6 +6,7 @@ export function floatingTabsMetrics(
scale: number,
fabSize: number,
paneWidth?: number,
fillWidth = false,
) {
const unit = Math.max(1, scale);
const height = fabSize;
Expand All @@ -27,7 +20,8 @@ export function floatingTabsMetrics(
? paneWidth - beside
: paneWidth - 2 * FLOATING_TABS.edge;
return {
pill: Math.min(count * 72 * unit, Math.max(0, room)),
// Reserve the compose slot even while its button is hidden.
pill: Math.max(0, fillWidth ? room : Math.min(count * 72 * unit, room)),
height,
row,
sharesRow,
Expand Down
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
You are visitor 01402809 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.