Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion app/src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useContext, useRef, useCallback } from 'react';
import { StyleSheet, Text, View, Button } from 'react-native';
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
import { Chat, Images, Settings } from './screens'
import { Chat, Images, Settings, DesignLab } from './screens'
import { Header } from './components'
import FeatherIcon from '@expo/vector-icons/Feather'
import {
Expand Down Expand Up @@ -57,6 +57,20 @@ function MainComponent() {
),
}}
/>
<Tab.Screen
name="Lab"
component={DesignLab}
options={{
headerShown: false,
tabBarIcon: ({ color, size }) => (
<FeatherIcon
name="layers"
color={color}
size={size}
/>
),
}}
/>
Comment on lines +60 to +73

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

🚩 Lab tab disables header, shifting safe area responsibility to child components

The new Lab tab at app/src/main.tsx:60-73 sets headerShown: false, unlike the Chat, Images, and Settings tabs which all render <Header />. This means the DesignLab component and its children (AuroraChat, MonoChat) must handle safe area insets themselves. They do this via hardcoded paddingTop: 60 values (e.g., app/src/screens/prototypes/AuroraChat.tsx:219, app/src/screens/prototypes/MonoChat.tsx:337, app/src/screens/prototypes/DesignLab.tsx:113). This works on most modern iPhones but may not be correct for devices with different status bar heights (e.g., iPads, older iPhones, or Android devices with varying notch sizes). Using useSafeAreaInsets() would be more robust.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Acknowledged — hardcoded paddingTop is intentional for quick prototyping. Would switch to useSafeAreaInsets() if either direction is chosen for production.

<Tab.Screen
name="Settings"
component={Settings}
Expand Down
3 changes: 2 additions & 1 deletion app/src/screens/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export { Chat } from './chat'
export { Images } from './images'
export { Settings } from './settings'
export { Settings } from './settings'
export { DesignLab } from './prototypes'
Loading