-
Notifications
You must be signed in to change notification settings - Fork 6
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
Sitewide integration: R&S Checklist migration #837
base: main
Are you sure you want to change the base?
Conversation
70dbef9
to
6bdf487
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this all looks good to me. The only thing I couldn't account for was the src/templates/common/meta/index.tsx
. I'm maybe just blind, but I couldn't find it in any of those PRs or as a separate commit in the history of this branch. 😕
Other than that, I think we're golden. Before I approve, I'd like to test it locally (or in a preview server, honestly, if those are up and running 🤞). What's the best way to do that?
README.md
Outdated
@@ -34,7 +34,9 @@ You should set these up before attempting to install the repo. | |||
|
|||
7. In the `next-build` directory, run `yarn setup` to pull initial built assets from the `vets-website` repo. This will grab a bunch of files from a vets-website S3 bucket and place them into the appropriate `public/` folders. | |||
|
|||
8. Run `yarn dev`. | |||
8. In your `envs/.env.local` file, uncomment `FEATURE_NEXT_BUILD_CONTENT_ALL=true`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will be uncommented by default in #884
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll remove this change.
additional.d.ts
Outdated
'va-link-action' | ||
'va-on-this-page' | ||
'va-telephone' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For my own clarity: The va-link-action
and va-telephone
are net new here.
/** | ||
* @jest-environment node | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/** | |
* @jest-environment node | |
*/ | |
/** | |
* @jest-environment node | |
*/ |
@@ -1,51 +1,51 @@ | |||
import { createQueries } from 'next-drupal-query' | |||
import * as PressRelease from './pressRelease' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For my own clarity: I just copied the before and after into files, sorted the before, and did a diff against the after. They're all the same imports, just alphabetized.
@@ -13,15 +13,7 @@ import dynamic from 'next/dynamic' | |||
import Script from 'next/script' | |||
import { drupalClient } from '@/lib/drupal/drupalClient' | |||
import { getGlobalElements } from '@/lib/drupal/getGlobalElements' | |||
import { Wrapper } from '@/templates/layouts/wrapper' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For my own clarity: All these are the same, just reorganized.
src/templates/common/link/index.tsx
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@randimays Why was this deleted? I assume it's not used, right? I looked in the original PR, but didn't see a comment for this one.
How can I double-check that it doesn't break anything?
src/templates/common/meta/index.tsx
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, I'm struggling with this one. 😅 I can't seem to find it in any of those PRs you listed up top. What's the story behind this change?
expect(container.innerHTML).toContain( | ||
'Eligibility for burial in a VA national cemetery' | ||
) | ||
expect(container.innerHTML).toContain( | ||
'href="https://va.gov/burials-memorials/eligibility"' | ||
) | ||
expect(container.innerHTML).toContain( | ||
'Here is a summary for this URL so you can see how it displays underneath.' | ||
) | ||
expect(container.innerHTML).toContain( | ||
'Schedule a burial for a Veteran or family member' | ||
) | ||
expect(container.innerHTML).toContain( | ||
'href="https://va.gov/burials-memorials/schedule-a-burial"' | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason we're not using semantic queries here?
const links = container.getAllByRole('link');
expect(links).toHaveLength(2);
// etc.
Or even
const first = container.querySelector('[href="https://va.gov/burials-memorials/eligibility"]');
// etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahhhh, that makes sense! Thanks!
I may fiddle around with that at some point. Not sure if this is a problem because we just aren't hydrating the web components in our test setup, the way JSDOM handles web components, or something else. 🤔 For now, this looks fine. If I get the chance, I'll see if I can fix this up in another PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There has been quite a bit of talk around trying to get access to the shadow DOM in unit tests (see here minimally; there are lots of results if you search DSVA Slack for "shadow DOM unit test"). If you manage to get it working, definitely wave the victory flag somewhere - lots of folks will be interested :D
6801613
to
a628053
Compare
c57dbb7
to
5918b87
Compare
@cvalarida I don't see changes to |
💨 It's gone! Looks like updating with |
@cvalarida The Link component (
If you search the source code for As far as testing goes - this one is a bit tricky. Pretty much all of my changes are to Resources & Support common components because they were in support of the checklist template, and we don't have any other next-build R&S templates prod-ready yet. You can see the components I changed in the Storybook view (relatedLinks, secondaryButtonGroup, contactInfo). Otherwise there's just a lot of alphabetization/organization. You can regression check by running the code locally at |
Tugboat has finished building the preview for this pull request! Links:
Link (redis): Dashboard: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks generally good. I noticed no regressions, but the ContactInfo
was confusing to me. Mind adding some docs?
return ( | ||
<li className="vads-u-margin-top--1"> | ||
<strong>{label} </strong> | ||
<va-telephone contact={number} extension={extension || null} /> | ||
</li> | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update: Default contact. That little contactType="DC"
magic property renders the default, not this PhoneContact
component. Got it.
This behavior isn't what I'd expect, honestly. I assume we don't have much leeway in changing the behavior, do we? Probably requires an upstream change in Drupal and corresponding content-build
template. 😮💨
Can we get some documentation on this component describing what's going on? Ideally, I'd also like a JSDoc string on the ContactInfo
type and its properties so we can leverage the language server hover docs. 🤞
className="usa-unstyled-list vads-u-display--flex vads-u-flex-direction--column" | ||
role="list" | ||
> | ||
<ul className="usa-unstyled-list vads-u-display--flex vads-u-flex-direction--column"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is outside the scope of this PR since it was this way before, but for posterity, this should probably be a description list, not an unordered list. I think the default formatting for that will be funky, but it's more semantically correct, I believe.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Description
Combines the contents of
Sitewide-integration
withmain
. This integration branch was created to avoid merging any code intomain
before Events were successfully deployed to production. Now that the Events deploy has been successfully validated in production, we can move in this code and stop using an integration branch.The code that is in this branch was added as part of the Checklist template code and includes updates to existing components to bring them up to speed with production and updates of the design system dependencies.
Details for each update are in these PRs:
Ticket
Relates to #19386
Developer Task
Tasks
Testing Steps
Explain the steps needed for testing
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
Note that testing was specifically regression checks for the
/outreach-and-events/events
page and individual event pages. Since there were updates to the design system dependencies, spacing here and there has been updated and is expected.Events - Desktop
/outreach-and-events/events
Note: the underlines on the pagination numbers are also not showing on the
main
branch, but they appear fine in production - not sure why this is./central-western-massachusetts-health-care/events/73034/
/outreach-and-events/events/75180/
Events - Tablet
/outreach-and-events/events
Events - Mobile
/outreach-and-events/events
/outreach-and-events/events/75180/
/central-western-massachusetts-health-care/events/73034/
Is this PR blocked by another PR?
DO NOT MERGE
labelReviewer
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 theCMS
. 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.