Skip to content

feat: Migrate to native bottom tab navigator using image assets for tab icons and update react-native-screens.#415

Merged
PierreBresson merged 5 commits intoNMF-earth:mainfrom
hb2708:nmf-app-408-part-2
Dec 19, 2025
Merged

feat: Migrate to native bottom tab navigator using image assets for tab icons and update react-native-screens.#415
PierreBresson merged 5 commits intoNMF-earth:mainfrom
hb2708:nmf-app-408-part-2

Conversation

@hb2708
Copy link
Copy Markdown
Contributor

@hb2708 hb2708 commented Dec 18, 2025

✅ I have read the contributing file

Completes #408

Summary

  • ios 26 Liquid glass tab bar support
  • With the changes to tab bar the app will not support expo go. To run need to run yarn start -> press s ( switch to development build) -> press i or a

Changelog

  • Added new tab bar images (Exported from Figma)

Demo

iOS Android
Simulator.Screen.Recording.-.iPhone.17.Pro.-.2025-12-18.at.01.17.18.mov
demo.mp4

@PierreBresson
Copy link
Copy Markdown
Member

I have tested it, and It works well, thanks for looking into that! However, I found 2 issues :

  • Icons not on focused are black instead of gray
  • Some content can't be seen/reach now. I've put the screenshots below of what I could find.
Screenshot 2025-12-18 at 10 30 07 Screenshot 2025-12-18 at 10 30 14 Screenshot 2025-12-18 at 10 30 20 Screenshot 2025-12-18 at 10 32 53

@hb2708
Copy link
Copy Markdown
Contributor Author

hb2708 commented Dec 18, 2025

@PierreBresson
ahh good catch should have scrolled as well instead of just changing tabs.

for the monthly budget screen need some adjustment where the button needs to moved inside the scrollview
WIll look like below . and the button will no more be stick to bottom.
Can add a small separator line above the button if need
For now this seems to be a solution

Let me know if that works will commit and push . till then i will keep on local For the Monthly Budget page

Simulator Screenshot - iPhone 17 Pro - 2025-12-18 at 19 22 50 Simulator Screenshot - iPhone 17 Pro - 2025-12-18 at 19 22 51

@hb2708
Copy link
Copy Markdown
Contributor Author

hb2708 commented Dec 18, 2025

May get a better solution when we add other changes for large header in follow up work

…ss tab bar

- Add contentInsetAdjustmentBehavior='automatic' to ActScreen, BudgetScreen, CategorySelectionScreen, EmissionsScreen, SettingsScreen, and SubCategorySelectionScreen
- This ensures content scrolls properly and is not hidden behind the translucent native bottom tab bar
- Update related snapshots
@hb2708
Copy link
Copy Markdown
Contributor Author

hb2708 commented Dec 18, 2025

Related to the inactive tab tint color, it will be automatically set, and we won’t be able to control it. This feature will no longer be supported in iOS once we migrate to Liquid Glass in iOS 26.

https://github.com/react-navigation/react-navigation/blob/2b7ee0d2d1b1ef0390b690f59c0c1dd8bd57e9eb/packages/bottom-tabs/src/unstable/types.tsx#L210-L215

@PierreBresson
Copy link
Copy Markdown
Member

Moving the button inside the scrollview is a good solution for now, otherwise we can delete the button and update the value every time the slider value has changed.
Let's skip small separator line, otherwise it looks good 😊

@hb2708
Copy link
Copy Markdown
Contributor Author

hb2708 commented Dec 18, 2025

@PierreBresson pushed All should be good now
image

@PierreBresson
Copy link
Copy Markdown
Member

@hb2708 almost there. The button is fixed but there are still a few regressions :
Simulator Screenshot - iPhone 17 Pro - 2025-12-18 at 19 53 46
Simulator Screenshot - iPhone 17 Pro - 2025-12-18 at 19 53 56
Simulator Screenshot - iPhone 17 Pro - 2025-12-18 at 19 53 12

@hb2708
Copy link
Copy Markdown
Contributor Author

hb2708 commented Dec 19, 2025

@PierreBresson Added contentInsetAdjustmentBehavior='automatic' to all scrollable content so that we dont face at any place now and future as well. hope i did not miss any screen

@PierreBresson
Copy link
Copy Markdown
Member

iOS is fixed, but android has issues :
Screenshot_1766131916
Screenshot_1766131919
Screenshot_1766131929
Screenshot_1766131949
Screenshot_1766131956
Screenshot_1766132019
Simulator Screenshot - iPhone 17 Pro - 2025-12-18 at 19 53 12
Simulator Screenshot - iPhone 17 Pro - 2025-12-18 at 19 53 46
Simulator Screenshot - iPhone 17 Pro - 2025-12-18 at 19 53 56

@hb2708
Copy link
Copy Markdown
Contributor Author

hb2708 commented Dec 19, 2025

hmm it seems contentInsetAdjustmentBehavior dont work as expected in android 🤦

@hb2708
Copy link
Copy Markdown
Contributor Author

hb2708 commented Dec 19, 2025

@PierreBresson Added some android specific code which i felt is a solution at this point . tried to cover all the screen i felt may have issue

Comment thread app/constant/Layout.ts Outdated
Comment thread app/constant/Layout.ts Outdated
};

export { screen, isSmallDevice, PADDING_HORIZONTAL, SPACING };
const ANDROID_TAB_BAR_HEIGHT = 100;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please use useBottomTabBarHeight, see documentation.

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.

useBottomTabBarHeight wont work for Native Bottom Tab Navigator as it expects JS-based navigator context

When used it will throw error as

[Error: Couldn't find the bottom tab bar height. Are you inside a screen in Bottom Tab Navigator?]

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.

@PierreBresson updated the approach to use different hook.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ah I see, alright let's go for the static value then, thanks for looking into it.

Copy link
Copy Markdown
Member

@PierreBresson PierreBresson left a comment

Choose a reason for hiding this comment

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

Good to go, merci !

@PierreBresson PierreBresson merged commit c450cd8 into NMF-earth:main Dec 19, 2025
1 check passed
@hb2708 hb2708 deleted the nmf-app-408-part-2 branch December 19, 2025 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants