-
Notifications
You must be signed in to change notification settings - Fork 2
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
Spike binny in app feedback #10166
base: develop
Are you sure you want to change the base?
Spike binny in app feedback #10166
Changes from all commits
e97629c
f8f7b68
bfa13ac
2574509
8d75526
0b8d194
fd487fc
324c8b5
75780ae
77ebb28
a62a71e
d99dbaf
6e95593
19650d0
1ae041b
0ef0132
a1d0a51
899ef59
32ec0d0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,7 +37,7 @@ import { | |
overrideLocalVersion, | ||
setVersionSkipped, | ||
} from 'utils/homeScreenAlerts' | ||
import { useAlert, useAppDispatch, useRouteNavigation, useTheme } from 'utils/hooks' | ||
import { useAlert, useAppDispatch, useGiveFeedback, useRouteNavigation, useTheme } from 'utils/hooks' | ||
import { STORAGE_REVIEW_EVENT_KEY, resetReviewActionCount } from 'utils/inAppReviews' | ||
|
||
type DeveloperScreenSettingsScreenProps = StackScreenProps<HomeStackParamList, 'Developer'> | ||
|
@@ -52,6 +52,7 @@ function DeveloperScreen({ navigation }: DeveloperScreenSettingsScreenProps) { | |
const dispatch = useAppDispatch() | ||
const navigateTo = useRouteNavigation() | ||
const resetFirstTimeLoginAlert = useAlert() | ||
const inAppFeedback = useGiveFeedback() | ||
const [localVersionName, setVersionName] = useState<string>() | ||
const [whatsNewLocalVersion, setWhatsNewVersion] = useState<string>() | ||
const [skippedVersion, setSkippedVersionHomeScreen] = useState<string>() | ||
|
@@ -174,6 +175,11 @@ function DeveloperScreen({ navigation }: DeveloperScreenSettingsScreenProps) { | |
}, | ||
] | ||
|
||
const onFeedback = () => { | ||
//logAnalyticsEvent(Events.vama_feedback_page_entered()) | ||
inAppFeedback('Developer') | ||
} | ||
|
||
return ( | ||
<FeatureLandingTemplate | ||
backLabel={t('settings.title')} | ||
|
@@ -202,6 +208,9 @@ function DeveloperScreen({ navigation }: DeveloperScreenSettingsScreenProps) { | |
</TextView> | ||
</Box> | ||
</TextArea> | ||
<TextArea> | ||
<Button onPress={onFeedback} label={'In App Feedback Screen'} /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does this need a translation? |
||
</TextArea> | ||
</Box> | ||
<Box> | ||
<TextView | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
import React, { useState } from 'react' | ||
import { useTranslation } from 'react-i18next' | ||
|
||
import { StackScreenProps } from '@react-navigation/stack/lib/typescript/src/types' | ||
|
||
import { Button } from '@department-of-veterans-affairs/mobile-component-library' | ||
import { RootNavStackParamList } from 'App' | ||
|
||
import { BorderColorVariant, Box, LargePanel, RadioGroup, RadioGroupProps, TextView, VATextInput } from 'components' | ||
import { NAMESPACE } from 'constants/namespaces' | ||
import { useTheme } from 'utils/hooks' | ||
|
||
type InAppFeedbackScreenProps = StackScreenProps<RootNavStackParamList, 'InAppFeedback'> | ||
|
||
function InAppFeedbackScreen({ navigation }: InAppFeedbackScreenProps) { | ||
const { t } = useTranslation(NAMESPACE.COMMON) | ||
const theme = useTheme() | ||
const [satisfaction, setSatisfaction] = useState('') | ||
const [task, setTaskOverride] = useState('') | ||
|
||
// useBeforeNavBackListener(navigation, () => { | ||
// logAnalyticsEvent(Events.vama_feedback_page_closed()) | ||
// }) | ||
|
||
const onChange = (value: string): void => { | ||
setSatisfaction(value) | ||
} | ||
|
||
const onSubmit = (): void => { | ||
// logAnalyticsEvent(Events.vama_feedback_submitted(taskCompleted, satisfaction)) | ||
navigation.goBack() | ||
} | ||
|
||
const radioGroupProps: RadioGroupProps<string> = { | ||
isRadioList: false, | ||
onChange: onChange, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This can probably just be |
||
options: [ | ||
{ | ||
labelKey: t('inAppFeedback.overallSatisfaction.notAtAllSatisfied'), | ||
value: t('inAppFeedback.overallSatisfaction.notAtAllSatisfied'), | ||
}, | ||
{ | ||
labelKey: t('inAppFeedback.overallSatisfaction.dissatisfied'), | ||
value: t('inAppFeedback.overallSatisfaction.dissatisfied'), | ||
}, | ||
{ | ||
labelKey: t('inAppFeedback.overallSatisfaction.neither'), | ||
value: t('inAppFeedback.overallSatisfaction.neither'), | ||
}, | ||
{ | ||
labelKey: t('inAppFeedback.overallSatisfaction.satisfied'), | ||
value: t('inAppFeedback.overallSatisfaction.satisfied'), | ||
}, | ||
{ | ||
labelKey: t('inAppFeedback.overallSatisfaction.verySatisfied'), | ||
value: t('inAppFeedback.overallSatisfaction.verySatisfied'), | ||
}, | ||
], | ||
value: satisfaction, | ||
} | ||
|
||
return ( | ||
<LargePanel title={t('inAppFeedback.title')} rightButtonText={t('close')}> | ||
<Box mb={theme.dimensions.contentMarginBottom} mx={theme.dimensions.gutter}> | ||
<TextView variant="MobileBodyBold" accessibilityRole="header"> | ||
{t('inAppFeedback.whatTask.header')} | ||
</TextView> | ||
<TextView variant="MobileBody" mb={theme.dimensions.alertBorderWidth}> | ||
{t('inAppFeedback.whatTask.body')} | ||
</TextView> | ||
<VATextInput | ||
inputType="none" | ||
isTextArea={true} | ||
value={task} | ||
testID="AppFeedbackTaskID" | ||
onChange={(val) => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can probably simplify to |
||
setTaskOverride(val) | ||
}} | ||
/> | ||
<Box> | ||
<TextView my={theme.dimensions.standardMarginBetween} variant="MobileBodyBold" accessibilityRole="header"> | ||
{t('inAppFeedback.overallSatisfaction.header')} | ||
</TextView> | ||
<RadioGroup {...radioGroupProps} /> | ||
</Box> | ||
<Box mb={theme.dimensions.standardMarginBetween}> | ||
<Button onPress={onSubmit} label={t('submit')} /> | ||
</Box> | ||
<Box | ||
borderTopWidth={theme.dimensions.borderWidth} | ||
borderColor={theme.colors.border.prescriptionDivider as BorderColorVariant}> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should this color be renamed if it's used in multiple places? |
||
<TextView variant="HelperText" mt={theme.dimensions.standardMarginBetween}> | ||
{t('inAppFeedback.legalReqs.number')} | ||
</TextView> | ||
<TextView variant="HelperText">{t('inAppFeedback.legalReqs.expiration')}</TextView> | ||
<TextView variant="HelperText">{t('inAppFeedback.legalReqs.burdenTime')}</TextView> | ||
<TextView variant="HelperText" mt={theme.dimensions.standardMarginBetween}> | ||
{t('inAppFeedback.legalReqs.paragraph')} | ||
</TextView> | ||
</Box> | ||
</Box> | ||
</LargePanel> | ||
) | ||
} | ||
|
||
export default InAppFeedbackScreen |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -820,6 +820,25 @@ | |
"howWillYou.useInfo.1": "We’ll use this information to contact you about certain benefits and services, like disability compensation, pension benefits, and claims and appeals.", | ||
"howWillYou.useInfo.2": "If you’re enrolled in VA health care, we’ll send your prescriptions to your mailing address. Your health care team may also use this information to contact you.", | ||
"icon.success": "Success icon,", | ||
"inAppFeedback.title": "Give feedback", | ||
"inAppFeedback.a11yHint": "Go to the give feedback page", | ||
"inAppFeedback.popup.title": "Leave feedback?", | ||
"inAppFeedback.popup.body": "Leaving us feedback helps us improve.", | ||
"inAppFeedback.popup.notNow": "Not now", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This could just use 'notNow' as the key |
||
"inAppFeedback.popup.accept": "Give feedback", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Instead of adding this translation twice, you could add it once with |
||
"inAppFeedback.whatTask.header": "What task were you trying to do today?", | ||
"inAppFeedback.whatTask.body": "Please don't enter personal information into the text box. This includes your name, address, Social Security Number, medical information or anything else that someone could use to identify you.", | ||
"inAppFeedback.taskSelection.header": "What task were you trying to do today?", | ||
"inAppFeedback.overallSatisfaction.header": "What is your overall satisfaction with this app?", | ||
"inAppFeedback.overallSatisfaction.notAtAllSatisfied": "Not at all satisfied", | ||
"inAppFeedback.overallSatisfaction.dissatisfied": "Dissatisfied", | ||
"inAppFeedback.overallSatisfaction.neither": "Neither satisfied or dissatisfied", | ||
"inAppFeedback.overallSatisfaction.satisfied": "Satisfied", | ||
"inAppFeedback.overallSatisfaction.verySatisfied": "Very satisfied", | ||
"inAppFeedback.legalReqs.number": "OMB Number: 2900-0876", | ||
"inAppFeedback.legalReqs.expiration": "Expiration: 02/28/2026", | ||
"inAppFeedback.legalReqs.burdenTime": "Burden Time: 3 Minutes", | ||
"inAppFeedback.legalReqs.paragraph": "VA may utilize individual Veteran survey data from this survey or other sources to ensure the final scores truly and accurately represent the experiences of Veterans. This information is collected in accordance with section 3507 of the Paperwork Reduction Act of 1995. Title 38, United States Code, allows us to ask for this information. We estimate that you will need an average of 3 minutes to review the instructions and complete this survey. The results of this survey will be used to inform opportunities for program improvement in the quality of VA services. Participation in this survey is voluntary, and your decision not to respond will have no impact on VA benefits or services which you may currently be receiving. VA cannot conduct or sponsor a collection of information unless a valid OMB control number is displayed. You are not required to respond to a collection of information if this number is not displayed. Valid OMB control numbers can be located on the OMB Internet Page at https://www.reginfo.gov/public/do/PRAMain. Information gathered will be kept private to the extent provided by law.", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should the link be clickable? |
||
"inAppRecruitment.contracts": "VA contracts: 36C10B22C0011 & 36C10X18C0061", | ||
"inAppRecruitment.giveFeedback": "Give feedback", | ||
"inAppRecruitment.giveFeedback.a11yHint": "Go to the give feedback page", | ||
|
@@ -931,6 +950,7 @@ | |
"movedToThisStepOn": "Moved to this step on {{date}}", | ||
"needed": "needed", | ||
"next": "Next", | ||
"no": "No", | ||
"noActivity": "There's no activity to show.", | ||
"noAppointments.visitVA": "Visit VA.gov", | ||
"noAppointments.youCanSchedule": "You can schedule an appointment on VA.gov, or you can call your VA medical center to schedule an appointment.", | ||
|
@@ -1378,6 +1398,7 @@ | |
"statusDefinition.transferred": "A prescription moved to VA’s new electronic health record. This prescription may also be described as “Discontinued” on medication lists from your healthcare team. Take your medications as prescribed by your healthcare team.", | ||
"statusDefinition.unknown": "The status cannot be determined. Contact your VA care team when you need more of this VA prescription. A prescription stopped by a VA provider. It is no longer available to be filled.", | ||
"stepXofY": "Step {{current}} of {{total}}", | ||
"submit": "Submit", | ||
"success": "Success", | ||
"sync.progress.signin": "Signing you in...", | ||
"sync.progress.signout": "Signing you out...", | ||
|
@@ -1474,5 +1495,6 @@ | |
"webview.vagov": "va.gov", | ||
"webview.valocation.loading": "Loading VA location finder...", | ||
"whatsNew.dismissMessage": "Dismiss this message", | ||
"whatsNew.title": "What's new" | ||
"whatsNew.title": "What's new", | ||
"yes": "Yes" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -257,6 +257,28 @@ export function useExternalLink(): (url: string, eventParams?: EventParams) => v | |
} | ||
} | ||
|
||
export function useGiveFeedback(): (task: string) => void { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider creating a constant to collect all the possible values in one place |
||
const navigateTo = useRouteNavigation() | ||
const { t } = useTranslation(NAMESPACE.COMMON) | ||
|
||
return (task: string) => { | ||
const onOKPress = () => { | ||
navigateTo('InAppFeedback', { task }) | ||
} | ||
|
||
const onCancelPress = () => {} | ||
|
||
Alert.alert(t('inAppFeedback.popup.title'), t('inAppFeedback.popup.body'), [ | ||
{ | ||
text: t('inAppFeedback.popup.notNow'), | ||
style: 'cancel', | ||
onPress: onCancelPress, | ||
}, | ||
{ text: t('inAppFeedback.popup.accept'), onPress: onOKPress, style: 'default' }, | ||
]) | ||
} | ||
} | ||
|
||
export type useDestructiveActionSheetButtonProps = { | ||
/** text of button */ | ||
text: string | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Committing these analytics commented out for the other ticket to provide.