chore: Updated headers for settings general page#25356
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
| onBack={() => navigation.goBack()} | ||
| includesTopInset | ||
| /> | ||
| <ScrollView style={styles.content}> |
There was a problem hiding this comment.
Nothing changed below this line. just indentation changes messing up with git dif
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
Why no E2E tags needed:
Performance Test Selection: |
| it('renders header with correct title', () => { | ||
| const { getByText } = renderComponent(); | ||
| expect(getByText('General')).toBeTruthy(); | ||
| }); |
There was a problem hiding this comment.
Test uses weak matcher for element presence assertion
Low Severity · Bugbot Rules
The new test 'renders header with correct title' uses toBeTruthy() to assert element presence. This violates the testing guidelines which state: "Do not use weak matchers like toBeDefined or toBeTruthy to assert element presence. Use toBeOnTheScreen()." The assertion on line 88 expect(getByText('General')).toBeTruthy() needs to use toBeOnTheScreen() instead.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #25356 +/- ##
==========================================
+ Coverage 80.06% 80.29% +0.22%
==========================================
Files 4278 4263 -15
Lines 110125 109955 -170
Branches 23093 23418 +325
==========================================
+ Hits 88172 88287 +115
+ Misses 15827 15480 -347
- Partials 6126 6188 +62 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|





Description
This PR updates the General Settings page and SelectComponent modal to use the
HeaderCentercomponent for consistent header styling across the app.Changes:
getNavigationOptionsTitle) with an inlineHeaderCentercomponent, following the pattern established in the parent Settings pageheaderShown: falseat the stack level for GeneralSettings screens in MainNavigator.jsSafeAreaViewfor proper safe area handlingHeaderCenterwith a close buttonChangelog
CHANGELOG entry: Updated General Settings page and select modal headers to use consistent HeaderCenter component styling
Related issues
Fixes: https://consensyssoftware.atlassian.net/jira/software/c/projects/MDP/boards/2972?assignee=62afb43d33a882e2be47c36f&quickFilter=3325&selectedIssue=MDP-697
Manual testing steps
Screenshots/Recordings
Before
After
Simulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2026-01-28.at.17.22.54.mov
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Low Risk
Low risk UI/navigation refactor that mainly changes header rendering and related tests; minimal impact to underlying settings behavior.
Overview
Unifies header UI for General Settings and select modals.
GeneralSettingsnow renders its ownHeaderCenter(wrapped inSafeAreaView) instead of configuring a React Navigation header, andMainNavigatorforcesheaderShown: falseforGeneralSettingsscreens.SelectComponent’s modal header is replaced withHeaderCenter(adds close button handling). Tests were migrated from Enzyme to Testing Library and snapshots updated to reflect the new header structure and navigation interactions.Written by Cursor Bugbot for commit 95f4c98. This will update automatically on new commits. Configure here.