@@ -60,11 +60,6 @@ import {
6060 useHardwareKeyboardCommand ,
6161} from "../keyboard/hardwareKeyboardCommands" ;
6262import { AndroidHomeFabLayout } from "../home/AndroidHomeFab" ;
63- import { useAndroidControlSizing } from "../../components/ui/useAndroidControlSizing" ;
64- import {
65- AndroidWorkspaceNavigation ,
66- ANDROID_WORKSPACE_RAIL_WIDTH ,
67- } from "../workspace/AndroidWorkspaceNavigation" ;
6863import { AndroidWorkspaceSidebar } from "../workspace/AndroidWorkspaceSidebar" ;
6964import { useAndroidWorkspaceSelection } from "../workspace/useAndroidWorkspaceSelection" ;
7065import { HomeListOptionsProvider } from "../home/home-list-options" ;
@@ -241,7 +236,6 @@ function AdaptiveWorkspaceLayoutContent(
241236 const windowDimensions = useWindowDimensions ( ) ;
242237 const nativeMetrics = useNativeLayoutMetrics ( ) ;
243238 const { width : viewportWidth , height } = nativeMetrics ?? windowDimensions ;
244- const { scale : androidControlScale } = useAndroidControlSizing ( ) ;
245239 const pathname = props . pathname ;
246240 const navigation = useNavigation ( ) ;
247241 const activeRoleOwner = useRef < symbol | null > ( null ) ;
@@ -267,11 +261,6 @@ function AdaptiveWorkspaceLayoutContent(
267261 usesSplitView : baseLayout . usesSplitView ,
268262 } ) ;
269263 const showPrimarySidebar = primarySidebarPinned || primarySidebarPreferredVisible ;
270- const shouldRenderNavigationRail = Platform . OS === "android" && baseLayout . usesSplitView ;
271- const navigationRailWidth =
272- shouldRenderNavigationRail && showPrimarySidebar
273- ? ANDROID_WORKSPACE_RAIL_WIDTH * Math . max ( 1 , androidControlScale )
274- : 0 ;
275264 const [ hinge , setHinge ] = useState < VerticalHinge | null > ( null ) ;
276265 const [ windowHinge , setWindowHinge ] = useState < VerticalHinge | null > ( null ) ;
277266 const handleHingeChange = useCallback (
@@ -282,29 +271,28 @@ function AdaptiveWorkspaceLayoutContent(
282271 [ ] ,
283272 ) ;
284273 const layout = useMemo (
285- ( ) =>
286- alignListPaneToHinge ( {
287- layout : baseLayout ,
288- hinge,
289- viewportWidth,
290- leadingWidth : navigationRailWidth ,
291- } ) ,
292- [ baseLayout , hinge , viewportWidth , navigationRailWidth ] ,
274+ ( ) => alignListPaneToHinge ( { layout : baseLayout , hinge, viewportWidth } ) ,
275+ [ baseLayout , hinge , viewportWidth ] ,
293276 ) ;
294- const width = viewportWidth - navigationRailWidth ;
295277 const shouldRenderPrimarySidebar = layout . usesSplitView ;
296278 const fileInspector = useMemo (
297279 ( ) =>
298280 deriveFileInspectorPaneLayout ( {
299281 layout,
300- viewportWidth : width ,
282+ viewportWidth,
301283 preferredWidth : fileInspectorPreferredWidth ?? undefined ,
302284 reservedLeadingWidth :
303285 shouldRenderPrimarySidebar && showPrimarySidebar
304286 ? ( layout . listPaneWidth ?? 0 ) + ( layout . listPaneGap ?? 0 )
305287 : 0 ,
306288 } ) ,
307- [ fileInspectorPreferredWidth , layout , showPrimarySidebar , shouldRenderPrimarySidebar , width ] ,
289+ [
290+ fileInspectorPreferredWidth ,
291+ layout ,
292+ showPrimarySidebar ,
293+ shouldRenderPrimarySidebar ,
294+ viewportWidth ,
295+ ] ,
308296 ) ;
309297 const auxiliaryPaneRole : WorkspaceAuxiliaryPaneRole =
310298 focusedAuxiliaryPaneRole ?? ( / \/ f i l e s (?: \/ | $ ) / . test ( pathname ) ? "inspector" : "supplementary" ) ;
@@ -320,7 +308,7 @@ function AdaptiveWorkspaceLayoutContent(
320308 ( ) =>
321309 deriveWorkspacePaneLayout ( {
322310 layout,
323- viewportWidth : width ,
311+ viewportWidth,
324312 primarySidebarPreferredVisible : showPrimarySidebar ,
325313 auxiliaryPanePreferredVisible,
326314 auxiliaryPaneRole,
@@ -332,7 +320,7 @@ function AdaptiveWorkspaceLayoutContent(
332320 auxiliaryPanePreferredWidth ,
333321 layout ,
334322 showPrimarySidebar ,
335- width ,
323+ viewportWidth ,
336324 ] ,
337325 ) ;
338326 const activeThread = parseActiveThreadPath ( pathname ) ;
@@ -582,7 +570,6 @@ function AdaptiveWorkspaceLayoutContent(
582570 const renderedSidebarWidth = useSharedValue (
583571 panes . primarySidebarVisible ? ( layout . listPaneWidth ?? 0 ) + ( layout . listPaneGap ?? 0 ) : 0 ,
584572 ) ;
585- const renderedRailWidth = useSharedValue ( navigationRailWidth ) ;
586573 useEffect ( ( ) => {
587574 if ( nativeWorkspace ) return ;
588575 const targetWidth = panes . primarySidebarVisible
@@ -591,19 +578,15 @@ function AdaptiveWorkspaceLayoutContent(
591578 renderedSidebarWidth . value = withTiming ( targetWidth , WORKSPACE_PANE_TIMING , ( finished ) => {
592579 if ( finished && Platform . OS === "android" ) runOnJS ( settleContentWidth ) ( contentRevision ) ;
593580 } ) ;
594- renderedRailWidth . set ( withTiming ( navigationRailWidth , WORKSPACE_PANE_TIMING ) ) ;
595581 } , [
596582 nativeWorkspace ,
597- navigationRailWidth ,
598583 layout . listPaneWidth ,
599584 layout . listPaneGap ,
600585 panes . primarySidebarVisible ,
601586 renderedSidebarWidth ,
602- renderedRailWidth ,
603587 settleContentWidth ,
604588 contentRevision ,
605589 ] ) ;
606- const railAnimatedStyle = useAnimatedStyle ( ( ) => ( { width : renderedRailWidth . value } ) ) ;
607590 // Showing or hiding the sidebar clips a fixed-width list. A hinge resize instead tracks the
608591 // animated edge, so the header actions slide with it rather than jumping or being covered.
609592 const listPaneGap = layout . listPaneGap ?? 0 ;
@@ -624,13 +607,7 @@ function AdaptiveWorkspaceLayoutContent(
624607 // merely clip/reveal it over a matching background.
625608 const renderedInspectorWidth = useSharedValue ( inspectorColumnTargetWidth ) ;
626609 const renderedContentWidth = useDerivedValue ( ( ) =>
627- Math . max (
628- 0 ,
629- viewportWidth -
630- renderedRailWidth . value -
631- renderedSidebarWidth . value -
632- renderedInspectorWidth . value ,
633- ) ,
610+ Math . max ( 0 , viewportWidth - renderedSidebarWidth . value - renderedInspectorWidth . value ) ,
634611 ) ;
635612
636613 const selectAndroidWorkspace = useAndroidWorkspaceSelection ( ) ;
@@ -745,17 +722,6 @@ function AdaptiveWorkspaceLayoutContent(
745722 className = { Platform . OS === "android" ? "flex-1 flex-row bg-header" : "flex-1 flex-row" }
746723 >
747724 < AndroidHingeObserver onChange = { handleHingeChange } />
748- { shouldRenderNavigationRail ? (
749- < Animated . View
750- className = "self-stretch overflow-hidden"
751- accessibilityElementsHidden = { navigationRailWidth === 0 }
752- importantForAccessibility = { navigationRailWidth > 0 ? "auto" : "no-hide-descendants" }
753- pointerEvents = { navigationRailWidth > 0 ? "auto" : "none" }
754- style = { railAnimatedStyle }
755- >
756- < AndroidWorkspaceNavigation rail onSelect = { revealPrimarySidebar } />
757- </ Animated . View >
758- ) : null }
759725 { shouldRenderPrimarySidebar && layout . listPaneWidth !== null ? (
760726 < Animated . View
761727 className = "self-stretch overflow-hidden"
0 commit comments