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

DT 32404 & 31873 implementing PDF help modal #19368

Merged
merged 6 commits into from
Nov 10, 2021

Conversation

zacharymorel
Copy link
Contributor

Description

Implementing PDF Help modal for Form Detail page.

Original issue(s)

department-of-veterans-affairs/va.gov-team#32404
department-of-veterans-affairs/va.gov-team#31873

Testing done

Ran it locally with Vets website + content build repos

Screenshots

Screen Shot 2021-11-10 at 11 29 37 AM

Screen Shot 2021-11-10 at 11 29 15 AM

Acceptance criteria

  • Modal shows on form detail pages
  • Modal uses GA

Definition of done

  • Events are logged appropriately
  • Documentation has been updated, if applicable
  • A link has been provided to the originating GitHub issue (or connected to it via ZenHub)
  • No sensitive information (i.e. PII/credentials/internal URLs/etc.) is captured in logging, hardcoded, or specs

@zacharymorel zacharymorel requested a review from a team as a code owner November 10, 2021 17:28
});
useEffect(() => {
const justRefreshed = prevProps?.fetching && !fetching;
if (justRefreshed) {
focusElement('[data-forms-focus]');
}
});
useEffect(() => {
const doesCookieExist = getCookie();
Copy link
Contributor

@kelsonic kelsonic Nov 10, 2021

Choose a reason for hiding this comment

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

is the return result from getCookie cookie? If so might be better calling doesCookieExist cookie instead so devs know they can inspect it for cookie details. Alternatively you could do something like !!getCookie() to get the boolean representation of cookie 🍪

Copy link
Contributor Author

@zacharymorel zacharymorel Nov 10, 2021

Choose a reason for hiding this comment

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

It returns a boolean. I perhaps should rename it? A good point there!

Screen Shot 2021-11-10 at 2 46 05 PM

Copy link
Contributor

Choose a reason for hiding this comment

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

ya getCookie sounds like it will return the cookie, I think if getCookie doesn't return back the string and a bool instead then perhaps rename it to doesCookieExist()?

Copy link
Contributor

@kelsonic kelsonic left a comment

Choose a reason for hiding this comment

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

lgtm!

setModalState({
...modalState,
isOpen: !modalState.isOpen,
cookieExistence: true,
Copy link
Contributor

Choose a reason for hiding this comment

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

Any reason we wouldn't also call this doesCookieExist?

@va-vfs-bot va-vfs-bot temporarily deployed to master/DT-32404-31873-modalwork/master November 10, 2021 20:49 Inactive
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.

None yet

3 participants