-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: update and add to in app tours (#1353)
Signed-off-by: Bryce McMath <[email protected]>
- Loading branch information
1 parent
a58dbc3
commit 5331f9f
Showing
16 changed files
with
227 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import { useTheme, TourStep, TourBox } from 'aries-bifold' | ||
import * as React from 'react' | ||
import { useTranslation } from 'react-i18next' | ||
import { Image, Text } from 'react-native' | ||
|
||
import useTourImageDimensions from '../../hooks/tour-image-dimensions' | ||
|
||
export const credentialOfferTourSteps: TourStep[] = [ | ||
{ | ||
render: (props) => { | ||
const { currentTour, currentStep, next, stop, previous } = props | ||
const { t } = useTranslation() | ||
const { ColorPallet, TextTheme } = useTheme() | ||
const { imageWidth, imageHeight } = useTourImageDimensions() | ||
|
||
return ( | ||
<TourBox | ||
title={t('Tour.CredentialOffers')} | ||
hideLeft | ||
rightText={t('Tour.Done')} | ||
onRight={stop} | ||
currentTour={currentTour} | ||
currentStep={currentStep} | ||
previous={previous} | ||
stop={stop} | ||
next={next} | ||
> | ||
<Image | ||
source={require('../../assets/img/credential-offer-illustration.png')} | ||
resizeMode={'contain'} | ||
resizeMethod={'resize'} | ||
style={{ | ||
alignSelf: 'center', | ||
width: imageWidth, | ||
height: imageHeight, | ||
}} | ||
/> | ||
<Text | ||
style={{ | ||
...TextTheme.normal, | ||
color: ColorPallet.notification.infoText, | ||
}} | ||
allowFontScaling={false} | ||
> | ||
{t('Tour.CredentialOffersDescription')} | ||
</Text> | ||
</TourBox> | ||
) | ||
}, | ||
}, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import { useTheme, TourStep, TourBox } from 'aries-bifold' | ||
import * as React from 'react' | ||
import { useTranslation } from 'react-i18next' | ||
import { Image, Text } from 'react-native' | ||
|
||
import useTourImageDimensions from '../../hooks/tour-image-dimensions' | ||
|
||
export const credentialsTourSteps: TourStep[] = [ | ||
{ | ||
render: (props) => { | ||
const { currentTour, currentStep, next, stop, previous } = props | ||
const { t } = useTranslation() | ||
const { ColorPallet, TextTheme } = useTheme() | ||
const { imageWidth, imageHeight } = useTourImageDimensions() | ||
|
||
return ( | ||
<TourBox | ||
title={t('Tour.AddCredentials')} | ||
hideLeft | ||
rightText={t('Tour.Done')} | ||
onRight={stop} | ||
currentTour={currentTour} | ||
currentStep={currentStep} | ||
previous={previous} | ||
stop={stop} | ||
next={next} | ||
> | ||
<Image | ||
source={require('../../assets/img/mobile-phone-scanning-laptop.jpg')} | ||
resizeMode={'contain'} | ||
resizeMethod={'resize'} | ||
style={{ | ||
alignSelf: 'center', | ||
width: imageWidth, | ||
height: imageHeight, | ||
}} | ||
/> | ||
<Text | ||
style={{ | ||
...TextTheme.normal, | ||
color: ColorPallet.notification.infoText, | ||
}} | ||
allowFontScaling={false} | ||
> | ||
{t('Tour.AddCredentialsDescription')} | ||
</Text> | ||
</TourBox> | ||
) | ||
}, | ||
}, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import { useTheme, TourStep, TourBox } from 'aries-bifold' | ||
import * as React from 'react' | ||
import { useTranslation } from 'react-i18next' | ||
import { Image, Text } from 'react-native' | ||
|
||
import useTourImageDimensions from '../../hooks/tour-image-dimensions' | ||
|
||
export const proofRequestTourSteps: TourStep[] = [ | ||
{ | ||
render: (props) => { | ||
const { currentTour, currentStep, next, stop, previous } = props | ||
const { t } = useTranslation() | ||
const { ColorPallet, TextTheme } = useTheme() | ||
const { imageWidth, imageHeight } = useTourImageDimensions() | ||
|
||
return ( | ||
<TourBox | ||
title={t('Tour.ProofRequests')} | ||
hideLeft | ||
rightText={t('Tour.Done')} | ||
onRight={stop} | ||
currentTour={currentTour} | ||
currentStep={currentStep} | ||
previous={previous} | ||
stop={stop} | ||
next={next} | ||
> | ||
<Image | ||
source={require('../../assets/img/proof-request-illustration.png')} | ||
resizeMode={'contain'} | ||
resizeMethod={'resize'} | ||
style={{ | ||
alignSelf: 'center', | ||
width: imageWidth, | ||
height: imageHeight, | ||
}} | ||
/> | ||
<Text | ||
style={{ | ||
...TextTheme.normal, | ||
color: ColorPallet.notification.infoText, | ||
}} | ||
allowFontScaling={false} | ||
> | ||
{t('Tour.ProofRequestsDescription')} | ||
</Text> | ||
</TourBox> | ||
) | ||
}, | ||
}, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { useWindowDimensions } from 'react-native' | ||
|
||
const useTourImageDimensions = () => { | ||
const { width: windowWidth } = useWindowDimensions() // NOSONAR | ||
const totalHorizontalImagePadding = 90 | ||
const imageWidth = Math.floor(windowWidth - totalHorizontalImagePadding) | ||
const imageHeight = Math.floor(imageWidth * 0.66) | ||
|
||
return { imageWidth, imageHeight } | ||
} | ||
|
||
export default useTourImageDimensions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.