Skip to content

chore: update settings menu#1876

Merged
cimigree merged 9 commits into
developfrom
chore/update-settings
May 6, 2026
Merged

chore: update settings menu#1876
cimigree merged 9 commits into
developfrom
chore/update-settings

Conversation

@cimigree

@cimigree cimigree commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

closes #1816

  • Most of the changes in this PR are file moves and adjusting various imports
  • Renames Settings to ComapeoSettings
  • Makes sure all of the items that by UI are in ComapeoSettings, are in the ComapeoSettings Folder, including security, passcode, obscurepasscode etc, which had to be moved into that folder.
  • Took out the nested AppSettings folder since it is no longer relevant
  • Took things out of that file folder that are not on the Comapeo Settings screen, such as Config
  • Moves the DrawerMenu to a screen since it is a screen and not a shareable component.
  • This file: src/frontend/screens/ComapeoSettings/index.tsx contains the UI changes for the Settings screen.
  • Added an icon that I could not find in react-native-vector-icons
  • Updated some E2E tests as needed.

Note: In the Figma and Notion, there is project data in the Sharing Permissions section of the Comapeo Setting menu. According to a Slack message with Ximena, though, the content of the menu should not change, just the UI, so I did not add that project statistics sharing to the Comapeo Settings menu as it lives in Coordinator Tools.

Note: the MenuListItem and FullScreenMenu are now only used in security since they are no longer used in the app settings/index. These probably don't need to be shareable components any more. However, there are so many diffs in this PR I thought it would make more sense to clean that up in a separate ticket/ pr.

Question: There are spanish translations in the Notion. Should I be adding those in Crowdin?

Screenshots

Regular Size

image

Large Size
image
image

@cimigree
cimigree requested a review from ErikSin April 30, 2026 16:20

@ErikSin ErikSin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Good job on this. A couple small but blocking comments related to the SettingsRow component. The way it is designed leads to ambiguous behaviour and some unnecessary props that can be solved by making the code slightly more verbose, while still keeping the re usability of the component

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I would argue that this is not a screen. The screens have there own page in the Navigation/Stack/AppScreens or in Navigation/Tab. The drawer is only used as a side component that is shared between tabs.

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Lets rename this file and export to "Categories" to match the new terminology.

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.

Comment on lines +219 to +225
function SectionHeader({label}: {label: string}) {
return (
<BodyText variant="tinyMeta" style={styles.sectionHeader}>
{label}
</BodyText>
);
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This feels a little unnecessary as its just returning a BodyText. Lets get rid of the SectionHeader and just share the styles.sectionHeader

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.

testID={testID}
onPress={onPress}
background={TouchableNativeFeedback.Ripple(VERY_LIGHT_BLUE, false)}>
<View style={styles.row}>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Lets use a TouchableOpacity Instead. TouchableNativeFeedback is a remnant from mapeo, and is not compatible with iOS

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.

Comment on lines +241 to +242
materialIconName?: MaterialIconsIconName;
icon?: React.ReactNode;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Instead of passing the MaterialIconName or Icon, lets just pass an icon. It will make the code a little more verbose as now we have to pass an entire react node, but it will get rid of the ambigous ternary code

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.

Comment on lines +238 to +239
actionText?: string;
showArrow?: boolean;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Similar comment as the one related to the icon, this leads to some ambigous ternary code. IF there is both an actionText and a showArrow then only the action text will show up. Its leads to having unnecessary props that are not being used.

I think the better pattern here is to just have a prop that is a reactNode so that the developer can just directly pass in actionText or the Arrow icon

eg:

function SettingsRow{
  label,
  onPress,
  EndContent
  testID,
  Icon,
}: {
  label: string;
  onPress: () => void;
  EndContent:ReactNode
  testID: string;
  Icon: ReactNode
}){

return(
 <TouchableOpacity>
  {Icon}
  <HeaderText> {label}</HeaderText>
  {EndContent}
</TouchableOpacity>
)


}

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.

@cimigree
cimigree requested a review from ErikSin May 6, 2026 13:49

@ErikSin ErikSin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good, Thank you

@cimigree
cimigree merged commit 1734e8e into develop May 6, 2026
11 checks passed
@cimigree
cimigree deleted the chore/update-settings branch May 6, 2026 21:03
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.

Settings Menu Improvements

2 participants