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
96 stars 69 forks source link

FE: Remove Forms API Call on PDF Click Events #10235

Open dsasser opened 2 years ago

dsasser commented 2 years ago

BLOCKER(s)  

Description

This API call is unique to the download flow on Form Detail pages; the Form Search page doesn't have this extra API call.

During discovery performed under https://github.com/department-of-veterans-affairs/va.gov-cms/issues/10061, we identified a seemingly redundant Forms API call being made when a user clicks the Form PDF download link. This call is preventing directly serving of the Form PDF, and in some cases even preventing vets from accessing the PDF which, if directly visited, would download into the browser.

Current behavior exhibits UX concerns (user is left waiting while the API is called, for as long as that takes, with no visible indicator of what is happening). Contrast this behavior with one in which the user has javascript disabled: the user is always brought directly to the PDF asset--meaning those without javascript are MORE likely to actually get to the file, than those with javascript turned on.

This click event is triggered on Forms Detail pages when a user clicks the link under 'Downloadable PDF'. See steps 1-4 in the below image:

VACMS-10061 - Discovery Form FE Workflow.png

Acceptance Criteria

CMS Team

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

wesrowe commented 2 years ago

Updated issue to reflect that spike https://github.com/department-of-veterans-affairs/va.gov-cms/issues/10562 might be a better approach.