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

Scaffold VAMC facility and render title and intro text #923

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

cvalarida
Copy link
Contributor

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:

Updates to components and pages:

Testing and snapshots:

Ticket

Closes department-of-veterans-affairs/va.gov-cms#20766
Closes department-of-veterans-affairs/va.gov-cms#20767

Developer Task

- [ ] PR submitted against the `main` branch of `next-build`.
- [ ] Link to the issue that this PR addresses (if applicable).
- [ ] Define all changes in your PR and note any changes that could potentially be breaking changes.
- [ ] PR includes steps to test your changes and links to these changes in the Tugboat preview (if applicable).
- [ ] Provided before and after screenshots of your changes (if applicable).
- [ ] Alerted the #accelerated-publishing Slack channel to request a PR review.
- [ ] You understand that once approved, you are responsible for merging your changes into `main`. (Note that changes to `main` will move automatically into production.)

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

image

Is this PR blocked by another PR?

  • Add the DO NOT MERGE label
  • Add links to additional PRs here:

Reviewer

Reviewing a PR

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

Standard Checks

- [ ] Code Quality: Readabilty, Naming Conventions, Consistency, Reusability
- [ ] Test Coverage: 80% coverage
- [ ] Functionality: Change functions as expected with no additional bugs
- [ ] Performance: Code does not introduce performance issues
- [ ] Documentation: Changes are documented in their respective README.md files
- [ ] Security: Packages have been approved in the TRM

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.

@cvalarida cvalarida requested review from a team as code owners March 6, 2025 23:00
@va-cms-bot va-cms-bot temporarily deployed to Tugboat March 6, 2025 23:00 Destroyed
Comment on lines +41 to +43
<script type="application/ld+json">
{/* TODO: Fill this in */}
</script>
Copy link
Contributor Author

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
Copy link
Contributor Author

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. 🤷

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
Copy link
Contributor Author

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. 🤷

class="vads-u-font-weight--bold operating-status-link"
onclick="recordEvent({
'event': 'nav-info-box-click',
'infoBoxText': 'Facility notice'});"
Copy link
Contributor

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.

Copy link
Contributor

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.

Copy link
Contributor Author

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. 🤓

@laflannery
Copy link

@cvalarida Just noting that eventually we will want to get this working on Tugboat so I can see it and start QA

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.

VAMC Facility: Intro text VAMC Facility: Title
5 participants