diff --git a/.github/ISSUE_TEMPLATE/release_ticket.md b/.github/ISSUE_TEMPLATE/release_ticket.md index 9d5b6292b61..85ec5d4d378 100644 --- a/.github/ISSUE_TEMPLATE/release_ticket.md +++ b/.github/ISSUE_TEMPLATE/release_ticket.md @@ -3,7 +3,7 @@ name: Release Review Template about: Template for requesting a production release for VA mobile app title: "{{ env.releaseDate }} Release Sign-Off: {{ env.versionNumber }}" labels: release -assignees: timwright12, chrisj-usds, dumathane, SarahHuber-AdHoc, DonMcCaugheyUSDS, TKDickson +assignees: DonMcCaugheyUSDS --- diff --git a/VAMobile/documentation/docs/Flagship design library/Content/content-style-guide.md b/VAMobile/documentation/docs/Flagship design library/Content/content-style-guide.md index 4b73d20c984..847c4a99610 100644 --- a/VAMobile/documentation/docs/Flagship design library/Content/content-style-guide.md +++ b/VAMobile/documentation/docs/Flagship design library/Content/content-style-guide.md @@ -4,7 +4,7 @@ sidebar_position: 1 --- ## Voice and tone -We follow the [VA design system content principles](https://design.va.gov/content-style-guide/content-principles). In following these principles, we create consistent, clear, and customer-centered content that is based on Veteran feedback. +We follow the [VA design system content principles](https://design.va.gov/content-style-guide/content-principles). In following these principles, we create consistent, clear, and user-centered content that is based on Veteran feedback. In addition, we follow [VA plain language standards](https://design.va.gov/content-style-guide/plain-language/) to help Veterans and their families find and understand the information they need. @@ -12,7 +12,7 @@ Since we create content for health-related features, we also follow the [VA cont ## Accessible and inclusive language We write for all Veterans and those who care for them. Therefore, we use people-first language that is inclusive of the wide range of abilities and experiences of our users. -We avoid words that are insensitive to the disabilities faced by our users. For example, we don’t use “view” or “see,” since a number of our users are blind or low-vision. We also avoid idioms, such as “at your fingertips” or “give an arm or a leg.” Not only are idioms often insensitive to Veterans’ experience but also idioms don’t follow plain language standards. +We avoid words that are insensitive to the disabilities faced by our users. For example, we don’t use “see” since a number of our users are blind or low-vision. We also avoid idioms, such as “at your fingertips” or “give an arm or a leg.” Not only are idioms often insensitive to Veterans’ experience, but also idioms don’t follow plain language standards. Resources to consider: @@ -26,25 +26,22 @@ We follow [VA.gov content style guide rules](https://design.va.gov/content-style ### Capitalization -- Screen names are title case. With the new navigation design, we will [change to sentence case for screen titles](https://github.com/department-of-veterans-affairs/va-mobile-app/issues/2575). -- All other headings in the app are sentence case. -- Buttons - - For native actions, we use title case for iOS and all caps for Android. - - For interface buttons, we use sentence case. - +- For native actions, we use title case for iOS and all caps for Android. +- For interface buttons, we use sentence case. ### Times and time zones -- We currently use `AM` and `PM` (both letters capitalized and no punctuation) since this is default formatting in React Native. +- Due to default formatting in React Native, when times/time zones aren't hardcoded, our formatting differs from VA.gov. For example, React Native formats as `AM` and `PM` (both letters capitalized and no punctuation) and `EST` (three-letter format). +- When times and timezones are hardcoded, we follow the VA.gov content style guide. ## Word choice, spelling, and naming conventions ### Content briefs -We use [content briefs](https://github.com/department-of-veterans-affairs/va.gov-team/tree/master/products/content/content-briefs) to ensure consistent word choice and usage with other VA teams. VA Sitewide Content and IA team creates content briefs, sometimes in collaboration with the VA Mobile App content designer. +We use [content briefs](https://github.com/department-of-veterans-affairs/va.gov-team/tree/master/products/content/content-briefs) to ensure consistent word choice and usage with other VA teams. VA.gov's content team creates content briefs, sometimes in collaboration with the VA Mobile App content designer. ### [Word List](https://design.va.gov/content-style-guide/word-list) We use standard American English spelling in Merriam-Webster Dictionary. The words on the VA.gov word list are exceptions or need clarification. ### [Naming conventions](https://design.va.gov/content-style-guide/naming-and-labels) -We follow VA.gov content style guide’s [rules for naming and labels](https://design.va.gov/content-style-guide/naming-and-labels) for tools, products, benefits, offices, and programs. -In most cases, VA.gov will have already established a name for a tool, benefit, etc. For cases in which we would like to suggest a different name or need help with naming an app-specific feature, we work closely with VA Sitewide Content team to ensure alignment. +We follow VA.gov content style guide’s [rules for naming and labels](https://design.va.gov/content-style-guide/naming-and-labels) for tools, products, benefits, offices, and programs. +In most cases, VA.gov will have already established a name for a tool, benefit, etc. For cases in which we'd like to suggest a different name or need help with naming an app-specific feature, we work closely with VA.gov's content team to ensure alignment. ## Error messages VA.gov’s design system includes a section on [how to help users recover from errors](https://design.va.gov/patterns/help-users-to/recover-from-errors). It details the structure, style, and tone for error and informational messages. diff --git a/VAMobile/documentation/docs/QA/QualityAssuranceProcess/Automation/index.md b/VAMobile/documentation/docs/QA/QualityAssuranceProcess/Automation/index.md index 89c65c4c757..219fd683465 100644 --- a/VAMobile/documentation/docs/QA/QualityAssuranceProcess/Automation/index.md +++ b/VAMobile/documentation/docs/QA/QualityAssuranceProcess/Automation/index.md @@ -23,6 +23,7 @@ Follow instructions for FE [Development Setup Instructions](https://department-o ### Local setup for detox 1. Check for the [detox pre-reqs](https://wix.github.io/Detox/docs/introduction/getting-started#detox-prerequisites) on your local machine and install if needed using the `yarn` package manager. + - If needed find and delete the detoxrc.js file. This file is sometimes created when you initially install detox and is not needed because the VA Mobile App uses .detoxrc.json file. 2. Check that the emulators used by the script ([listed in .detoxrc.json](https://github.com/department-of-veterans-affairs/va-mobile-app/blob/develop/VAMobile/.detoxrc.json#L17)) are installed on your machine, and install them if not. [Helpful instructions from detox](https://wix.github.io/Detox/docs/introduction/project-setup#step-3-device-configs) - If you need to create a new Android emulator, make sure to bump up the internal storage (default is 800, bumping to 8000 definitely works). If you don't do this, you'll get an out of storage error. One path that works for this: Shift-Shift > search "Virtual Device Manager" > {create new device or edit existing device} > Show Advanced Settings > scroll down to the "Memory and Storage" section to find the "Internal Storage" field 3. Build and Run App diff --git a/VAMobile/documentation/docs/UX/Foundations/Information-Architecture.md b/VAMobile/documentation/docs/UX/Foundations/Information-Architecture.md index ee1952145be..46fbec3f811 100644 --- a/VAMobile/documentation/docs/UX/Foundations/Information-Architecture.md +++ b/VAMobile/documentation/docs/UX/Foundations/Information-Architecture.md @@ -16,10 +16,10 @@ The following guiding principles are used to help Veterans find information and * **Informed by Veterans:** IA decisions are based on user research conducted with Veterans, examining their mental models around the organization of common tasks and undertanding of labels, as well as getting feedback on proposed solutions. * **Keeps it simple:** Content is prioiritized and includes only what’s absolutely necessary—the fewer elements (number of levels in the hierarchy, number of screens, number of links on a screen) the better. -References: -[VA.gov Information Architecture (IA) team](https://github.com/department-of-veterans-affairs/va.gov-team/tree/69833737d9fe22b8990bb987e7c50de13205c5d5/platform/information-architecture) -[Best Practices for IA on VA.gov](https://github.com/department-of-veterans-affairs/va.gov-team/blob/master/platform/information-architecture/ia-best-practices.md) -[VA.gov Design principles](https://design.va.gov/about/principles) +### References: +* [VA.gov Information Architecture (IA) team](https://github.com/department-of-veterans-affairs/va.gov-team/tree/69833737d9fe22b8990bb987e7c50de13205c5d5/platform/information-architecture) +* [Best Practices for IA on VA.gov](https://github.com/department-of-veterans-affairs/va.gov-team/blob/69833737d9fe22b8990bb987e7c50de13205c5d5/platform/information-architecture/ia-best-practices.md) +* [VA.gov Design principles](https://design.va.gov/about/principles) @@ -68,6 +68,6 @@ The VA Health and Benefits app’s IA contains four top level categories: Home, ## Background The VA Health and Benefits app’s Information Architecture and navigation model are based on the findings and output from a multi-stage, collaborative and cross-functional design and research process: [Information Architecture and Navigation - High Level Project Summary](https://github.com/department-of-veterans-affairs/va.gov-team/blob/master/products/va-mobile-app/ux-design/information-architecture-navigation/High%20Level%20Project%20Summary.md) -* [**Phase I:** Two rounds of card sorting](https://github.com/department-of-veterans-affairs/va.gov-team/tree/master/products/va-mobile-app/ux-research/information-architecture) (open and closed) with Veterans +* [**Phase I:** Two rounds of card sorting](https://github.com/department-of-veterans-affairs/va.gov-team/tree/master/products/va-mobile-app/ux-design/information-architecture-navigation#phase-i---information-architecture-research) (open and closed) with Veterans * [**Phase II:** Navigation model design exploration](https://github.com/department-of-veterans-affairs/va.gov-team/tree/master/products/va-mobile-app/ux-design/information-architecture-navigation#phase-ii---navigation-model-exploration--implementation), audit and comparative analysis -* [**Phase III:** Evaluative testing](https://github.com/department-of-veterans-affairs/va.gov-team/tree/master/products/va-mobile-app/ux-research/usability-testing/new%20navigation%20usability) with Veterans, including a usability study of the proposed navigation model and sitemap reflected through a low-fidelity prototype \ No newline at end of file +* [**Phase III:** Evaluative testing](https://github.com/department-of-veterans-affairs/va.gov-team/tree/master/products/va-mobile-app/ux-design/information-architecture-navigation#phase-iii----evaluative-research) with Veterans, including a usability study of the proposed navigation model and sitemap reflected through a low-fidelity prototype \ No newline at end of file diff --git a/VAMobile/documentation/docs/UX/Foundations/Research/index.md b/VAMobile/documentation/docs/UX/Foundations/Research/index.md index 76e85e5dc29..738dd61966f 100644 --- a/VAMobile/documentation/docs/UX/Foundations/Research/index.md +++ b/VAMobile/documentation/docs/UX/Foundations/Research/index.md @@ -59,9 +59,9 @@ The research study lead uses the information provided from Perigean, the VA’s - [Sign Up Sheet Template](https://docs.google.com/spreadsheets/d/1N8pTY9LEujEzMWVuI5Bzf0_9yJ_2JpHt/edit?usp=sharing&ouid=118400044101943019619&rtpof=true&sd=true) ## VA Mobile app research -* [VA mobile app UX research on Github](https://github.com/department-of-veterans-affairs/va.gov-team/tree/master/products/va-mobile-app/ux-research) +* [VA mobile app UX research on Github](https://github.com/department-of-veterans-affairs/va.gov-team/tree/777d2cbccd0121a76011b7b43b74720c875f4f34/products/va-mobile-app/research/ux) Research plans and findings for VA mobile app features and research efforts, 2020 to present. -* [Conducting remote User Research with a pre-release production app build & user credentials](https://github.com/department-of-veterans-affairs/va.gov-team/blob/master/products/va-mobile-app/ux-research/research-operations/research-pre-release-prod-app-build-how-to.md) +* [Conducting remote User Research with a pre-release production app build & user credentials](https://github.com/department-of-veterans-affairs/va.gov-team/blob/cffaa1b43377935e24b90dd6b5b21d4135cf67d4/products/va-mobile-app/research/ux/research-operations/research-pre-release-prod-app-build-how-to.md) Planning tips and a template for conducting remote research with a pre-release production app build. ## VA Research resources diff --git a/VAMobile/documentation/docs/UX/How-We-Work/designing-ui.md b/VAMobile/documentation/docs/UX/How-We-Work/designing-ui.md index ef42b3d57ef..fab6f3ba9f4 100644 --- a/VAMobile/documentation/docs/UX/How-We-Work/designing-ui.md +++ b/VAMobile/documentation/docs/UX/How-We-Work/designing-ui.md @@ -102,7 +102,7 @@ Once designs are ready to be handed off to the engineering team, you can review - If you notice that QA engineering is not finding bugs that should have been caught in earlier tickets, let QA know, so they can improve their work. ### Launching -- For major features, team members should expect to work with the [Design Librarian](https://department-of-veterans-affairs.github.io/va-mobile-app/docs/UX/How-We-Work/design-librarian) and the Product team to prepare the [app store content](https://didactic-robot-p9wpqpp4wwh99w-3000.app.github.dev/va-mobile-app/docs/Operations/Updating%20the%20App%20Stores). +- For major features, team members should expect to work with the [Design Librarian](https://department-of-veterans-affairs.github.io/va-mobile-app/docs/UX/How-We-Work/design-librarian) and the Product team to prepare the [app store content](https://department-of-veterans-affairs.github.io/va-mobile-app/docs/Operations/Updating%20the%20App%20Stores). ## Moving/Publishing Work diff --git a/VAMobile/documentation/docs/UX/Resources.md b/VAMobile/documentation/docs/UX/Resources.md index 7a3a2b42c48..96f495628b5 100644 --- a/VAMobile/documentation/docs/UX/Resources.md +++ b/VAMobile/documentation/docs/UX/Resources.md @@ -8,18 +8,17 @@ VA Mobile app [UX resources on github](https://github.com/department-of-veterans ## Design ### Figma -#### [VA Mobile Team](https://www.figma.com/files/team/1114266503868297401) +#### [VA Mobile Team](https://www.figma.com/files/project/301450677) * Current features, resources, libraries, and design explorations. -#### [Design Library](https://www.figma.com/files/827597988283174959/project/60961499/%F0%9F%93%90-Design-Library?fuid=1114240858371616544) +#### [Design Library](https://www.figma.com/design/QVLPB3eOunmKrgQOuOt0SU/%F0%9F%93%90-Flagship-Library---Resource---VA-Mobile?m=auto) * Finalized components, text styles, and color styles. #### 🚢 Shipped files * Example screens that are in production. - * [Global](https://www.figma.com/file/PpHk9Yyw8dC9xj38AeR9pL/%F0%9F%9A%A2-Global-2.0---Shipped---VA-Mobile?t=i6c9U7y2iqNodqgF-1) - * [Home](https://www.figma.com/file/ddMWiCQCfmUKFhMcYG9fYv/%F0%9F%9A%A2-Home-2.0---Shipped---VA-Mobile?t=i6c9U7y2iqNodqgF-1) & [Profile](https://www.figma.com/file/O6sdr5N7xV6GOZhTPcgY5x/%F0%9F%9A%A2-Profile-2.0---Shipped---VA-Mobile) - * [Benefits](https://www.figma.com/file/p0vlRz38TKIOwWDfI2bGc7/%F0%9F%9A%A2-Benefits-2.0---Shipped---VA-Mobile?t=i6c9U7y2iqNodqgF-1) - * [Health](https://www.figma.com/file/JQAoUBxvSWCzKvu2ifRRE7/%F0%9F%9A%A2-Health-2.0---Shipped---VA-Mobile?t=i6c9U7y2iqNodqgF-1) - * [Payments](https://www.figma.com/file/yhGsaPc2px6eCVzXhuOwm4/%F0%9F%9A%A2-Payments-2.0---Shipped---VA-Mobile?t=i6c9U7y2iqNodqgF-1) + * [Home](https://www.figma.com/design/ddMWiCQCfmUKFhMcYG9fYv/Home-2.0---%F0%9F%9A%A2-Shipped---VA-Mobile?m=auto&t=2n0WqYtVYQ75swD8-6) & [Profile](https://www.figma.com/design/O6sdr5N7xV6GOZhTPcgY5x/Profile-2.0---%F0%9F%9A%A2-Shipped---VA-Mobile?m=auto&t=2n0WqYtVYQ75swD8-6) + * [Benefits](https://www.figma.com/design/p0vlRz38TKIOwWDfI2bGc7/Benefits-2.0---%F0%9F%9A%A2-Shipped---VA-Mobile?m=auto&t=2n0WqYtVYQ75swD8-6) + * [Health](https://www.figma.com/design/JQAoUBxvSWCzKvu2ifRRE7/Health-2.0---%F0%9F%9A%A2-Shipped---VA-Mobile?m=auto&t=2n0WqYtVYQ75swD8-6) + * [Payments](https://www.figma.com/design/yhGsaPc2px6eCVzXhuOwm4/Payments-2.0---%F0%9F%9A%A2-Shipped---VA-Mobile?m=auto&t=2n0WqYtVYQ75swD8-6) ### Balsamiq * [UX brainstorm & work](https://balsamiq.cloud/s4uw4la/pnnwuqv) @@ -32,7 +31,7 @@ VA Mobile app [UX resources on github](https://github.com/department-of-veterans ## Research -* [UX research on Github](https://github.com/department-of-veterans-affairs/va.gov-team/tree/master/products/va-mobile-app/ux-research) +* [UX research on Github](https://github.com/department-of-veterans-affairs/va.gov-team/tree/4b1fcf3124f72b518e91c0af83723bd270ff793f/products/va-mobile-app/research/ux) * Research folders for all VA Mobile app studies. ## VA Design System diff --git a/VAMobile/documentation/src/components/HomepageFeatures.tsx b/VAMobile/documentation/src/components/HomepageFeatures.tsx index 8dda3971190..966bc0d9bab 100644 --- a/VAMobile/documentation/src/components/HomepageFeatures.tsx +++ b/VAMobile/documentation/src/components/HomepageFeatures.tsx @@ -23,13 +23,14 @@ const baseUrl = '/va-mobile-app' const FeatureList: FeatureItem[] = [ { - title: 'VA: Health and Benefits App', + title: 'VA: Health and Benefits', image: `${baseUrl}/img/va-logo.png`, alt: `Department of Veteran Affairs logo`, useMobileImageCss: true, description: ( <> - The mobile app allows Veterans to more easily complete key transactions across VA health and benefits services. + With the VA: Health and Benefits app, Veterans can manage the VA health care and benefits tasks they do most + often—all in one simple app. ), }, diff --git a/VAMobile/e2e/tests/utils.ts b/VAMobile/e2e/tests/utils.ts index 564ed270373..7754cbcdd3d 100644 --- a/VAMobile/e2e/tests/utils.ts +++ b/VAMobile/e2e/tests/utils.ts @@ -147,9 +147,9 @@ export const CommonE2eIdConstants = { } /** Logs into demo mode. -* @param skipOnboarding: Boolean value that defaults to true. Set this to false if you want the detox test to view the onboarding carasoul on login -* @param pushNotifications: Boolean value that tells the detox tests whether to turn on/off push notifications -* */ + * @param skipOnboarding: Boolean value that defaults to true. Set this to false if you want the detox test to view the onboarding carasoul on login + * @param pushNotifications: Boolean value that tells the detox tests whether to turn on/off push notifications + * */ export async function loginToDemoMode(skipOnboarding = true, pushNotifications?: boolean) { try { await waitFor(element(by.id(CommonE2eIdConstants.VA_LOGO_ICON_ID))) @@ -460,10 +460,10 @@ export async function backButton(backButtonName: string) { } /** Enables the availibility banner. -* @param AFFeature: Name of the AF waygate. -* @param AFUseCase: Name of the AF type. -* @param AFAppUpdate: Boolean value that tells the script whether to enable the update now button or not -* */ + * @param AFFeature: Name of the AF waygate. + * @param AFUseCase: Name of the AF type. + * @param AFAppUpdate: Boolean value that tells the script whether to enable the update now button or not + * */ export async function enableAF(AFFeature, AFUseCase, AFAppUpdate = false) { await device.launchApp({ newInstance: true, permissions: { notifications: 'YES' } }) await loginToDemoMode() @@ -543,11 +543,11 @@ export async function enableAF(AFFeature, AFUseCase, AFAppUpdate = false) { } /** Disables the availibility banner. -* @param featureNavigationArray: Array that tells the AF script how to navigate to the feature -* @param AFFeature: Name of the AF waygate. -* @param AFUseCaseName: Name of the AF type. -* @param AFAppUpdate: Boolean value that tells the script whether to enable the update now button or not -* */ + * @param featureNavigationArray: Array that tells the AF script how to navigate to the feature + * @param AFFeature: Name of the AF waygate. + * @param AFUseCaseName: Name of the AF type. + * @param AFAppUpdate: Boolean value that tells the script whether to enable the update now button or not + * */ export async function disableAF(featureNavigationArray, AFFeature, AFFeatureName, AFUseCaseName) { if (AFUseCaseName === 'AllowFunction') { await element(by.id(CommonE2eIdConstants.HOME_TAB_BUTTON_ID)).tap() @@ -583,7 +583,7 @@ export async function disableAF(featureNavigationArray, AFFeature, AFFeatureName } /** Function that allows the AF script to navigate to a certain feature -* */ + * */ const navigateToFeature = async (featureNavigationArray) => { for (let j = 2; j < featureNavigationArray.length; j++) { if (featureNavigationArray[j] === 'Talk to the Veterans Crisis Line now') { @@ -652,10 +652,10 @@ const navigateToFeature = async (featureNavigationArray) => { } /** Verifies that the availibility banner is the correct type and is populated with the correct information. -* @param featureNavigationArray: Array that tells the AF script how to navigate to the feature -* @param AFUseCaseName: Name of the AF type. -* @param AFUseCaseUpgrade: Boolean value that tells the script whether to enable the update now button or not -* */ + * @param featureNavigationArray: Array that tells the AF script how to navigate to the feature + * @param AFUseCaseName: Name of the AF type. + * @param AFUseCaseUpgrade: Boolean value that tells the script whether to enable the update now button or not + * */ export async function verifyAF(featureNavigationArray, AFUseCase, AFUseCaseUpgrade = false) { let featureName if (AFUseCase !== 'AllowFunction') { @@ -718,7 +718,7 @@ export async function verifyAF(featureNavigationArray, AFUseCase, AFUseCaseUpgra /** Toggle the specified remote config feature flag * @param flagName - name of flag to toggle -* */ + * */ export async function toggleRemoteConfigFlag(flagName: string) { await loginToDemoMode() await openProfile() diff --git a/VAMobile/src/App.tsx b/VAMobile/src/App.tsx index 89350277fd9..49801b8d146 100644 --- a/VAMobile/src/App.tsx +++ b/VAMobile/src/App.tsx @@ -110,7 +110,7 @@ export type RootNavStackParamList = WebviewStackParams & { SubmitEvidenceSubtask: { claimID: string } - InAppFeedback: { task: string } + InAppFeedback: { screen: string } Tabs: undefined } diff --git a/VAMobile/src/api/appointments/cancelAppointment.tsx b/VAMobile/src/api/appointments/cancelAppointment.tsx index cdb8f223ef0..0c9a34c7c0a 100644 --- a/VAMobile/src/api/appointments/cancelAppointment.tsx +++ b/VAMobile/src/api/appointments/cancelAppointment.tsx @@ -6,7 +6,7 @@ import { DEFAULT_UPCOMING_DAYS_LIMIT, TimeFrameTypeConstants } from 'constants/a import { put } from 'store/api' import { logNonFatalErrorToFirebase } from 'utils/analytics' import { isErrorObject } from 'utils/common' -import { registerReviewEvent } from 'utils/inAppReviews' +import { useReviewEvent } from 'utils/inAppReviews' import { appointmentsKeys } from './queryKeys' @@ -30,7 +30,7 @@ const cancelAppointment = (cancelID: string) => { */ export const useCancelAppointment = () => { const queryClient = useQueryClient() - + const registerReviewEvent = useReviewEvent() return useMutation({ mutationFn: cancelAppointment, onSuccess(_, variables) { diff --git a/VAMobile/src/api/claimsAndAppeals/downloadEFolderDocument.tsx b/VAMobile/src/api/claimsAndAppeals/downloadEFolderDocument.tsx index 13a87ff846c..43acad02003 100644 --- a/VAMobile/src/api/claimsAndAppeals/downloadEFolderDocument.tsx +++ b/VAMobile/src/api/claimsAndAppeals/downloadEFolderDocument.tsx @@ -6,7 +6,7 @@ import store from 'store' import { DEMO_MODE_LETTER_ENDPOINT } from 'store/api/demo/letters' import getEnv from 'utils/env' import { downloadDemoFile, downloadFile } from 'utils/filesystem' -import { registerReviewEvent } from 'utils/inAppReviews' +import { useReviewEvent } from 'utils/inAppReviews' import { claimsAndAppealsKeys } from './queryKeys' @@ -15,14 +15,18 @@ const { API_ROOT } = getEnv() /** * Fetch user E Folder Document */ -const downloadEFolderDocument = async (id: string, fileName: string): Promise => { +const downloadEFolderDocument = async ( + id: string, + fileName: string, + func: () => Promise, +): Promise => { const eFolderDocumentAPI = `${API_ROOT}/v0/efolder/documents/${id}/download?file_name=${fileName}}` const filePath = store.getState().demo.demoMode ? await downloadDemoFile(DEMO_MODE_LETTER_ENDPOINT, fileName) : await downloadFile('POST', eFolderDocumentAPI, fileName, undefined, 1) if (filePath) { - await FileViewer.open(filePath, { onDismiss: () => registerReviewEvent() }) + await FileViewer.open(filePath, { onDismiss: () => func() }) return true } } @@ -31,10 +35,11 @@ const downloadEFolderDocument = async (id: string, fileName: string): Promise { + const registerReviewEvent = useReviewEvent(false) return useQuery({ enabled: false, queryKey: [claimsAndAppealsKeys.eFolderDownloadDoc, id, fileName], - queryFn: () => downloadEFolderDocument(id, fileName), + queryFn: () => downloadEFolderDocument(id, fileName, registerReviewEvent), meta: { errorName: 'downloadEFolderDocument: Service error', }, diff --git a/VAMobile/src/api/contactInformation/deleteEmail.tsx b/VAMobile/src/api/contactInformation/deleteEmail.tsx index 64f235ccb1e..161bd464faa 100644 --- a/VAMobile/src/api/contactInformation/deleteEmail.tsx +++ b/VAMobile/src/api/contactInformation/deleteEmail.tsx @@ -5,7 +5,7 @@ import { Events, UserAnalytics } from 'constants/analytics' import { Params as APIParams, EditResponseData, del } from 'store/api' import { logAnalyticsEvent, logNonFatalErrorToFirebase, setAnalyticsUserProperty } from 'utils/analytics' import { isErrorObject } from 'utils/common' -import { registerReviewEvent } from 'utils/inAppReviews' +import { useReviewEvent } from 'utils/inAppReviews' import { contactInformationKeys } from './queryKeys' @@ -20,6 +20,7 @@ const deleteEmail = (emailData: EmailData) => { * Returns a mutation for deleting an email */ export const useDeleteEmail = () => { + const registerReviewEvent = useReviewEvent() const queryClient = useQueryClient() return useMutation({ diff --git a/VAMobile/src/api/contactInformation/saveAddress.tsx b/VAMobile/src/api/contactInformation/saveAddress.tsx index d46b837d376..c585833281a 100644 --- a/VAMobile/src/api/contactInformation/saveAddress.tsx +++ b/VAMobile/src/api/contactInformation/saveAddress.tsx @@ -5,7 +5,7 @@ import { Events, UserAnalytics } from 'constants/analytics' import { Params as APIParams, EditResponseData, post, put } from 'store/api' import { logAnalyticsEvent, logNonFatalErrorToFirebase, setAnalyticsUserProperty } from 'utils/analytics' import { isErrorObject } from 'utils/common' -import { registerReviewEvent } from 'utils/inAppReviews' +import { useReviewEvent } from 'utils/inAppReviews' import { contactInformationKeys } from './queryKeys' import { validateAddress } from './validateAddress' @@ -32,6 +32,7 @@ export const saveAddress = async ({ addressData, revalidate }: SaveAddressParame * Returns a mutation for saving an address */ export const useSaveAddress = () => { + const registerReviewEvent = useReviewEvent() const queryClient = useQueryClient() return useMutation({ diff --git a/VAMobile/src/api/contactInformation/saveEmail.tsx b/VAMobile/src/api/contactInformation/saveEmail.tsx index e6f26f6e4e2..fbd683c2ba4 100644 --- a/VAMobile/src/api/contactInformation/saveEmail.tsx +++ b/VAMobile/src/api/contactInformation/saveEmail.tsx @@ -5,7 +5,7 @@ import { Events, UserAnalytics } from 'constants/analytics' import { Params as APIParams, EditResponseData, post, put } from 'store/api' import { logAnalyticsEvent, logNonFatalErrorToFirebase, setAnalyticsUserProperty } from 'utils/analytics' import { isErrorObject } from 'utils/common' -import { registerReviewEvent } from 'utils/inAppReviews' +import { useReviewEvent } from 'utils/inAppReviews' import { contactInformationKeys } from './queryKeys' @@ -26,6 +26,7 @@ const saveEmail = (emailData: SaveEmailData) => { * Returns a mutation for saving an email */ export const useSaveEmail = () => { + const registerReviewEvent = useReviewEvent() const queryClient = useQueryClient() return useMutation({ diff --git a/VAMobile/src/api/contactInformation/savePhoneNumber.tsx b/VAMobile/src/api/contactInformation/savePhoneNumber.tsx index 0eb91a55b67..38ec6b93960 100644 --- a/VAMobile/src/api/contactInformation/savePhoneNumber.tsx +++ b/VAMobile/src/api/contactInformation/savePhoneNumber.tsx @@ -5,7 +5,7 @@ import { Events, UserAnalytics } from 'constants/analytics' import { Params as APIParams, EditResponseData, post, put } from 'store/api' import { logAnalyticsEvent, logNonFatalErrorToFirebase, setAnalyticsUserProperty } from 'utils/analytics' import { isErrorObject } from 'utils/common' -import { registerReviewEvent } from 'utils/inAppReviews' +import { useReviewEvent } from 'utils/inAppReviews' import { contactInformationKeys } from './queryKeys' @@ -26,6 +26,7 @@ const savePhoneNumber = (phoneData: PhoneData) => { * Returns a mutation for saving a phone number */ export const useSavePhoneNumber = () => { + const registerReviewEvent = useReviewEvent() const queryClient = useQueryClient() return useMutation({ diff --git a/VAMobile/src/api/decisionLetters/downloadDecisionLetter.tsx b/VAMobile/src/api/decisionLetters/downloadDecisionLetter.tsx index b707c33e2dc..11a75a69ebb 100644 --- a/VAMobile/src/api/decisionLetters/downloadDecisionLetter.tsx +++ b/VAMobile/src/api/decisionLetters/downloadDecisionLetter.tsx @@ -6,7 +6,7 @@ import store from 'store' import { DEMO_MODE_LETTER_ENDPOINT, DEMO_MODE_LETTER_NAME } from 'store/api/demo/letters' import getEnv from 'utils/env' import { downloadDemoFile, downloadFile } from 'utils/filesystem' -import { registerReviewEvent } from 'utils/inAppReviews' +import { useReviewEvent } from 'utils/inAppReviews' import { decisionLettersKeys } from './queryKeys' @@ -15,14 +15,14 @@ const { API_ROOT } = getEnv() /** * Fetch user decision letter */ -const downloadDecisionLetter = async (id: string): Promise => { +const downloadDecisionLetter = async (id: string, func: () => Promise): Promise => { const escapedId = encodeURI(id) // escape chars like {} in document ID const decisionLettersEndpoint = `${API_ROOT}/v0/claims/decision-letters/${escapedId}/download` const filePath = store.getState().demo.demoMode ? await downloadDemoFile(DEMO_MODE_LETTER_ENDPOINT, DEMO_MODE_LETTER_NAME) : await downloadFile('GET', decisionLettersEndpoint, 'decision_letter.pdf', undefined, 3) if (filePath) { - await FileViewer.open(filePath, { onDismiss: () => registerReviewEvent() }) + await FileViewer.open(filePath, { onDismiss: () => func() }) return true } } @@ -31,10 +31,11 @@ const downloadDecisionLetter = async (id: string): Promise * Returns a query for a user decision letter */ export const useDownloadDecisionLetter = (id: string, options?: { enabled?: boolean }) => { + const registerReviewEvent = useReviewEvent(false) return useQuery({ ...options, queryKey: [decisionLettersKeys.downloadLetter, id], - queryFn: () => downloadDecisionLetter(id), + queryFn: () => downloadDecisionLetter(id, registerReviewEvent), meta: { errorName: 'downloadDecisionLetter: Service error', }, diff --git a/VAMobile/src/api/demographics/updateGenderIdentity.tsx b/VAMobile/src/api/demographics/updateGenderIdentity.tsx index 7dc00acb194..c4a573bc8fa 100644 --- a/VAMobile/src/api/demographics/updateGenderIdentity.tsx +++ b/VAMobile/src/api/demographics/updateGenderIdentity.tsx @@ -4,7 +4,7 @@ import { Events, UserAnalytics } from 'constants/analytics' import { put } from 'store/api' import { logAnalyticsEvent, logNonFatalErrorToFirebase, setAnalyticsUserProperty } from 'utils/analytics' import { isErrorObject } from 'utils/common' -import { registerReviewEvent } from 'utils/inAppReviews' +import { useReviewEvent } from 'utils/inAppReviews' import { demographicsKeys } from './queryKeys' @@ -19,6 +19,7 @@ const updateGenderIdentity = (genderIdentity: string) => { * Returns a mutation for updating gender identity */ export const useUpdateGenderIdentity = () => { + const registerReviewEvent = useReviewEvent() const queryClient = useQueryClient() return useMutation({ diff --git a/VAMobile/src/api/demographics/updatePreferredName.tsx b/VAMobile/src/api/demographics/updatePreferredName.tsx index ebf11905572..6ed209611a2 100644 --- a/VAMobile/src/api/demographics/updatePreferredName.tsx +++ b/VAMobile/src/api/demographics/updatePreferredName.tsx @@ -4,7 +4,7 @@ import { Events, UserAnalytics } from 'constants/analytics' import { put } from 'store/api' import { logAnalyticsEvent, logNonFatalErrorToFirebase, setAnalyticsUserProperty } from 'utils/analytics' import { isErrorObject } from 'utils/common' -import { registerReviewEvent } from 'utils/inAppReviews' +import { useReviewEvent } from 'utils/inAppReviews' import { demographicsKeys } from './queryKeys' @@ -22,6 +22,7 @@ const updatePreferredName = (preferredName: string) => { * Returns a mutation for updating preferred name */ export const useUpdatePreferredName = () => { + const registerReviewEvent = useReviewEvent() const queryClient = useQueryClient() return useMutation({ diff --git a/VAMobile/src/api/directDeposit/updateBankInfo.tsx b/VAMobile/src/api/directDeposit/updateBankInfo.tsx index 69eb5d8eaac..d0450509059 100644 --- a/VAMobile/src/api/directDeposit/updateBankInfo.tsx +++ b/VAMobile/src/api/directDeposit/updateBankInfo.tsx @@ -12,7 +12,7 @@ import { DemoState } from 'store/slices/demoSlice' import { logAnalyticsEvent, logNonFatalErrorToFirebase, setAnalyticsUserProperty } from 'utils/analytics' import { isErrorObject } from 'utils/common' import { getErrorKeys } from 'utils/errors' -import { registerReviewEvent } from 'utils/inAppReviews' +import { useReviewEvent } from 'utils/inAppReviews' import { directDepositKeys } from './queryKeys' @@ -28,6 +28,7 @@ const updateBankInfo = (paymentAccountData: PaymentAccountData) => { * Returns a mutation for updating direct deposit information */ export const useUpdateBankInfo = () => { + const registerReviewEvent = useReviewEvent() const queryClient = useQueryClient() const { demoMode } = useSelector((state) => state.demo) diff --git a/VAMobile/src/api/letters/downloadLetter.tsx b/VAMobile/src/api/letters/downloadLetter.tsx index be234faca9c..72a3dd2c71d 100644 --- a/VAMobile/src/api/letters/downloadLetter.tsx +++ b/VAMobile/src/api/letters/downloadLetter.tsx @@ -10,7 +10,7 @@ import { DEMO_MODE_LETTER_ENDPOINT, DEMO_MODE_LETTER_NAME } from 'store/api/demo import { logAnalyticsEvent, setAnalyticsUserProperty } from 'utils/analytics' import getEnv from 'utils/env' import { downloadDemoFile, downloadFile } from 'utils/filesystem' -import { registerReviewEvent } from 'utils/inAppReviews' +import { useReviewEvent } from 'utils/inAppReviews' import { lettersKeys } from './queryKeys' @@ -22,6 +22,7 @@ const { API_ROOT } = getEnv() const downloadLetter = async ( letterType: LetterTypes, lettersOption: LettersDownloadParams, + func: () => Promise, ): Promise => { const lettersAPI = `${API_ROOT}/v0/letters/${letterType}/download` const filePath = store.getState().demo.demoMode @@ -30,7 +31,7 @@ const downloadLetter = async ( if (filePath) { logAnalyticsEvent(Events.vama_letter_download(letterType)) setAnalyticsUserProperty(UserAnalytics.vama_uses_letters()) - await FileViewer.open(filePath, { onDismiss: () => registerReviewEvent() }) + await FileViewer.open(filePath, { onDismiss: () => func() }) return true } } @@ -39,10 +40,11 @@ const downloadLetter = async ( * Returns a query for a user letter */ export const useDownloadLetter = (letterType: LetterTypes, lettersOption: LettersDownloadParams) => { + const registerReviewEvent = useReviewEvent(false) return useQuery({ enabled: false, queryKey: [lettersKeys.downloadLetter, letterType, lettersOption], - queryFn: () => downloadLetter(letterType, lettersOption), + queryFn: () => downloadLetter(letterType, lettersOption, registerReviewEvent), meta: { errorName: 'downloadLetter: Service error', }, diff --git a/VAMobile/src/api/prescriptions/requestRefills.tsx b/VAMobile/src/api/prescriptions/requestRefills.tsx index e959395f5ec..b1309d063a5 100644 --- a/VAMobile/src/api/prescriptions/requestRefills.tsx +++ b/VAMobile/src/api/prescriptions/requestRefills.tsx @@ -5,7 +5,7 @@ import { Events, UserAnalytics } from 'constants/analytics' import { put } from 'store/api' import { logAnalyticsEvent, logNonFatalErrorToFirebase, setAnalyticsUserProperty } from 'utils/analytics' import { isErrorObject } from 'utils/common' -import { registerReviewEvent } from 'utils/inAppReviews' +import { useReviewEvent } from 'utils/inAppReviews' import { prescriptionKeys } from './queryKeys' @@ -30,6 +30,7 @@ const requestRefills = async (prescriptions: PrescriptionsList): Promise { + const registerReviewEvent = useReviewEvent(false, 'refillRequest') const queryClient = useQueryClient() return useMutation({ mutationFn: requestRefills, diff --git a/VAMobile/src/api/secureMessaging/saveDraft.tsx b/VAMobile/src/api/secureMessaging/saveDraft.tsx index 28fd2cb0da6..b99e8a8f7cc 100644 --- a/VAMobile/src/api/secureMessaging/saveDraft.tsx +++ b/VAMobile/src/api/secureMessaging/saveDraft.tsx @@ -5,7 +5,7 @@ import { UserAnalytics } from 'constants/analytics' import { Params, post, put } from 'store/api' import { logNonFatalErrorToFirebase, setAnalyticsUserProperty } from 'utils/analytics' import { isErrorObject } from 'utils/common' -import { registerReviewEvent } from 'utils/inAppReviews' +import { useReviewEvent } from 'utils/inAppReviews' import { secureMessagingKeys } from './queryKeys' @@ -28,6 +28,7 @@ const saveDraft = ({ messageID, replyID, messageData }: SaveDraftParameters) => * Returns a mutation for saving a draft message */ export const useSaveDraft = () => { + const registerReviewEvent = useReviewEvent() const queryClient = useQueryClient() return useMutation({ mutationFn: saveDraft, diff --git a/VAMobile/src/api/secureMessaging/sendMessage.tsx b/VAMobile/src/api/secureMessaging/sendMessage.tsx index 03c6bb3d3ad..4daaf22d7a7 100644 --- a/VAMobile/src/api/secureMessaging/sendMessage.tsx +++ b/VAMobile/src/api/secureMessaging/sendMessage.tsx @@ -5,7 +5,7 @@ import { UserAnalytics } from 'constants/analytics' import { Params, contentTypes, post } from 'store/api' import { logNonFatalErrorToFirebase, setAnalyticsUserProperty } from 'utils/analytics' import { isErrorObject } from 'utils/common' -import { registerReviewEvent } from 'utils/inAppReviews' +import { useReviewEvent } from 'utils/inAppReviews' import { secureMessagingKeys } from './queryKeys' @@ -58,6 +58,7 @@ const sendMessage = ({ messageData, replyToID, uploads }: SendMessageParameters) * Returns a mutation for sending a message */ export const useSendMessage = () => { + const registerReviewEvent = useReviewEvent() const queryClient = useQueryClient() return useMutation({ mutationFn: sendMessage, diff --git a/VAMobile/src/components/AttachmentLink.tsx b/VAMobile/src/components/AttachmentLink.tsx index 3f0d2e403e1..03e07964164 100644 --- a/VAMobile/src/components/AttachmentLink.tsx +++ b/VAMobile/src/components/AttachmentLink.tsx @@ -1,6 +1,8 @@ import React, { FC } from 'react' import { AccessibilityProps, Pressable, PressableProps } from 'react-native' +import { Icon } from '@department-of-veterans-affairs/mobile-component-library' + import { a11yHintProp } from 'utils/accessibility' import { useTheme } from 'utils/hooks' import { featureEnabled } from 'utils/remoteConfig' @@ -8,7 +10,6 @@ import { featureEnabled } from 'utils/remoteConfig' import Box from './Box' import LinkWithAnalytics from './LinkWithAnalytics' import TextView from './TextView' -import VAIcon from './VAIcon' export type AttachmentLinkProps = { /** Name of link/attachment */ @@ -57,7 +58,7 @@ const AttachmentLink: FC = ({ - + {text} diff --git a/VAMobile/src/components/FormWrapper/FormFields/FormAttachments.tsx b/VAMobile/src/components/FormWrapper/FormFields/FormAttachments.tsx index 8c5b11652d4..97c14f3a623 100644 --- a/VAMobile/src/components/FormWrapper/FormFields/FormAttachments.tsx +++ b/VAMobile/src/components/FormWrapper/FormFields/FormAttachments.tsx @@ -2,10 +2,10 @@ import React, { FC, ReactNode } from 'react' import { useTranslation } from 'react-i18next' import { ImagePickerResponse } from 'react-native-image-picker/src/types' -import { Button, ButtonVariants } from '@department-of-veterans-affairs/mobile-component-library' +import { Button, ButtonVariants, Icon } from '@department-of-veterans-affairs/mobile-component-library' import _ from 'underscore' -import { Box, TextView, VAIcon } from 'components/index' +import { Box, TextView } from 'components/index' import { NAMESPACE } from 'constants/namespaces' import { DocumentPickerResponse } from 'screens/BenefitsScreen/BenefitsStackScreens' import { getFileDisplay } from 'utils/common' @@ -45,21 +45,19 @@ const FormAttachments: FC = ({ return ( - - - - {text} - + flexDirection={'row'} + mr={theme.dimensions.gutter} + mt={index !== 0 ? theme.dimensions.condensedMarginBetween : 0} + mb={theme.dimensions.condensedMarginBetween}> + + + + {text} +