Skip to content
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

Travel Pay / add content + functionality to question pages #33979

Draft
wants to merge 64 commits into
base: main
Choose a base branch
from

Conversation

liztownd
Copy link
Contributor

@liztownd liztownd commented Jan 8, 2025

Are you removing, renaming or moving a folder in this PR?

  • No, I'm not changing any folders (skip to TeamSites and delete the rest of this section)
  • Yes, I'm removing, renaming or moving a folder
  1. Renaming or moving a folder: Update the entry in the registry.json, but do not merge it until your vets-website changes here are merged. The content-build PR must be merged immediately after your vets-website change is merged in to avoid CI errors with content-build (and Tugboat).

⚠️ TeamSites ⚠️

Examples of a TeamSite: https://va.gov/health and https://benefits.va.gov/benefits/. This scenario is also referred to as the "injected" header and footer. You can reach out in the #sitewide-public-websites Slack channel for questions.

Did you change site-wide styles, platform utilities or other infrastructure?

Summary

  • (Summarize the changes that have been made to the platform)

    • Add content to the 3 question pages (Mileage, Vehicle, Address)
    • Add functionality to support those pages to SubmitWrapper
    • Update unit tests for the 3 pages & submit specific cypress test
  • (Which team do you work for, does your team own the maintenance of this component?)
    Travel Pay

  • (If using a flipper, what is the end date of the flipper being required/success criteria being targeted)
    Target beginning for phased rollout is 2/1/25

Related issue(s)

Testing done

  • Describe what the old behavior was prior to the change
    Pages were shells, no functionality

  • Describe the steps required to verify your changes are working as expected
    Visit /my-health/travel-pay/file-new-claim/{any made up appt id}. Click the "File a new claim" link. Each of the 3 questions should have an associated radio button and content on the page.

  • Describe the tests completed and the results
    Updated unit test for each of the 3 pages and the cypress test for the submit functionality.

Screenshots

Note: This field is mandatory for UI changes (non-component work should NOT have screenshots).

Before After
Mileage Screenshot 2025-01-03 at 7 59 41 AM mileage
Vehicle Screenshot 2025-01-03 at 7 59 56 AM vehicle
Address Screenshot 2025-01-03 at 8 03 00 AM address
No Address N/A no address

What areas of the site does it impact?

Travel Pay

Acceptance criteria

Quality Assurance & Testing

  • I fixed|updated|added unit tests and integration tests for each feature (if applicable).
  • No sensitive information (i.e. PII/credentials/internal URLs/etc.) is captured in logging, hardcoded, or specs
  • Linting warnings have been addressed
  • Documentation has been updated (link to documentation *if necessary)
  • Screenshot of the developed feature is added
  • Accessibility testing has been performed

Error Handling

  • Browser console contains no warnings or errors.
  • Events are being sent to the appropriate logging solution
  • Feature/bug has a monitor built into Datadog or Grafana (if applicable)

Authentication

  • Did you login to a local build and verify all authenticated routes work as expected with a test user

Requested Feedback

(OPTIONAL) What should the reviewers know in addition to the above. Is there anything specific you wish the reviewer to assist with. Do you have any concerns with this PR, why?

liztownd and others added 30 commits January 2, 2025 15:14
@va-vfs-bot va-vfs-bot temporarily deployed to master/liz/flesh-out-question-pages/main January 9, 2025 18:32 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to master/liz/flesh-out-question-pages/main January 9, 2025 22:10 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to master/liz/flesh-out-question-pages/main January 11, 2025 01:55 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to master/liz/flesh-out-question-pages/main January 13, 2025 14:19 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to master/liz/flesh-out-question-pages/main January 13, 2025 15:17 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to master/liz/flesh-out-question-pages/main January 13, 2025 15:50 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to master/liz/flesh-out-question-pages/main January 13, 2025 17:03 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to master/liz/flesh-out-question-pages/main January 13, 2025 18:37 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to master/liz/flesh-out-question-pages/main January 13, 2025 19:08 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to master/liz/flesh-out-question-pages/main January 13, 2025 19:20 Inactive
return (
<div>
<h1>Address page</h1>
<VaRadio
Copy link

@seesleestak seesleestak Jan 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we standardize around either the react bindings or the web components rather than a mix of both? Or is there a reason to use one vs. the other considering the scenario?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could standardize throughout our app if we decide to. Not every web component has a corresponding react binding (I don't think - for example the VaButtonPair has a react binding in Storybook but <va-button> doesn't have the react binding code, so I'm not sure which ones do and which ones don't for sure). Honestly I chose the react binding version of the radio button because I was looking in other apps to figure out how to make it work and the ones I found were using this version. 🤷‍♀️

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh okay, understood. I don't think I have an opinion about one vs. the other, but was curious if there was something I wasn't aware of driving the choice to use either.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Honestly now I'm second guessing myself... 🤣 For example, based on the Storybook there isn't a react binding for <va-button> but if I do a quick search through to code it seems that there is one??? I asked over in DSVA Slack for some clarification, and once I figure out what's going on we can make a decision as a team how we want to proceed.

Comment on lines +162 to +174
// it('shows the login modal when clicking the login prompt', async () => {
// const { container } = renderWithStoreAndRouter(<App />, {
// initialState: getData({
// areFeatureTogglesLoading: false,
// hasFeatureFlag: true,
// isLoggedIn: true,
// }),
// path: `/claims/`,
// reducers: reducer,
// });

// expect($('va-loading-indicator', container)).to.exist;
// });

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this intended to be commented and something that will come back later?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if it will come back later or not. This test was causing the CI pipeline to fail, but there's another one for 'shows the login modal when clicking the login prompt' that actually seems to test what it says it does. This one doesn't actually seem to fit that description, so I commented it out until we can do some research around if it's necessary or not.

() => {
scrollToTop('topScrollElement');
if (!address) {
focusElement('h1');

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the aim behind this to set the scroll height at a specific point or to make the screen reader call out the heading each time the view changes? I'm wondering if aria-live might help address the latter aim.
I was under the impression that focusing non-interactive elements was something to be avoided.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a common pattern used in VA.gov. The scrollToTop moves the element into the window if on the previous page the user had scrolled down and the focusElement sends the screen reader to the correct starting point on the page (otherwise it starts at the top with the header and reads all the links/etc. in the header) to continue through the form.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants