department-of-veterans-affairs / va.gov-cms

Editor-centered management for Veteran-centered content.
https://prod.cms.va.gov
GNU General Public License v2.0
98 stars 68 forks source link

Remove 24-hr cookie logic controlling PDF download instructions #10524

Closed wesrowe closed 1 year ago

wesrowe commented 2 years ago

Description

As a Veteran, I want to see instructions to use Acrobat Reader for fillable PDFs every time I download a PDF from Find-a-form so that I can always find that information if I'm having trouble.

Context

Research found that Veterans have a hard time completing fillable PDF forms unless they open them in a desktop version of Adobe Acrobat. A modal was added to PDF download links to provide instructions to avoid these issues.

Previous maintainers of Find-a-form worried that showing the modal every time would be annoying. So they added cookie-based logic to limit the modal to displaying only once every 24 hours. We believe this has a negative impact on Veteran experience, however, as it gives them only one shot at reading the instructions, which would then vanish inexplicably and could not be found anywhere in the UI until 24 hours had elapsed.

Original implementation: #31873 Find a VA Form: Detail Page PDF Modal: Update text, add 24 hour cookie

Acceptance Criteria

CMS Team

Please check the team(s) that will do this work.

wesrowe commented 2 years ago

@dsasser, can you go ahead and give this your individual estimate? We held it back initially because it made sense to remove this logic for a single, unified flow. But we're having trouble prioritizing the full-monty flow unification. I think this is worth doing asap (even though it has to be done twice) since it is not just tech debt but harms the Veteran experience.

dsasser commented 2 years ago

As discussed in scrum on October 13th: Review instances are inaccessible (502 Gateway error) on vets-website builds at the moment, thus making QA of this issue's PR in non-local environments impossible (without a refactor to use a flipper, which is not recommended and introduces a risk factor). See the platform ticket I created, which leads to another slack thread that discusses the root cause: a network request to fetch Drupal content during the content-build build phase is failing.

We decided to give it until Monday the 17th before pivoting on our QA approach. At that point, if the RI remains inaccessible, @ryguyk will QA locally (ostensibly, as FE lead, but it is at his discretion).

Local QA is a bit more involved since it requires mocking the Forms API. Below is a simple mock api I created in Node.js for this purpose during development:

const http = require('http');

const hostname = 'localhost';
const port = 3000;

const server = http.createServer((req, res) => {
  const url = req.url;
  let responseText = '';
  if (url.includes('/v0/feature_toggles')) {
    responseText = `{"data":{"type":"feature_toggles","features":[{"name":"burialClaimConfirmationEmail","value":true},{"name":"burial_claim_confirmation_email","value":true},{"name":"showMebDgi40Features","value":false},{"name":"show_meb_dgi40_features","value":false}]}}` // etc;
  }
  else if (url.includes('/v0/forms')) {
    responseText = `{"data":[{"id":"5403","type":"va_form","attributes":{"formName":"10-10EZ","url":"https://www.va.gov/vaforms/medical/pdf/VA%20Form%2010-10EZ.pdf","title":"Instructions and Enrollment Application for Health Benefits","firstIssuedOn":"2022-09-05","lastRevisionOn":"2022-07-05","pages":5,"sha256":"5d30b201e7d2b865b3489d2b15b59877506bcf611953c3c91bcee6efb6b7bd23","lastSha256Change":"2022-10-06","validPdf":true,"formUsage":"<p>Use VA Form 10-10EZ if you’re a Veteran and want to apply for VA health care. You must be enrolled in VA health care to get care at VA health facilities or to have us cover your care at a community care provider (an approved non-VA provider).  </p>","formToolIntro":"You can apply online instead of filling out and sending us the paper form.","formToolUrl":"https://www.va.gov/health-care/apply/application/introduction","formDetailsUrl":"https://www.va.gov/find-forms/about-form-10-10ez","formType":"benefit","language":"en","deletedAt":null,"relatedForms":["10-10EZ (esp)","10-10EZR"],"benefitCategories":[{"name":"Health care","description":"VA health care"}],"vaFormAdministration":"VHA"}},{"id":"4039","type":"va_form","attributes":{"formName":"10-10EZR","url":"https://www.va.gov/vaforms/medical/pdf/VA%20Form%2010-10EZR-fill.pdf","title":"Health Benefits Update Form ","firstIssuedOn":"2022-10-05","lastRevisionOn":"2022-07-05","pages":4,"sha256":"2ca9aa8a57d75b6a30286a1f8604af3c869f1ef500390368927c0ce2a788ecd9","lastSha256Change":"2022-10-06","validPdf":true,"formUsage":"<p>Use VA Form 10-10EZR if you already receive VA health care benefits, and you need to update your personal, insurance, or financial information.</p>","formToolIntro":null,"formToolUrl":null,"formDetailsUrl":"https://www.va.gov/find-forms/about-form-10-10ezr","formType":null,"language":"en","deletedAt":null,"relatedForms":[],"benefitCategories":[{"name":"Health care","description":"VA health care"}],"vaFormAdministration":"VHA"}},{"id":"10533","type":"va_form","attributes":{"formName":"10-10EZ (esp)","url":"https://www.va.gov/vaforms/medical/pdf/10-10EZ_Spanish.pdf","title":"Instrucciones y Solicitud de Beneficios Medicos","firstIssuedOn":"2022-04-11","lastRevisionOn":"2017-04-11","pages":3,"sha256":"60c6c775c84f59dc375852b5cfbaeb5530a104061627056661b3b748a8c9922a","lastSha256Change":"2022-04-12","validPdf":true,"formUsage":"<p>Para que los Veteranos soliciten su afiliación al sistema de atención médica de VA. la información proporcionada en este formulario será utilizada por VA para determinar si usted reúne los requisitos para recibir beneficios médicos.</p>","formToolIntro":"You can apply online instead of filling out and sending us the paper form.","formToolUrl":null,"formDetailsUrl":"","formType":"benefit","language":"es","deletedAt":null,"relatedForms":["10-10EZ"],"benefitCategories":[{"name":"Health care","description":"VA health care"}],"vaFormAdministration":"VHA"}},{"id":"3349","type":"va_form","attributes":{"formName":"10-10EC","url":"https://www.va.gov/vaforms/medical/pdf/10-10EC%20Fill%202017.pdf","title":"Application for Extended Care Services","firstIssuedOn":"2022-04-11","lastRevisionOn":"2017-07-11","pages":5,"sha256":"99b602239ba7dd29221148b835d4f60962c3caf7b5fd0884500c018008bdbafd","lastSha256Change":"2022-04-12","validPdf":true,"formUsage":null,"formToolIntro":null,"formToolUrl":null,"formDetailsUrl":"https://www.va.gov/find-forms/about-form-10-10ec","formType":null,"language":"en","deletedAt":null,"relatedForms":[],"benefitCategories":[],"vaFormAdministration":"VHA"}}]}`;
  }
  res.statusCode = 200;
  res.setHeader('Content-Type', 'application/json; charset=utf-8');
  res.setHeader('Access-Control-Allow-Origin', 'http://localhost:3001');
  res.setHeader('Access-Control-Allow-Credentials', 'true');
  res.setHeader('Access-Control-Allow-Headers', 'Content-Type, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-Session-Expiration, X-CSRF-Token, X-Request-Id, source-app-name, x-key-inflection');
  res.setHeader('Access-Control-Allow-Methods','GET, HEAD, POST, PUT, PATCH, DELETE, OPTIONS');
  res.end(responseText);
});

server.listen(port, hostname, () => {
  console.log(`Server running at http://${hostname}:${port}/`);
});
jilladams commented 2 years ago

Both slack threads for this issue died in the water on Friday. Bumped both to see if Platform has ticketed follow up. Meantime: we will likely need to manually QA. FYI @ryguyk - let's discuss ifyou have bandwidth or we can delegate this.

jilladams commented 2 years ago

Added QA notes to PR.

dsasser commented 2 years ago

Added QA notes to PR.

I am actively working on this feedback. No known ETA on resolution at this time.