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 — fix(mobile): align floating controls and preserve sidebar clipping · pingdotgg/t3code@f6ec3a0

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • apps/mobile/src/features
    • home
      • AndroidHomeFab.android.tsx
    • layout
      • AdaptiveWorkspaceLayout.tsx
    • threads
      • ThreadComposer.tsx
      • ThreadNavigationSidebar.tsx
    • workspace
      • AndroidWorkspaceNavigation.android.tsx
      • AndroidWorkspaceSidebar.android.tsx
      • WorkspaceRootScreen.android.tsx
      • floating-workspace-tabs.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎apps/mobile/src/features/home/AndroidHomeFab.android.tsx‎

Copy file name to clipboardExpand all lines: apps/mobile/src/features/home/AndroidHomeFab.android.tsx
+6-2Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ export function AndroidHomeFabLayout(props: ComponentProps<typeof SharedAndroidH
3737
const workspace = useWorkspaceTabs();
3838
const bottomClearance =
3939
insets.bottom +
40-
2 * FLOATING_TABS.edge +
40+
FLOATING_TABS.bottom +
41+
FLOATING_TABS.edge +
4142
Math.max(floating.height, floating.fabOffset + fabSize);
4243
const context = useMemo(
4344
() => (floatingTabsEnabled && workspace ? { ...workspace, bottomClearance } : workspace),
@@ -74,7 +75,10 @@ export function AndroidHomeFabLayout(props: ComponentProps<typeof SharedAndroidH
7475
className="absolute"
7576
style={
7677
floatingTabsEnabled
77-
? { right: 16, bottom: insets.bottom + 16 + floating.fabOffset }
78+
? {
79+
right: FLOATING_TABS.edge,
80+
bottom: insets.bottom + FLOATING_TABS.bottom + floating.fabOffset,
81+
}
7882
: androidHomeFabPosition(insets.bottom, props.sidebar)
7983
}
8084
/>
Collapse file

‎apps/mobile/src/features/layout/AdaptiveWorkspaceLayout.tsx‎

Copy file name to clipboardExpand all lines: apps/mobile/src/features/layout/AdaptiveWorkspaceLayout.tsx
+8-3Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -747,7 +747,10 @@ function AdaptiveWorkspaceLayoutContent(
747747
}));
748748
const sidebarAnimatedStyle = useAnimatedStyle(() => ({
749749
// Fading a UIKit glass ancestor can leave remounted header effects missing.
750-
opacity: Platform.OS === "ios" ? 1 : Math.min(1, renderedSidebarWidth.value / 80),
750+
opacity:
751+
Platform.OS === "ios" || floatingTabsEnabled
752+
? 1
753+
: Math.min(1, renderedSidebarWidth.value / 80),
751754
width: renderedSidebarWidth.value,
752755
}));
753756

@@ -894,7 +897,8 @@ function AdaptiveWorkspaceLayoutContent(
894897
</AndroidHomeFabLayout>
895898
</AndroidWorkspaceSidebar>
896899
</RenderErrorBoundary>
897-
{floatingTabsEnabled && !workspacePage && panes.primarySidebarVisible ? (
900+
{/* Keep the pill under the content throughout the sidebar's clipping animation. */}
901+
{floatingTabsEnabled && !workspacePage ? (
898902
<FloatingWorkspaceTabs
899903
paneWidth={layout.listPaneWidth}
900904
onNewThread={handleStartNewTask}
@@ -944,7 +948,8 @@ function AdaptiveWorkspaceLayoutContent(
944948
...safeAreaInsets,
945949
bottom:
946950
safeAreaInsets.bottom +
947-
2 * FLOATING_TABS.edge +
951+
FLOATING_TABS.bottom +
952+
FLOATING_TABS.edge +
948953
floatingTabs.height,
949954
}
950955
: compactAndroidSettings
Collapse file

‎apps/mobile/src/features/threads/ThreadComposer.tsx‎

Copy file name to clipboardExpand all lines: apps/mobile/src/features/threads/ThreadComposer.tsx
+7-3Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ import { Button } from "../../components/ui/Button";
33
import * as Dialog from "../../components/ui/Dialog";
44
import type { ComposerTextPaste } from "../../native/T3ComposerEditor.types";
55
import { useAdaptiveWorkspaceLayout } from "../layout/AdaptiveWorkspaceLayout";
6-
import { useAppearancePreferences } from "../settings/appearance/AppearancePreferencesProvider";
6+
import {
7+
useAppearancePreferences,
8+
useAndroidFloatingTabs,
9+
} from "../settings/appearance/AppearancePreferencesProvider";
710
import type { EnvironmentThreadShell } from "@t3tools/client-runtime/state/shell";
811
import { settlePromise, squashAtomCommandFailure } from "@t3tools/client-runtime/state/runtime";
912
import { AsyncResult } from "effect/reactivity";
@@ -561,7 +564,8 @@ export const ThreadComposer = function ThreadComposer(props: ThreadComposerProps
561564
);
562565
const isVoiceInputPresented = voicePresentation.statusLabel !== null;
563566
const isExpanded = isFocused || settingsSheetPresentation.keepsComposerExpanded;
564-
const { setComposerEditing } = useAdaptiveWorkspaceLayout();
567+
const { layout, setComposerEditing } = useAdaptiveWorkspaceLayout();
568+
const floatingSidebarComposer = useAndroidFloatingTabs() && layout.usesSplitView;
565569
const hasSidebarTabBar = useSidebarWorkspaceTabs() === "picker";
566570
const [compactRowWidth, setCompactRowWidth] = useState(0);
567571
const compactAttachmentLimit = compactRowWidth >= 500 ? 3 : 1;
@@ -855,7 +859,7 @@ export const ThreadComposer = function ThreadComposer(props: ThreadComposerProps
855859
borderRadius: hasSidebarTabBar ? 31 : 27,
856860
borderCurve: "circular",
857861
overflow: "hidden",
858-
paddingVertical: hasSidebarTabBar ? 9 : 2,
862+
paddingVertical: hasSidebarTabBar ? 9 : floatingSidebarComposer ? 6 : 2,
859863
}}
860864
>
861865
{isExpanded ? editingAttachments : null}
Collapse file

‎apps/mobile/src/features/threads/ThreadNavigationSidebar.tsx‎

Copy file name to clipboardExpand all lines: apps/mobile/src/features/threads/ThreadNavigationSidebar.tsx
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -839,7 +839,8 @@ function ThreadNavigationSidebarPane(
839839
paddingBottom:
840840
Platform.OS === "android"
841841
? floatingTabsEnabled
842-
? 2 * FLOATING_TABS.edge +
842+
? FLOATING_TABS.bottom +
843+
FLOATING_TABS.edge +
843844
Math.max(floatingTabs.height, floatingTabs.fabOffset + fabSize)
844845
: Math.max(insets.bottom, 16) + fabClearance - insets.bottom
845846
: 16 + insets.bottom,
Collapse file

‎apps/mobile/src/features/workspace/AndroidWorkspaceNavigation.android.tsx‎

Copy file name to clipboardExpand all lines: apps/mobile/src/features/workspace/AndroidWorkspaceNavigation.android.tsx
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ export function FloatingWorkspaceTabs(props: {
179179
position: "absolute",
180180
left: Math.max(insets.left, FLOATING_TABS.edge) - FLOATING_TABS.shadow,
181181
right: 0,
182-
bottom: insets.bottom + FLOATING_TABS.edge - FLOATING_TABS.shadow,
182+
bottom: insets.bottom + FLOATING_TABS.bottom - FLOATING_TABS.shadow,
183183
alignItems: "flex-start",
184184
}}
185185
>
Collapse file

‎apps/mobile/src/features/workspace/AndroidWorkspaceSidebar.android.tsx‎

Copy file name to clipboardExpand all lines: apps/mobile/src/features/workspace/AndroidWorkspaceSidebar.android.tsx
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export function AndroidWorkspaceSidebar(props: {
2525
const { scale, fabSize } = useAndroidControlSizing();
2626
const floating = floatingTabsMetrics(enabled.length + 1, scale, fabSize);
2727
const bottomClearance = floatingTabsEnabled
28-
? insets.bottom + 2 * FLOATING_TABS.edge + floating.height
28+
? insets.bottom + FLOATING_TABS.bottom + FLOATING_TABS.edge + floating.height
2929
: 16;
3030
const context = useMemo(() => ({ ...workspace, bottomClearance }), [workspace, bottomClearance]);
3131
if (enabled.length === 0) return <WorkspaceNoTabs />;
Collapse file

‎apps/mobile/src/features/workspace/WorkspaceRootScreen.android.tsx‎

Copy file name to clipboardExpand all lines: apps/mobile/src/features/workspace/WorkspaceRootScreen.android.tsx
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ export function WorkspaceRootScreen() {
3737
...workspace,
3838
bottomClearance: floatingTabsEnabled
3939
? insets.bottom +
40-
2 * FLOATING_TABS.edge +
40+
FLOATING_TABS.bottom +
41+
FLOATING_TABS.edge +
4142
Math.max(
4243
floating.height,
4344
workspace.state.selectedTab === "threads" ? floating.fabOffset + fabSize : 0,
Collapse file

‎apps/mobile/src/features/workspace/floating-workspace-tabs.ts‎

Copy file name to clipboardExpand all lines: apps/mobile/src/features/workspace/floating-workspace-tabs.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Keep the native drawing inset out of the visible size and edge margins.
2-
export const FLOATING_TABS = { edge: 16, gap: 12, shadow: 8 };
2+
export const FLOATING_TABS = { edge: 16, bottom: 6, gap: 12, shadow: 8 };
33

44
export function floatingTabsMetrics(
55
count: number,

0 commit comments

Comments
0 (0)
You are visitor 01402792 — 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.