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

19386 checklist template #810

Draft
wants to merge 56 commits into
base: Sitewide-integration
Choose a base branch
from

Conversation

randimays
Copy link
Contributor

Description

Adds Resources & Support Checklist template.

Specifics:

  • Please review the comments within the diffs; they provide context for some of the changes
  • Consistently applied data-next-template attributes on everything in the templates folder. I saw that this was partly implemented and thought it would be helpful to get it done so we can easily identify components from the browser as we develop
    • This also includes removing the data- attributes that pointed specifically to content-build templates to avoid confusion
  • Removes the unused custom <Link> component
  • Fixes some Typescript errors from the yarn build
  • Adjusts Medallia survey code to match the content-build implementation; we won't be able to test this code until it hits staging (known issue that Medallia doesn't work in lower environments than staging)

Design System specifics

  • Updates the design system library dependencies
  • Updates some components that had already been added to this repo but were out of date (and needed web components)
    • this reduces our ability to have full unit test coverage as you cannot simulate events on web components (this is a known issue in vets-website)
  • DST made adjustments made to the names of breakpoints to reduce reliance on the Formation library. These changes are in content-build and vets-website now but needed to be made in next-build (see VADS vs. USWDS values here)

Ticket

Developer Task

Tasks

Testing Steps

  • Validate that the Events / Events Listing templates are not negatively impacted by the upgrade to the latest component-library version
  • Validated updated generator template for query test files

QA steps

What needs to be checked to prove this works?
What needs to be checked to prove it didn't break any related things?
What variations of circumstances (users, actions, values) need to be checked?

Screenshots

Mobile
Screenshot 2024-10-29 at 1 55 01 PM
Screenshot 2024-10-29 at 1 55 11 PM
Screenshot 2024-10-29 at 1 55 20 PM
Screenshot 2024-10-29 at 1 55 29 PM
Screenshot 2024-10-29 at 1 55 38 PM
Tablet
Screenshot 2024-10-29 at 1 57 15 PM
Screenshot 2024-10-29 at 1 57 26 PM
Screenshot 2024-10-29 at 1 57 35 PM
Screenshot 2024-10-29 at 1 57 52 PM
Screenshot 2024-10-29 at 1 57 59 PM
Desktop
Screenshot 2024-10-29 at 2 01 19 PM
Screenshot 2024-10-29 at 2 01 32 PM
Screenshot 2024-10-29 at 2 01 42 PM
Screenshot 2024-10-29 at 2 01 50 PM

Reviewer

Reviewing a PR

This section lists items that need to be checked or updated when making changes to this repository.

Standard Checks

Tasks

Merging an Approved Layout

When merging a layout, you must ensure that the content type has been turned on for next-build inside the CMS. This CMS flag must be turned on for editors to preview their work using the next build preview server.

Resource types (layouts) that have not been approved by design should NOT be pushed to production. Ensure that slug.tsx does not include your resource type if it is not approved.

The status of layouts should be kept up to date inside templates.md. This includes QA progress, development progress, etc. A link should be provided for where testing can occur.

Merging a Non-Approved Layout

Your new resource type should not be included inside slug.tsx. Items added here will go into production once merged into the main branch. It is imperative that we do not push anything live that has not been approved.

Ensure that this layout has been added to the templates.md file with the current status of the work.

@va-cms-bot va-cms-bot temporarily deployed to Tugboat November 14, 2024 16:29 Destroyed
@@ -1,38 +0,0 @@
import { render } from '@testing-library/react'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is not used; all instances of are imported directly from 'next/link'

@@ -1,44 +0,0 @@
import React from 'react'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is not used; all instances of are imported directly from 'next/link'

const vagovstagingsurveys = {
'/search': 20,
'/contact-us/virtual-agent': 26,
const SURVEY_NUMBERS = {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The Medallia setup here was quite different from what was in content-build. It was missing the subpath string matching, so I brought over the existing logic and variables here so we don't end up with regressions.

Note: this cannot be tested fully until we get to the staging environment; it's a known limitation with the Medallia survey.

@@ -135,6 +135,7 @@ export const entityBaseFields = (entity: NodeTypes): PublishedEntity => {
title: entity.title,
metatags: entity.metatag,
breadcrumbs: entity.breadcrumbs,
lastUpdated: entity.field_last_saved_by_an_editor || entity.created,
lastUpdated:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Slack thread for context: https://dsva.slack.com/archives/C07B86KV4P4/p1729097328269789?thread_ts=1729096713.224239&cid=C07B86KV4P4

content-build was handling this value a little differently; next-build simplifies the implementation of the "Last updated" timestamp but still needs to consider all 3 of these fields.

@@ -12,6 +11,18 @@ export const params: QueryParams<null> = () => {
])
}

const formatBeneficiariesData = (beneficiaries) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This file was missing logic to handle a single object of beneficiaries rather than an array, so I added a formatter function instead.

import * as PersonProfile from './personProfile'
import * as Button from './button'
import * as AudienceTopics from './audienceTopics'
import * as Accordion from './accordion'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added Checklist query files and alphabetized everything else for easier reading

{paragraphs?.map((paragraph) => (
<Paragraph key={paragraph.id} {...paragraph} />
{paragraphs?.map((paragraph, index) => (
<Paragraph key={index} {...paragraph} />
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was throwing a type error in the build so I adjusted the key

@@ -41,7 +41,7 @@ export const CollapsiblePanelItem = ({
<WysiwygField html={wysiwyg} />

{paragraphs.map((paragraph, index) => {
return <Paragraph key={paragraph.id} {...paragraph} />
return <Paragraph key={index} {...paragraph} />
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was throwing a type error in the build so I adjusted the key

@@ -1,36 +0,0 @@
import { Meta, StoryObj } from '@storybook/react'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed all BenefitsHubLink things as it became a common component (RelatedLink(s))

@@ -1,32 +0,0 @@
import { render, screen } from '@testing-library/react'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed all BenefitsHubLink things as it became a common component (RelatedLink(s))

@@ -1,41 +0,0 @@
import { recordEvent } from '@/lib/analytics/recordEvent'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed all BenefitsHubLink things as it became a common component (RelatedLink(s))

@@ -1,13 +0,0 @@
export type BenefitsHubLink = {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed all BenefitsHubLink things as it became a common component (RelatedLink(s))

render(<RateYourExperience />)

const goodRatingInput = document.querySelector(
'#rate-your-experience--good'
const good = document.querySelector('#Good')
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note that web components are notoriously impregnable in unit tests, so refactoring to use those has limited our unit testing capability.

@va-cms-bot va-cms-bot temporarily deployed to Tugboat November 14, 2024 16:38 Destroyed
@@ -0,0 +1,10 @@
export type RelatedLink = {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the shared component that took the place of the BenefitHubLinks and RelatedInformation since they were essentially the same thing.

@va-cms-bot va-cms-bot temporarily deployed to Tugboat November 14, 2024 22:46 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat November 15, 2024 15:16 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat November 15, 2024 15:24 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat November 15, 2024 15:45 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat November 21, 2024 22:40 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat November 21, 2024 22:45 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat November 21, 2024 22:49 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat November 25, 2024 22:49 Destroyed
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.

2 participants