Skip to content

Commit

Permalink
Merge branch 'develop' into chore/9630-UseDesignSystemSnackbarComponent
Browse files Browse the repository at this point in the history
  • Loading branch information
oddballdave committed Dec 14, 2024
2 parents 63b4ec8 + 2936abd commit b9d4b2c
Show file tree
Hide file tree
Showing 47 changed files with 294 additions and 174 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)



Expand Down Expand Up @@ -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
* [**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
4 changes: 2 additions & 2 deletions VAMobile/documentation/docs/UX/Foundations/Research/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion VAMobile/documentation/docs/UX/How-We-Work/designing-ui.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 7 additions & 8 deletions VAMobile/documentation/docs/UX/Resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down
5 changes: 3 additions & 2 deletions VAMobile/documentation/src/components/HomepageFeatures.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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.
</>
),
},
Expand Down
36 changes: 18 additions & 18 deletions VAMobile/e2e/tests/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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') {
Expand Down Expand Up @@ -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') {
Expand Down Expand Up @@ -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()
Expand Down
8 changes: 6 additions & 2 deletions VAMobile/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ import { createBottomTabNavigator } from '@react-navigation/bottom-tabs'
import { NavigationContainer, useNavigationContainerRef } from '@react-navigation/native'
import { createStackNavigator } from '@react-navigation/stack'

import { SnackbarProvider, useIsScreenReaderEnabled, useSnackbar } from '@department-of-veterans-affairs/mobile-component-library'
import {
SnackbarProvider,
useIsScreenReaderEnabled,
useSnackbar,
} from '@department-of-veterans-affairs/mobile-component-library'
import { ActionSheetProvider, connectActionSheet } from '@expo/react-native-action-sheet'
import { QueryClientProvider } from '@tanstack/react-query'
import { ThemeProvider } from 'styled-components'
Expand Down Expand Up @@ -104,7 +108,7 @@ export type RootNavStackParamList = WebviewStackParams & {
SubmitEvidenceSubtask: {
claimID: string
}
InAppFeedback: { task: string }
InAppFeedback: { screen: string }
Tabs: undefined
}

Expand Down
4 changes: 2 additions & 2 deletions VAMobile/src/api/appointments/cancelAppointment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand All @@ -30,7 +30,7 @@ const cancelAppointment = (cancelID: string) => {
*/
export const useCancelAppointment = () => {
const queryClient = useQueryClient()

const registerReviewEvent = useReviewEvent()
return useMutation({
mutationFn: cancelAppointment,
onSuccess(_, variables) {
Expand Down
13 changes: 9 additions & 4 deletions VAMobile/src/api/claimsAndAppeals/downloadEFolderDocument.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand All @@ -15,14 +15,18 @@ const { API_ROOT } = getEnv()
/**
* Fetch user E Folder Document
*/
const downloadEFolderDocument = async (id: string, fileName: string): Promise<boolean | undefined> => {
const downloadEFolderDocument = async (
id: string,
fileName: string,
func: () => Promise<void>,
): Promise<boolean | undefined> => {
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
}
}
Expand All @@ -31,10 +35,11 @@ const downloadEFolderDocument = async (id: string, fileName: string): Promise<bo
* Returns a query for a user E Folder Document
*/
export const useDownloadEFolderDocument = (id: string, fileName: string) => {
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',
},
Expand Down
3 changes: 2 additions & 1 deletion VAMobile/src/api/contactInformation/deleteEmail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand All @@ -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({
Expand Down
3 changes: 2 additions & 1 deletion VAMobile/src/api/contactInformation/saveAddress.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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({
Expand Down
Loading

0 comments on commit b9d4b2c

Please sign in to comment.