Repository navigation
Worktree miui notes redesign #2
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.
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
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
868f9dc
notes: black/amber palette, notebooks schema, formatting engine
zacktiger f514f3d
notes: rebuild the UI around the reference app
zacktiger 5774a2b
notes: label the list's overflow button for what it opens
zacktiger 8444007
Merge origin/main: keep the block editor, keep the redesign
zacktiger File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| import { Tabs } from 'expo-router'; | ||
|
|
||
| import { Icon } from '@/components/icon'; | ||
| import { useTheme } from '@/theme'; | ||
|
|
||
| /** | ||
| * Notes and To-dos, the reference's two tabs. | ||
| * | ||
| * To-dos is not a second store: a to-do is a note that has been promoted to a | ||
| * commitment, so the tab is a view over the same table rather than a parallel | ||
| * feature with its own data. | ||
| */ | ||
| export default function TabsLayout() { | ||
| const theme = useTheme(); | ||
|
|
||
| return ( | ||
| <Tabs | ||
| screenOptions={{ | ||
| headerShown: false, | ||
| tabBarActiveTintColor: theme.ink, | ||
| tabBarInactiveTintColor: theme.faint, | ||
| tabBarStyle: { | ||
| backgroundColor: theme.canvas, | ||
| borderTopColor: theme.line, | ||
| borderTopWidth: 1, | ||
| height: 62, | ||
| paddingTop: 6, | ||
| elevation: 0, | ||
| }, | ||
| tabBarLabelStyle: { fontSize: 11, paddingBottom: 6 }, | ||
| }} | ||
| > | ||
| <Tabs.Screen | ||
| name="index" | ||
| options={{ | ||
| title: 'Notes', | ||
| tabBarIcon: ({ color }) => <Icon name="notes" size={22} color={color} />, | ||
| }} | ||
| /> | ||
| <Tabs.Screen | ||
| name="todos" | ||
| options={{ | ||
| title: 'To-dos', | ||
| tabBarIcon: ({ color }) => <Icon name="todos" size={20} color={color} />, | ||
| }} | ||
| /> | ||
| </Tabs> | ||
| ); | ||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win
🧩 Analysis chain
🌐 Web query:
React Navigation bottom tabs tabBarStyle height safe area insets bottom behavior💡 Result:
In React Navigation, the bottom tab bar automatically calculates and applies safe area insets to its own height to ensure it is not obscured by system UI elements like the home indicator on iOS [1]. Key behavioral details: Automatic Handling: The built-in bottom tab bar uses react-native-safe-area-context to detect device insets [1][2]. When the tab bar is positioned at the bottom, it automatically adds the bottom safe area inset to its calculated height, preventing content overlap [1]. Customization and Styling: - If you use the standard tab bar, you should avoid manually overriding its layout to account for safe areas, as this can conflict with the internal automatic calculations [1][3]. - When implementing a custom tab bar via the tabBarStyle property, you are responsible for managing these insets. The library's internal logic calculates height based on a base height plus the bottom safe area inset [1]. - If you are setting a custom height in tabBarStyle, note that the tab bar's internal logic may still apply additional padding or inset logic depending on the implementation [1]. Managing Content Overlap: Because the tab bar occupies space at the bottom of the screen, your screen content may be hidden behind it. To manage this: - Use the useSafeAreaInsets hook from react-native-safe-area-context within your screens to apply appropriate padding to your containers, ensuring your content remains visible [2][4]. - On iOS, for scrollable lists (ScrollView, FlatList, etc.), use contentInsetAdjustmentBehavior="automatic" as a preferred, automated way to handle insets without manual padding calculations [2][4]. - Avoid wrapping your entire application in a single SafeAreaView; instead, apply safe area handling to the specific screen content that requires it [2][4]. Native Bottom Tabs Note: If you are using native bottom tabs, the tab bar is rendered outside the standard React Native JS layout tree [5]. Consequently, there is no direct equivalent to useBottomTabBarHeight, and you cannot measure the tab bar height directly from JS [5]. You must rely on safe area insets to apply necessary bottom padding to your content to prevent overlap [5].
Citations:
🏁 Script executed:
Repository: zacktiger/DailyNote
Length of output: 1924
🏁 Script executed:
Repository: zacktiger/DailyNote
Length of output: 1924
🏁 Script executed:
Repository: zacktiger/DailyNote
Length of output: 1924
Verify the fixed tab bar height against the bottom safe-area inset.
tabBarStyle.heightis hard-coded to 62. If the navigator does not addinsets.bottomon top of an explicit custom layout height, tab screens withedges={['top', 'left', 'right']}can render overlap the bottom safe area. Addinsets.bottomwithuseSafeAreaInsets(), or remove the explicitheight.🤖 Prompt for AI Agents