Skip to content

Commit

Permalink
refactor(inji-472): remove masking in vc details page, add the testid…
Browse files Browse the repository at this point in the history
… for the download FAB icon

Signed-off-by: Vijay <[email protected]>
  • Loading branch information
vijay151096 committed Oct 23, 2023
1 parent b1a1e83 commit fa8f7b2
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 13 deletions.
5 changes: 2 additions & 3 deletions components/VC/MosipVCItem/MosipVCItemDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import {
} from '../../../types/VC/EsignetMosipVC/vc';
import {WalletBindingResponse} from '../../../shared/cryptoutil/cryptoUtil';
import {logoType} from '../../../machines/issuersMachine';
import {getMaskedText} from '../../../shared/commonUtil';

const getIssuerLogo = (isOpenId4VCI: boolean, issuerLogo: logoType) => {
if (isOpenId4VCI) {
Expand Down Expand Up @@ -168,7 +167,7 @@ export const MosipVCItemDetails: React.FC<
weight="semibold"
size="smaller"
color={Theme.Colors.Details}>
{getMaskedText(uin)}
{uin}
</Text>
</Column>
) : null}
Expand All @@ -187,7 +186,7 @@ export const MosipVCItemDetails: React.FC<
weight="semibold"
size="smaller"
color={Theme.Colors.Details}>
{getMaskedText(vid)}
{vid}
</Text>
</Column>
) : null}
Expand Down
8 changes: 4 additions & 4 deletions components/ui/themes/DefaultTheme.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable sonarjs/no-duplicate-string */
import {Dimensions, Platform, StyleSheet, ViewStyle} from 'react-native';
import {Dimensions, StyleSheet, ViewStyle} from 'react-native';
import {Spacing} from '../styleUtils';
import {isIOS} from '../../../shared/constants';

Expand Down Expand Up @@ -524,7 +524,7 @@ export const DefaultTheme = {
borderBottomColor: Colors.platinumGrey,
borderBottomWidth: 1.3,
},
downloadFabIcon: {
downloadFabIconContainer: {
height: 70,
width: 70,
borderRadius: 200,
Expand All @@ -536,14 +536,14 @@ export const DefaultTheme = {
bottom: Dimensions.get('window').width * 0.1,
right: Dimensions.get('window').width * 0.1,
},
fabIconNormal: {
downloadFabIconNormal: {
borderRadius: 200,
height: 70,
width: 70,
justifyContent: 'center',
position: 'absolute',
},
fabIconPressed: {
downloadFabIconPressed: {
borderRadius: 200,
height: 70,
width: 70,
Expand Down
8 changes: 4 additions & 4 deletions components/ui/themes/PurpleTheme.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable sonarjs/no-duplicate-string */
import {Dimensions, Platform, StyleSheet, ViewStyle} from 'react-native';
import {Dimensions, StyleSheet, ViewStyle} from 'react-native';
import {Spacing} from '../styleUtils';
import {isIOS} from '../../../shared/constants';

Expand Down Expand Up @@ -526,7 +526,7 @@ export const PurpleTheme = {
borderBottomColor: Colors.platinumGrey,
borderBottomWidth: 1.3,
},
downloadFabIcon: {
downloadFabIconContainer: {
height: 70,
width: 70,
borderRadius: 200,
Expand All @@ -538,14 +538,14 @@ export const PurpleTheme = {
bottom: Dimensions.get('window').width * 0.1,
right: Dimensions.get('window').width * 0.1,
},
fabIconNormal: {
downloadFabIconNormal: {
borderRadius: 200,
height: 70,
width: 70,
justifyContent: 'center',
position: 'absolute',
},
fabIconPressed: {
downloadFabIconPressed: {
borderRadius: 200,
height: 70,
width: 70,
Expand Down
7 changes: 5 additions & 2 deletions screens/Home/HomeScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,16 @@ export const HomeScreen: React.FC<HomeRouteProps> = props => {
return (
<LinearGradient
colors={Theme.Colors.gradientBtn}
style={Theme.Styles.downloadFabIcon}>
style={Theme.Styles.downloadFabIconContainer}>
<Pressable
onPress={() => {
controller.GOTO_ISSUERS();
}}
testID="downloadIcon"
style={({pressed}) =>
pressed ? Theme.Styles.fabIconPressed : Theme.Styles.fabIconNormal
pressed
? Theme.Styles.downloadFabIconPressed
: Theme.Styles.downloadFabIconNormal
}>
{plusIcon}
</Pressable>
Expand Down

0 comments on commit fa8f7b2

Please sign in to comment.