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

React-ify Find-Form Download Links Across Page Types #10851

Open
5 tasks
dsasser opened this issue Sep 23, 2022 · 8 comments
Open
5 tasks

React-ify Find-Form Download Links Across Page Types #10851

dsasser opened this issue Sep 23, 2022 · 8 comments
Assignees
Labels
Find a form CMS managed product, owned by Public Websites team Public Websites Scrum team in the Sitewide crew sitewide VA.gov frontend CMS team practice area

Comments

@dsasser
Copy link
Contributor

dsasser commented Sep 23, 2022

Description

Move to a single react component for Find-A-Form PDF download links. This will reduce errors, complexity, and technical debt.

Veterans have two ways to download their Find-A-Form form assets (PDFs):

  • From the Find-A-Form search page results
  • From the Find-A-Form detail page

Developer notes:
These two page types contain vastly different code surrounding the download links, despite performing the same activity, which is to display a PDF Guidance modal (or immediately download the asset if javascript is disabled).

The main cause this code differs to the degree that it does is because the pages are assembled differently:

Acceptance Criteria

  • Determine whether the Find Forms search results and detail pages can share the same code for the Download VA Form XXX link. If the code can be shared:
    • Implement the changes to do so
    • Update any unit or e2e tests that are affected
    • Run the test plan that comes from this ticket
  • If the code cannot be shared between the two pages, document the reasoning in this ticket
@dsasser dsasser added the Needs refining Issue status label Sep 23, 2022
@github-actions github-actions bot added the Public Websites Scrum team in the Sitewide crew label Sep 23, 2022
@FranECross FranECross added the Blocked Issues that are blocked on factors other than blocking issues. label Feb 28, 2024
@randimays
Copy link
Contributor

randimays commented Jan 16, 2025

@FranECross If we're looking for PW FE work, this could be good to work. I added a points estimate and updated the description a bit. I'm not 100% sure that the two experiences can share the same code so I think this will involve some technical research as well.

@randimays randimays added VA.gov frontend CMS team practice area and removed Blocked Issues that are blocked on factors other than blocking issues. labels Jan 16, 2025
@FranECross
Copy link

@randimays Thanks, Randi! Do you want this turned into a Spike, with a subsequent (do the work) ticket?

@randimays randimays added the Find a form CMS managed product, owned by Public Websites team label Jan 16, 2025
@FranECross FranECross removed the Needs refining Issue status label Jan 16, 2025
@randimays
Copy link
Contributor

@FranECross I don't think we need to split it up - the research/implementation will go hand-in-hand on this one.

@randimays randimays self-assigned this Feb 7, 2025
@randimays
Copy link
Contributor

@FranECross The download code is different for form detail pages largely because it checks for validity of the form URL coming from Lighthouse. For some reason, we don't perform these same checks before attempting to download forms from the form search results. Example: if you're on the form detail page for form 10-10m and the Lighthouse URL for the form download is invalid, once you click the Download button, it'll show a pink banner:

Before click


Image

After click


Image

For the form search results, we don't have any handling for invalid URLs, so the experience can be a bit more clunky. The below video what happens locally when I try to download the 10-10m form from both the search results page and the form detail page. I'm not even completely sure what is happening when I try to load the form from the search results page - the browser just dies?

Screen.Recording.2025-02-10.at.8.45.35.AM.mov

Considering there is margin for error in the form URLs in the Lighthouse DB, it would make sense to me that we'd have some sort of handling for a bad form URL on the form search results. We can add this as part of the work for this ticket, but we would need design input before doing so. Thoughts?

@FranECross
Copy link

@randimays Thanks so much for spelunking and the explanation. I totally agree with your assessment and path forward, and the need for design input. I wonder if Dave could pop into and out of the ticket to provide insight/input?

@randimays
Copy link
Contributor

Thanks @FranECross - @davidmpickett given the above, does this sound like something you could give quick guidance on, or need a separate ticket to think through?

@davidmpickett
Copy link
Contributor

So the question is basically where to display the error message on the search results listing page? My instinct would be to mirror the behavior on the detail page and have the alert replace the download link. Here's a quick mock up

Image

Is that doable with the technical constraints? Would you need any more specifics from me?

@randimays
Copy link
Contributor

@davidmpickett This seems doable to me. I'll report back if I run into any snags. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Find a form CMS managed product, owned by Public Websites team Public Websites Scrum team in the Sitewide crew sitewide VA.gov frontend CMS team practice area
Projects
None yet
Development

No branches or pull requests

5 participants