Skip to content
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/ios/OpenPassport/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>2.5.5</string>
<string>2.5.6</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand Down
8 changes: 4 additions & 4 deletions app/ios/Self.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@
CODE_SIGN_ENTITLEMENTS = OpenPassport/OpenPassportDebug.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 137;
CURRENT_PROJECT_VERSION = 140;
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_TEAM = 5B29R5LYHQ;
ENABLE_BITCODE = NO;
Expand Down Expand Up @@ -522,7 +522,7 @@
"$(PROJECT_DIR)",
"$(PROJECT_DIR)/MoproKit/Libs",
);
MARKETING_VERSION = 2.5.5;
MARKETING_VERSION = 2.5.6;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand All @@ -548,7 +548,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = OpenPassport/OpenPassport.entitlements;
CURRENT_PROJECT_VERSION = 137;
CURRENT_PROJECT_VERSION = 140;
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_TEAM = 5B29R5LYHQ;
FRAMEWORK_SEARCH_PATHS = (
Expand Down Expand Up @@ -662,7 +662,7 @@
"$(PROJECT_DIR)",
"$(PROJECT_DIR)/MoproKit/Libs",
);
MARKETING_VERSION = 2.5.5;
MARKETING_VERSION = 2.5.6;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand Down
2 changes: 1 addition & 1 deletion app/src/assets/animations/passport_onboarding.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion app/src/assets/animations/passport_scan.json

Large diffs are not rendered by default.

46 changes: 35 additions & 11 deletions app/src/components/Tips.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,51 @@ import { Caption } from './typography/Caption';
export interface TipProps {
title: string;
body: string;
icon?: React.ReactNode;
}

function Tip({ title, body }: TipProps) {
function Tip({ title, body, icon }: TipProps) {
return (
<View>
<Caption size="large" color={slate500}>
<Text fontWeight={'bold'}>
{title}
{': '}
</Text>
{body}
</Caption>
<View
backgroundColor="#F6F8FA"
borderRadius={12}
flexDirection="row"
alignItems="flex-start"
padding={14}
gap={12}
shadowColor="#000"
shadowOpacity={0.04}
shadowRadius={4}
marginBottom={4}
>
{icon && (
<View
minWidth={28}
minHeight={28}
justifyContent="center"
alignItems="center"
>
{icon}
</View>
)}
<View flex={1}>
<Caption size="large" color={slate500}>
<Text fontWeight={'bold'}>
{title}
{': '}
</Text>
{body}
</Caption>
</View>
</View>
);
}

export default function Tips({ items }: { items: TipProps[] }) {
return (
<View paddingVertical={20} gap={10}>
<View paddingVertical={10} gap={12}>
{items.map((item, index) => (
<Tip key={index} title={item.title} body={item.body} />
<Tip key={index} {...item} />
))}
</View>
);
Expand Down
1 change: 1 addition & 0 deletions app/src/consts/analytics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
export const AppEvents = {
DISMISS_PRIVACY_DISCLAIMER: 'App: Dismiss Privacy Disclaimer',
GET_STARTED: 'App: Get Started',
SUPPORTED_BIOMETRIC_IDS: 'App: Supported Biometric IDs',
UPDATE_MODAL_CLOSED: 'App: Update Modal Closed',
UPDATE_MODAL_OPENED: 'App: Update Modal Opened',
UPDATE_STARTED: 'App: Update Started',
Expand Down
3 changes: 3 additions & 0 deletions app/src/consts/links.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ export const termsUrl = 'https://self.xyz/terms';

export const privacyUrl = 'https://self.xyz/privacy';

export const supportedBiometricIdsUrl =
'https://docs.self.xyz/use-self/self-map-countries-list';

export const telegramUrl = 'https://t.me/self_xyz';

export const gitHubUrl = 'https://github.com/selfxyz/self';
Expand Down
25 changes: 17 additions & 8 deletions app/src/layouts/SimpleScrolledTitleLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: BUSL-1.1; Copyright (c) 2025 Social Connect Labs, Inc.; Licensed under BUSL-1.1 (see LICENSE); Apache-2.0 from 2029-06-11

import React from 'react';
import { useSafeAreaInsets } from 'react-native-safe-area-context';
import { ScrollView, YStack } from 'tamagui';

import { PrimaryButton } from '../components/buttons/PrimaryButton';
Expand All @@ -15,6 +16,8 @@ interface DetailListProps
onDismiss: () => void;
secondaryButtonText?: string;
onSecondaryButtonPress?: () => void;
header?: React.ReactNode;
footer?: React.ReactNode;
}> {}

export default function SimpleScrolledTitleLayout({
Expand All @@ -23,25 +26,31 @@ export default function SimpleScrolledTitleLayout({
onDismiss,
secondaryButtonText,
onSecondaryButtonPress,
header,
footer,
}: DetailListProps) {
const insets = useSafeAreaInsets();
return (
<ExpandableBottomLayout.Layout backgroundColor={white}>
<ExpandableBottomLayout.FullSection paddingTop={0} flex={1}>
<ScrollView flex={1}>
<YStack paddingTop={20}>
<Title>{title}</Title>
<YStack paddingVertical={20} flex={1}>
{children}
</YStack>
<YStack paddingTop={insets.top + 12}>
<Title>{title}</Title>
{header}
</YStack>
<ScrollView flex={1} showsVerticalScrollIndicator={false}>
<YStack paddingTop={0} paddingBottom={20} flex={1}>
{children}
</YStack>
</ScrollView>

{footer && <YStack marginBottom={18}>{footer}</YStack>}
{secondaryButtonText && onSecondaryButtonPress && (
<SecondaryButton onPress={onSecondaryButtonPress} mb="$2">
{secondaryButtonText}
</SecondaryButton>
)}
<PrimaryButton onPress={onDismiss}>Dismiss</PrimaryButton>
<YStack paddingBottom={insets.bottom + 12}>
<PrimaryButton onPress={onDismiss}>Dismiss</PrimaryButton>
</YStack>
</ExpandableBottomLayout.FullSection>
</ExpandableBottomLayout.Layout>
);
Expand Down
7 changes: 5 additions & 2 deletions app/src/navigation/misc.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ const miscScreens = {
Launch: {
screen: LaunchScreen,
options: {
headerShown: false,
gestureEnabled: false,
header: () => (
<StatusBar barStyle="light-content" backgroundColor={black} />
),
navigationBarColor: black,
},
},
LoadingScreen: {
Expand All @@ -33,6 +35,7 @@ const miscScreens = {
animation: 'fade',
} as NativeStackNavigationOptions,
},

Splash: {
screen: SplashScreen,
options: {
Expand Down
11 changes: 3 additions & 8 deletions app/src/screens/aesop/PassportOnboardingScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,7 @@ const PassportOnboardingScreen: React.FC<
<LottieView
ref={animationRef}
autoPlay={false}
loop={false}
onAnimationFinish={() => {
setTimeout(() => {
animationRef.current?.play();
}, 5000); // Pause 5 seconds before playing again
}}
loop={true}
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Consider performance implications of continuous animation looping.

Setting loop={true} will cause the animation to run continuously, which may impact battery life and performance, especially on lower-end devices. Consider whether the user experience benefit justifies the performance cost.


🏁 Script executed:

#!/bin/bash
# Check if there are performance optimization patterns used elsewhere in the codebase
rg -A 3 -B 3 "loop.*false|autoPlay.*false" --type ts --type tsx

Length of output: 93


Let’s broaden our search to catch any loop or autoPlay configurations in both .ts and .tsx files, so we can see if performance-minded patterns already exist:


🏁 Script executed:

#!/bin/bash
# Search for all animation loop settings
rg -C 3 "loop\s*=" -g '*.ts' -g '*.tsx'

# Search for any explicit autoPlay toggles
rg -C 3 "autoPlay\s*=" -g '*.ts' -g '*.tsx'

Length of output: 8573


Optimize continuous animation looping in PassportOnboardingScreen

The LottieView in app/src/screens/aesop/PassportOnboardingScreen.tsx is the only one set to loop={true}—every other screen defaults to loop={false} and handles replay programmatically. An infinite loop can tax CPU/GPU and drain battery, especially if left running in the background or on lower-end devices.

Please adjust as follows:

  • File: app/src/screens/aesop/PassportOnboardingScreen.tsx: change loop={true} to loop={false} and trigger repeats in code if still needed
  • Respect reduce-motion settings via AccessibilityInfo.isReduceMotionEnabled() to disable or shorten animations for users who opt out
  • Pause the animation when the app goes to the background (e.g. listen to AppState changes)

Proposed diff:

-         loop={true}
+         loop={false}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
loop={true}
loop={false}
🤖 Prompt for AI Agents
In app/src/screens/aesop/PassportOnboardingScreen.tsx at line 41, change the
LottieView prop from loop={true} to loop={false} to prevent continuous animation
looping. Implement code to programmatically replay the animation if needed. Use
AccessibilityInfo.isReduceMotionEnabled() to detect user preference and disable
or shorten animations accordingly. Also, add an AppState listener to pause the
animation when the app goes to the background to reduce CPU/GPU usage and
battery drain.

source={passportOnboardingAnimation}
style={styles.animation}
cacheComposition={true}
Expand Down Expand Up @@ -100,8 +95,8 @@ export default PassportOnboardingScreen;
const styles = StyleSheet.create({
animation: {
backgroundColor: slate100,
width: '115%',
height: '115%',
width: '100%',
height: '100%',
},
textIconWrapper: {
width: '100%',
Expand Down
Loading