Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Release 09-03-2023] Purple theme support and UI enhancements #630

Merged
merged 29 commits into from
Mar 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
e4575b4
refactor(#609): [Adityan] change label for add, request screen in all…
Mar 6, 2023
b799d64
refactor(#607): [Bhargavi] change the labels in the app profile screen
PuBHARGAVI Mar 6, 2023
52e0f5c
chore: fix Android SoLoader occasional crash on app re-install
vharsh Mar 7, 2023
5d6a3c9
refactor(#607): [Bhargavi] change the Id type to card type in the app…
PuBHARGAVI Mar 7, 2023
fa9f066
fix(#611): [Vijay] fix purple theme in missing components and refacto…
vijay151096 Mar 7, 2023
8b066f1
fix(#616): Increase async storage limit to 30mb
tilak-puli Mar 7, 2023
cbca1d4
chore(#607): [Bhargavi] add the comments for profile screen hided labels
PuBHARGAVI Mar 7, 2023
6a35e48
refactor(#611): [Vijay] add new input in github action workflow to to…
vijay151096 Mar 7, 2023
4c6afd6
Merge pull request #11 from ravikp/so_loader_fix
ravikp Mar 7, 2023
3f79c4f
Merge pull request #12 from ravikp/increase-max-size-of-async-storage
ravikp Mar 7, 2023
44e3034
fix(#611): [Vijay] update github workflow inputs to dropdown
vijay151096 Mar 8, 2023
cebe3b2
refactor(#611): [Vijay] update the github workflow theme dropdown values
vijay151096 Mar 8, 2023
f0bcc9d
refactor(#611): [Vijay] update the default application theme
vijay151096 Mar 8, 2023
d21b4ce
refactor(#609): [Adityan] remove number after Application ID
Mar 8, 2023
ac31632
Revert "refactor(#607): [Bhargavi] change the Id type to card type in…
PuBHARGAVI Mar 8, 2023
d2f3241
refactor(#607): [Bhargavi] change the log-out label to Logout in all …
PuBHARGAVI Mar 8, 2023
ed9362c
refactor(#607): [Bhargavi] remove the powered by BLE from list option…
PuBHARGAVI Mar 8, 2023
12dfd2c
Merge pull request #15 from ravikp/purple-theming
krishnakumar4a4 Mar 9, 2023
2bda456
refactor(#607): [Bhargavi] add powered by BLE and powered by GoogleNe…
PuBHARGAVI Mar 9, 2023
44c7e0f
fix(#609): [Vijay] add missing translations
vijay151096 Mar 9, 2023
5d6e4ab
Merge pull request #14 from ravikp/change-label-add-request-screen
vijay151096 Mar 9, 2023
ec379e7
refactor(#589): [Bhargavi] change sharing vc labels to share and shar…
PuBHARGAVI Mar 9, 2023
2313dd2
chore(#607): [Bhargavi] change hided to hidden in the comments
PuBHARGAVI Mar 9, 2023
faa7d5a
Merge pull request #16 from ravikp/change-profile-screen-UI
krishnakumar4a4 Mar 9, 2023
fe26270
Merge remote-tracking branch 'upstream/develop' into develop-09-03-2023
vharsh Mar 9, 2023
09bfe25
fix(#611): fix the vc header field colour
vijay151096 Mar 9, 2023
8526039
refactor(#607): [Bhargavi] add translation for Home screen header tit…
PuBHARGAVI Mar 9, 2023
2f5704b
Merge branch 'ravikp_develop' into ravikp_develop-09-03-2023
krishnakumar4a4 Mar 9, 2023
f13e44e
chore: update Podfile lock file with latest tuvali version
krishnakumar4a4 Mar 9, 2023
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: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@
MIMOTO_HOST=https://api.qa-1201-b2.mosip.net
#MIMOTO_HOST=http://mock.mimoto.newlogic.dev
GOOGLE_NEARBY_MESSAGES_API_KEY=
#Application Theme can be ( orange | purple )
APPLICATION_THEME=orange

USE_BLE_SHARE=true
13 changes: 11 additions & 2 deletions .github/workflows/android-custom-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@ on:
required: true
default: 'https://api.qa-121.mosip.net/residentmobileapp'
type: string
theme:
description: 'Application Theme'
required: true
default: 'orange'
type: choice
options:
- orange
- purple

jobs:
build-android:
Expand Down Expand Up @@ -44,13 +52,13 @@ jobs:
run: |
echo "${{ secrets.ENV_FILE }}" > .env.local > android/local.properties

- name: Setup branch and env
- name: Setup branch and env
run: |
# Strip git ref prefix from version
echo "BRANCH_NAME=$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" >> $GITHUB_ENV
echo "GPG_TTY=$(tty)" >> $GITHUB_ENV

- name: Setup branch and GPG public key
- name: Setup branch and GPG public key
run: |
# Strip git ref prefix from version

Expand All @@ -69,6 +77,7 @@ jobs:
env:
MIMOTO_HOST: ${{ github.event.inputs.backendServiceUrl }}
FIREBASE_SECRET: ${{ secrets.GPG_SECRET }}
APPLICATION_THEME: ${{ github.event.inputs.theme }}
- name: Upload Artifact
uses: actions/[email protected]
with:
Expand Down
1 change: 1 addition & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
//noinspection GradleDynamicVersion
implementation "com.facebook.react:react-native:+"// From node_modules
implementation 'com.facebook.soloader:soloader:0.10.1+'

def isGifEnabled = (findProperty('expo.gif.enabled') ?: "") == "true";
def isWebpEnabled = (findProperty('expo.webp.enabled') ?: "") == "true";
Expand Down
5 changes: 5 additions & 0 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ allprojects {
// Android JSC is installed from npm
url(new File(["node", "--print", "require.resolve('jsc-android/package.json')"].execute(null, rootDir).text.trim(), "../dist"))
}
configurations.all {
resolutionStrategy {
force "com.facebook.soloader:soloader:0.10.1"
}
}

google()
gradlePluginPortal()
Expand Down
5 changes: 4 additions & 1 deletion android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,7 @@ expo.gif.enabled=true
expo.webp.enabled=true
# Enable animated webp support (~3.4 MB increase)
# Disabled by default because iOS doesn't support animated webp
expo.webp.animated=false
expo.webp.animated=false

# If the AsyncStorage_db_size_in_MB is not configured, Default DB_MAX_SIZE is 6MB in Android
AsyncStorage_db_size_in_MB=30
6 changes: 5 additions & 1 deletion components/EditableListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ export const EditableListItem: React.FC<EditableListItemProps> = (props) => {
const [newValue, setNewValue] = useState(props.value);

return (
<ListItem bottomDivider onPress={() => setIsEditing(true)}>
<ListItem
bottomDivider
onPress={() => setIsEditing(true)}
style={{ display: props.display }}>
<Icon
name={props.Icon}
type="antdesign"
Expand Down Expand Up @@ -64,4 +67,5 @@ interface EditableListItemProps {
value: string;
Icon: string;
onEdit: (newValue: string) => void;
display?: 'none' | 'flex';
}
14 changes: 2 additions & 12 deletions components/SingleVcItem.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useContext, useRef } from 'react';
import { useInterpret, useSelector } from '@xstate/react';
import { Image, ImageBackground, Pressable } from 'react-native';
import { Image, ImageBackground, Pressable, View } from 'react-native';
import { CheckBox, Icon } from 'react-native-elements';
import { ActorRefFrom } from 'xstate';
import {
Expand All @@ -16,17 +16,7 @@ import { Theme } from './ui/styleUtils';
import { GlobalContext } from '../shared/GlobalContext';
import { RotatingIcon } from './RotatingIcon';
import { useTranslation } from 'react-i18next';

const VerifiedIcon: React.FC = () => {
return (
<Icon
name="check-circle"
color={Theme.Colors.VerifiedIcon}
size={14}
containerStyle={{ marginStart: 4, bottom: 1 }}
/>
);
};
import VerifiedIcon from './VerifiedIcon';

const getDetails = (arg1, arg2, verifiableCredential) => {
if (arg1 === 'Status') {
Expand Down
37 changes: 13 additions & 24 deletions components/VcDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,14 @@ import { formatDistanceToNow } from 'date-fns';
import React from 'react';
import * as DateFnsLocale from '../lib/date-fns/locale';
import { useTranslation } from 'react-i18next';
import { Image, ImageBackground } from 'react-native';
import { Image, ImageBackground, View } from 'react-native';
import { Icon } from 'react-native-elements';
import { VC, CredentialSubject, LocalizedField } from '../types/vc';
import { Button, Column, Row, Text } from './ui';
import { Theme } from './ui/styleUtils';
import { TextItem } from './ui/TextItem';
import { VcItemTags } from './VcItemTags';

const VerifiedIcon: React.FC = () => {
return (
<Icon
name="check-circle"
color={Theme.Colors.VerifiedIcon}
size={14}
containerStyle={{ marginStart: 4, bottom: 1 }}
/>
);
};
import VerifiedIcon from './VerifiedIcon';

export const VcDetails: React.FC<VcDetailsProps> = (props) => {
const { t, i18n } = useTranslation('VcDetails');
Expand Down Expand Up @@ -271,29 +261,28 @@ export const VcDetails: React.FC<VcDetailsProps> = (props) => {
{props.activeTab !== 1 ? (
props.isBindingPending ? (
<Column style={Theme.Styles.openCardBgContainer}>
<Row margin={'0 0 5 0'}>
<Row margin={'0 0 5 0'} crossAlign={'center'}>
<Icon
name="shield-alert"
color={Theme.Colors.Icon}
size={30}
type="material-community"
/>
<Text
style={{ flex: 1 }}
weight="semibold"
size="small"
margin={'0 0 5 0'}
color={Theme.Colors.statusLabel}>
{t('offlineAuthDisabledHeader')}
</Text>
</Row>

<Text
style={{ flex: 1 }}
weight="semibold"
size="small"
margin={'0 0 5 0'}
color={Theme.Colors.Details}>
{t('offlineAuthDisabledHeader')}
</Text>
<Text
style={{ flex: 1 }}
weight="regular"
size="small"
margin={'0 0 5 0'}
color={Theme.Colors.Details}>
color={Theme.Colors.statusLabel}>
{t('offlineAuthDisabledMessage')}
</Text>

Expand All @@ -314,7 +303,7 @@ export const VcDetails: React.FC<VcDetailsProps> = (props) => {
/>
<Text
numLines={1}
color={Theme.Colors.Details}
color={Theme.Colors.statusLabel}
weight="bold"
size="smaller"
margin="10 10 10 10"
Expand Down
29 changes: 13 additions & 16 deletions components/VcItem.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
import React, { useContext, useRef } from 'react';
import { useInterpret, useSelector } from '@xstate/react';
import { Pressable, Image, ImageBackground, Dimensions } from 'react-native';
import {
Pressable,
Image,
ImageBackground,
Dimensions,
View,
} from 'react-native';
import { CheckBox, Icon } from 'react-native-elements';
import { ActorRefFrom } from 'xstate';
import {
Expand All @@ -17,19 +23,9 @@ import { Theme } from './ui/styleUtils';
import { RotatingIcon } from './RotatingIcon';
import { GlobalContext } from '../shared/GlobalContext';
import { useTranslation } from 'react-i18next';

const VerifiedIcon: React.FC = () => {
return (
<Icon
name="check-circle"
color={Theme.Colors.VerifiedIcon}
size={14}
containerStyle={{ marginStart: 4, bottom: 1 }}
/>
);
};
import { LocalizedField } from '../types/vc';
import { VcItemTags } from './VcItemTags';
import VerifiedIcon from './VerifiedIcon';

const getDetails = (arg1, arg2, verifiableCredential) => {
if (arg1 === 'Status') {
Expand Down Expand Up @@ -71,8 +67,9 @@ const getDetails = (arg1, arg2, verifiableCredential) => {
? Theme.Colors.LoadingDetailsLabel
: Theme.Colors.DetailsLabel
}
weight="bold"
size="smaller">
size="smaller"
weight={'bold'}
style={Theme.Styles.vcItemLabelHeader}>
{arg1}
</Text>
<Text
Expand Down Expand Up @@ -243,7 +240,7 @@ export const VcItem: React.FC<VcItemProps> = (props) => {
style={
!verifiableCredential
? Theme.Styles.loadingTitle
: Theme.Styles.subtitle
: Theme.Styles.statusLabel
}
children={t('offlineAuthDisabledHeader')}></Text>
</Row>
Expand All @@ -264,7 +261,7 @@ export const VcItem: React.FC<VcItemProps> = (props) => {
<Row crossAlign="center" style={{ flex: 1 }}>
<WalletVerified />
<Text
color={Theme.Colors.Details}
color={Theme.Colors.statusLabel}
weight="semibold"
size="smaller"
margin="10 10 10 10"
Expand Down
16 changes: 16 additions & 0 deletions components/VerifiedIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import React from 'react';
import { View } from 'react-native';
import { Icon } from 'react-native-elements';
import { Theme } from './ui/styleUtils';

const VerifiedIcon: React.FC = () => {
return (
<View style={Theme.Styles.verifiedIconContainer}>
<View style={Theme.Styles.verifiedIconInner}>
<Icon name="check-circle" color={Theme.Colors.VerifiedIcon} size={14} />
</View>
</View>
);
};

export default VerifiedIcon;
6 changes: 4 additions & 2 deletions components/ui/styleUtils.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { DefaultTheme } from './themes/DefaultTheme';
import { PurpleTheme } from './themes/PurpleTheme';
import { APPLICATION_THEME } from 'react-native-dotenv';

// To change the theme, CSS theme file has to import and assign it to Theme in line no 6

export const Theme = DefaultTheme;
export const Theme =
APPLICATION_THEME.toLowerCase() === 'purple' ? PurpleTheme : DefaultTheme;

type SpacingXY = [number, number];
type SpacingFull = [number, number, number, number];
Expand Down
15 changes: 13 additions & 2 deletions components/ui/themes/DefaultTheme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,19 @@ export const DefaultTheme = {
backgroundColor: Colors.Grey,
borderRadius: 4,
},
statusLabel: {
color: Colors.Black,
},
verifiedIconContainer: {
marginLeft: 5,
},
verifiedIconInner: {
backgroundColor: 'white',
borderRadius: 10,
},
vcItemLabelHeader: {
color: Colors.Orange,
},
closeDetails: {
flex: 1,
flexDirection: 'row',
Expand Down Expand Up @@ -175,8 +188,6 @@ export const DefaultTheme = {
backgroundImageContainer: {
flex: 1,
padding: 10,
borderBottomColor: Colors.Grey,
borderBottomWidth: 1,
},
successTag: {
backgroundColor: Colors.Green,
Expand Down
21 changes: 17 additions & 4 deletions components/ui/themes/PurpleTheme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const Colors = {
Red: '#EB5757',
Green: '#219653',
Purple: '#70308C',
Purple2: '#AEA7FF',
Transparent: 'transparent',
Warning: '#f0ad4e',
};
Expand All @@ -23,8 +24,9 @@ export const PurpleTheme = {
Colors: {
TabItemText: Colors.Purple,
Details: Colors.White,
DetailsLabel: Colors.White,
DetailsLabel: Colors.Purple2,
LoadingDetailsLabel: Colors.Black,
statusLabel: Colors.Black,
AddIdBtnBg: Colors.Purple,
AddIdBtnTxt: Colors.Purple,
ClearAddIdBtnBg: 'transparent',
Expand Down Expand Up @@ -77,6 +79,19 @@ export const PurpleTheme = {
backgroundColor: Colors.Grey,
borderRadius: 4,
},
statusLabel: {
color: Colors.Black,
},
verifiedIconContainer: {
marginLeft: 5,
},
verifiedIconInner: {
backgroundColor: 'white',
borderRadius: 10,
},
vcItemLabelHeader: {
color: Colors.Purple2,
},
closeDetails: {
flex: 1,
flexDirection: 'row',
Expand Down Expand Up @@ -136,8 +151,6 @@ export const PurpleTheme = {
backgroundImageContainer: {
flex: 1,
padding: 10,
borderBottomColor: Colors.Grey,
borderBottomWidth: 1,
},
successTag: {
backgroundColor: Colors.Green,
Expand Down Expand Up @@ -334,7 +347,7 @@ export const PurpleTheme = {
radius: {
flex: 1,
borderRadius: 10,
backgroundColor: Colors.Orange,
backgroundColor: Colors.Purple,
},
}),
OIDCAuthStyles: StyleSheet.create({
Expand Down
4 changes: 2 additions & 2 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ PODS:
- React-jsinspector (0.64.4)
- react-native-netinfo (7.1.3):
- React-Core
- react-native-openid4vp-ble (0.3.5):
- react-native-openid4vp-ble (0.3.7):
- CrcSwift (~> 0.0.3)
- GzipSwift
- React-Core
Expand Down Expand Up @@ -665,7 +665,7 @@ SPEC CHECKSUMS:
React-jsiexecutor: 8c077bef1c64430b6034f27df1000d194551e2eb
React-jsinspector: d4f6973dd474357dbaaf6f52f31ffc713bf3e766
react-native-netinfo: 42c0965fca99069b92e3f7360ab2d425985e5104
react-native-openid4vp-ble: d689ca3519866229745df2148ce4f4e4c8f54dff
react-native-openid4vp-ble: b478fc7f3214e99aaf38e527390958ec0bd59876
react-native-restart: 45c8dca02491980f2958595333cbccd6877cb57e
react-native-rsa-native: 12132eb627797529fdb1f0d22fd0f8f9678df64a
react-native-safe-area-context: 584dc04881deb49474363f3be89e4ca0e854c057
Expand Down
Loading