Skip to content

feat(profile): add settings navigation button to profile page#5

Merged
AnnatarHe merged 1 commit intomasterfrom
feat/profile-settings-navigation
Dec 29, 2025
Merged

feat(profile): add settings navigation button to profile page#5
AnnatarHe merged 1 commit intomasterfrom
feat/profile-settings-navigation

Conversation

@AnnatarHe
Copy link
Member

Summary

  • Add settings button to BasicBoard component's gradient header (top-right corner)
  • Replace unused header navigation code with visible in-content button
  • Clean up unused imports from profile page

Test plan

  • Verify settings gear icon appears in profile page header
  • Tap settings button and confirm navigation to Settings page works
  • Test on both light and dark mode

🤖 Generated with Claude Code

Move settings button from hidden header to visible location in the
BasicBoard gradient header. The previous implementation relied on
navigation.setOptions which didn't work since headerShown is false.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@gemini-code-assist
Copy link

Summary of Changes

Hello @AnnatarHe, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a new settings navigation button directly within the profile page's BasicBoard component. This change streamlines the user experience by making the settings accessible from the profile header itself, eliminating the need for header-level navigation options. It also includes a cleanup of associated unused code and imports.

Highlights

  • Feature Addition: A settings navigation button has been added directly to the BasicBoard component's gradient header on the profile page.
  • Code Refactoring: The previous header navigation logic for settings has been removed and replaced with an in-content button, improving component encapsulation.
  • Cleanup: Unused imports and styles have been removed from the profile page, enhancing code cleanliness.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@AnnatarHe AnnatarHe merged commit 0d408cb into master Dec 29, 2025
1 check failed
@AnnatarHe AnnatarHe deleted the feat/profile-settings-navigation branch December 29, 2025 01:44
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request successfully moves the settings button from the navigation header into the BasicBoard component on the profile page. The code changes are clean, including the removal of unused imports and the old header button logic. I've added a couple of suggestions to improve accessibility and TypeScript type safety. Overall, great work on this feature!

Comment on lines +96 to +101
<TouchableOpacity
onPress={props.onSettingsPress}
style={styles.settingsButton}
>
<Text style={styles.settingsIcon}>&#x2699;&#xFE0E;</Text>
</TouchableOpacity>

Choose a reason for hiding this comment

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

medium

For better accessibility, especially for screen reader users, it's a good practice to add accessibilityLabel and accessibilityRole to icon-only buttons.

            <TouchableOpacity
              onPress={props.onSettingsPress}
              style={styles.settingsButton}
              accessibilityRole="button"
              accessibilityLabel="Settings"
            >
              <Text style={styles.settingsIcon}>&#x2699;&#xFE0E;</Text>
            </TouchableOpacity>

Comment on lines +48 to +50
const handleSettingsPress = useCallback(() => {
(navigation as any).navigate(RouteKeys.ProfileSettings)
}, [navigation])

Choose a reason for hiding this comment

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

medium

To avoid using as any and to leverage TypeScript's type safety, it's better to type the navigation object. You can achieve this by providing a generic type to the useNavigation hook.

First, update your imports:

import { NavigationProp, useNavigation } from '@react-navigation/native';
import { RouteKeys, RouteParamList } from '../../routes';

Then, update the useNavigation call where navigation is declared:

const navigation = useNavigation<NavigationProp<RouteParamList>>();

This will provide full type safety for navigation actions.

Suggested change
const handleSettingsPress = useCallback(() => {
(navigation as any).navigate(RouteKeys.ProfileSettings)
}, [navigation])
const handleSettingsPress = useCallback(() => {
navigation.navigate(RouteKeys.ProfileSettings)
}, [navigation])

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.

1 participant