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

VA-14277: Preserve wait times panel with Zero wait time #25331

Merged
merged 2 commits into from
Aug 28, 2023

Conversation

maxx1128
Copy link
Contributor

@maxx1128 maxx1128 commented Aug 22, 2023

The Wait Times panels had a bug in the template where if the number of days to wait was 0, it only showed that number instead the panel itself. This pull request makes two changes:

  1. Adjusts the front-end template so if the number of days are 0, the panel still renders.
  2. A wait times panel with zero will show "no wait" instead of "0 days," as per advice from @mmiddaugh and @swirtSJW looking at the design system.

Summary

  • (Summarize the changes that have been made to the platform) Wait times will properly render an understandable panel when there are zero days of wait time.
  • (If bug, how to reproduce) Go to a clinic where the number of days to wait for existing patients is zero.
  • (What is the solution, why is this the solution) The solution adjusts the template since the issue lies with how the template handles a data edge case.
  • (Which team do you work for, does your team own the maintenance of this component?) Facilities team, and yes.

Related issue(s)

Testing done

  • Describe what the old behavior was prior to the change The panel did not render, and only showed a 0 character on the page.
  • Describe the steps required to verify your changes are working as expected I reproduced the error in my local machine by manually passing in 0 waiting days for existing patients.
  • Describe the tests completed and the results Visual, confirmed it was fixed.

Screenshots

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

Before After
Desktop 68747470733a2f2f696d616765732e7a656e68756275736572636f6e74656e742e636f6d2f3564386134373339336163333434303030316431613265642f61386637323132652d666338322d346566352d613137622d386232383134373562343866 Screen Shot 2023-08-22 at 11 14 57 PM

What areas of the site does it impact?

VAMC Clinic locations

Acceptance criteria

Local Testing

  1. Run content-build with yarn serve
  2. Run vets-website with yarn watch --env api=https://dev-api.va.gov entry=facilities,static-pages
  3. On src/applications/static-pages/facilities/FacilityAppointmentWaitTimesWidget.jsx in vets-website, add the following line below line 47:
const TESTVAR = 0;
  1. On the same file for lines 66-71, use the following lines of code:
            {TESTVAR >= 0 &&
                this.appointmentWaitTime(
                  TESTVAR,
                  service,
                  true,
                )}
  1. Visit http://localhost:3002/butler-health-care/locations/cranberry-township-va-clinic/ and expand the "Primary Care" accordion. The "Existing Patients" panel should now appear as if there are zero wait days.

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)

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?

@va-vsp-bot va-vsp-bot requested a deployment to master/va-14277-facility-wait-times-bug/main August 22, 2023 16:59 In progress
@va-vfs-bot va-vfs-bot temporarily deployed to master/va-14277-facility-wait-times-bug/main August 22, 2023 17:12 Inactive
@maxx1128 maxx1128 force-pushed the va-14277-facility-wait-times-bug branch from 8773ceb to fcf80c3 Compare August 23, 2023 03:18
@va-vfs-bot va-vfs-bot temporarily deployed to master/va-14277-facility-wait-times-bug/main August 23, 2023 03:19 Inactive
@va-vsp-bot va-vsp-bot requested a deployment to master/va-14277-facility-wait-times-bug/main August 23, 2023 03:20 In progress
@maxx1128 maxx1128 marked this pull request as ready for review August 23, 2023 03:31
@maxx1128 maxx1128 requested review from a team as code owners August 23, 2023 03:31
Copy link
Contributor

@eselkin eselkin left a comment

Choose a reason for hiding this comment

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

Looks good, but check the question.

@swirtSJW
Copy link
Contributor

@maxx1128 I know the vetswebsite PR template has no QA steps section. But it would be nice to see this. Is there no way to QA this on a review instance?

@maxx1128
Copy link
Contributor Author

@swirtSJW I don't know of any current clinics in the CMS that reproduce the same issue, since the wait times for the examples on the ticket have since changed to numbers higher than 0. But I can include the instructions for reproducing this in local code, so it can be checked on a local instance.

@va-vsp-bot va-vsp-bot requested a deployment to master/va-14277-facility-wait-times-bug/main August 25, 2023 14:37 In progress
@maxx1128 maxx1128 requested a review from swirtSJW August 25, 2023 14:38
@va-vfs-bot va-vfs-bot temporarily deployed to master/va-14277-facility-wait-times-bug/main August 25, 2023 14:39 Inactive
Copy link
Contributor

@randimays randimays left a comment

Choose a reason for hiding this comment

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

Tested /butler-health-care/locations/cranberry-township-va-clinic/ in the review instance. Looks good!

Screenshot 2023-08-28 at 11 14 06 AM

@maxx1128 maxx1128 merged commit 2d2d09a into main Aug 28, 2023
@maxx1128 maxx1128 deleted the va-14277-facility-wait-times-bug branch August 28, 2023 16:37
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.

6 participants