-
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
Scaffold VAMC facility and render title and intro text #923
base: main
Are you sure you want to change the base?
Conversation
Because consistency, eh?
We'll break these placeholders out into individual components later.
Still need to fix up those links, though.
<script type="application/ld+json"> | ||
{/* TODO: Fill this in */} | ||
</script> |
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.
Not sure how this will work yet. 🤷 I've never added a <script>
element inside React before. 😅
@@ -160,7 +168,7 @@ export interface NodeVetCenter extends DrupalNode { | |||
field_last_saved_by_an_editor?: string | |||
field_office_hours: FieldOfficeHours[] | |||
field_official_name: string | |||
field_operating_status_facility: string | |||
field_operating_status_facility: FacilityOperatingStatusFlags |
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.
@laflannery, @randimays, or @chriskim2311: Do you know if this is accurate? Given that it has the same field name, I assume it'll share the same values as the VAMC facility's field_operating_status_facility
. 🤷
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.
Yes, @cvalarida Vet Centers and VAMC facilities will use the same values for operating status.
| 'notice' | ||
| 'limited' | ||
| 'closed' | ||
| string // TODO: Remove the catch-all; needed right now for importing JSON mock data; can remove after we implement runtime data validation |
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.
It's actually pretty annoying that I still need | string
on this. Makes this union kinda silly because the static type gets collapsed to string
, and we don't get even get any auto-fill suggestions from our language server. Still, it's good to call out the expected values. 🤷
Tugboat has finished building the preview for this pull request! Links:
Link (redis): Dashboard: |
class="vads-u-font-weight--bold operating-status-link" | ||
onclick="recordEvent({ | ||
'event': 'nav-info-box-click', | ||
'infoBoxText': 'Facility notice'});" |
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.
Design system parachuting in 🪂 to let you know that the va-link
component has analytics built into it already. If you need to emit custom analytics details, add the disable-analytics
prop so it doesn't log twice.
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.
@cvalarida We won't need the custom analytics details here, they can be removed.
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.
Sweet! I just copied this over from content-build
. I love deleting code. 🤓
@cvalarida Just noting that eventually we will want to get this working on Tugboat so I can see it and start QA |
Description
Renders title, intro text, and placeholders.
I started adding the operating status flags, but after I saw I needed to pull in the sidebar data, I decided to save it for later. Kept the work hanging around, though, because the whole page is still a WIP. I can pull it out if y'all like, though. No worries there.
Generated description
This pull request includes significant updates to the handling and display of healthcare local facility data. The changes involve enhancing the data structure, updating the import statements, modifying the query parameters, and adding new components for rendering the facility details.
Enhancements to data structure and imports:
src/data/queries/healthCareLocalFacility.ts
: AddedintroText
andoperatingStatusFacility
fields to the query formatter and included theaddInclude
method in the query parameters. [1] [2]src/types/drupal/node.ts
: IntroducedFacilityOperatingStatusFlags
type and updatedNodeHealthCareLocalFacility
andNodeVetCenter
interfaces to use this type. [1] [2] [3]src/types/formatted/healthCareLocalFacility.ts
: AddedintroText
andoperatingStatusFacility
fields to theHealthCareLocalFacility
type.Updates to components and pages:
src/pages/[[...slug]].tsx
: Added imports and rendering logic forHealthCareLocalFacility
component based on the resource type. (src/pages/[[...slug]].tsxR38, src/pages/[[...slug]].tsxR54-R55, src/pages/[[...slug]].tsxR158-R162)src/templates/layouts/healthCareLocalFacility/index.tsx
: Updated theHealthCareLocalFacility
component to include new fields and added a detailed layout for displaying facility information.Testing and snapshots:
src/templates/layouts/healthCareLocalFacility/index.test.tsx
: Updated tests to use mock data and verify the rendering of new fields.src/data/queries/tests/__snapshots__/healthCareLocalFacility.test.tsx.snap
: Updated snapshot tests to includeintroText
andoperatingStatusFacility
fields. [1] [2]Ticket
Closes department-of-veterans-affairs/va.gov-cms#20766
Closes department-of-veterans-affairs/va.gov-cms#20767
Developer Task
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
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
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.