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

VACMS-14000: Adds and populates meta tags on VBA Facility #16395

Merged
merged 7 commits into from
Dec 18, 2023

Conversation

omahane
Copy link
Contributor

@omahane omahane commented Dec 12, 2023

Description

Relates to #14000

Testing done

Locally

Screenshots

Screenshot 2023-12-13 at 4 14 01 PM

QA steps

In the browser

As an admin

  • Go to /admin/content, filtered for VBA Facility
  • Confirm that there are 482 nodes
  • Go to Wilmington VA Regional Benefit Office
  • Use the developer tools to check the page code
  • Confirm that you do not see a <meta name="description"> element
  • Confirm that you do not see a <meta name="og:description"> element

In the terminal

  • Run the following: drush scr ./scripts/content/VACMS-14000-vba-facility-meta-tags.php
  • Confirm that the terminal output describes that the number nodes processed matches the search results from /admin/content
  • Flush the cache: drush cr

In the browser

As an admin

  • Check the Wilmington VA Regional Benefit Office
  • Use developer tools to check the code
  • Confirm that you do see a <meta name="description"> element, and that it says "Placeholder text: Veterans benefits offices provide services to Veterans ... "
  • Confirm that you do see a <meta name="og:description"> element and that it says "Placeholder text: Veterans benefits offices provide services to Veterans ... "
  • Check Pre-Discharge Site at Bruce W. Carter Department of Veterans Affairs Medical Center
  • Confirm that you do see a <meta name="description"> element, and that it says "Placeholder text: Veterans benefits offices provide services to Veterans ... "
  • Confirm that you do see a <meta name="og:description"> element and that it says "Placeholder text: Veterans benefits offices provide services to Veterans ... "
  • Visit the Recent log messages
    • Confirm that messages in the log correspond with the outcome of the script

Definition of Done

  • Documentation has been updated, if applicable.
  • Tests have been added if necessary.
  • Automated tests have passed.
  • Code Quality Tests have passed.
  • Acceptance Criteria in related issue are met.
  • Manual Code Review Approved.
  • If there are field changes, front end output has been thoroughly checked.

Select Team for PR review

  • CMS Team
  • Public websites
  • Facilities
  • User support
  • Accelerated Publishing

@omahane omahane requested a review from a team as a code owner December 12, 2023 18:20
@va-cms-bot va-cms-bot temporarily deployed to Tugboat December 12, 2023 18:20 Destroyed
@omahane omahane force-pushed the VACMS-14000-vba-metatags-config branch from 755f4f4 to 3e38160 Compare December 12, 2023 19:08
@va-cms-bot va-cms-bot temporarily deployed to Tugboat December 12, 2023 19:09 Destroyed
@omahane omahane requested a review from a team as a code owner December 13, 2023 21:14
@va-cms-bot va-cms-bot temporarily deployed to Tugboat December 13, 2023 21:14 Destroyed
@omahane omahane force-pushed the VACMS-14000-vba-metatags-config branch from 9f660ed to cdc02c0 Compare December 13, 2023 21:20
@va-cms-bot va-cms-bot temporarily deployed to Tugboat December 13, 2023 21:20 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat December 13, 2023 23:05 Destroyed
@omahane omahane requested a review from swirtSJW December 13, 2023 23:05
@github-actions github-actions bot added the Facilities Facilities products (VAMC, Vet Center, etc) label Dec 13, 2023
@omahane omahane changed the title VACMS-14000: Adds config, hides field VACMS-14000: Adds and populates meta tags on VBA Facility Dec 14, 2023
Copy link
Contributor

@swirtSJW swirtSJW left a comment

Choose a reason for hiding this comment

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

I have not tested this yet, but will later tonight.

* @return string
* Status message.
*/
function va_gov_set_vba_facility_meta_tags(array &$sandbox) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor and not worth moving. Consider for next time around that this could have been done as a "post deploy hook" so that it would run itself without needing a manual step.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the suggestion. I'll look into that at the next opportunity.

* @param string $revisionId
* The id of the node revision.
*/
function update_field_cc_meta_tags_table(string $nodeId, string $revisionId) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor and not worth changing. Consider abstracting this function one level deeper where it is not specific to meta tags but is generic to updating a fetch field. It would need to add a bundle parameter. Then move it to the script library.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, good thought. I was thinking that this is something that is going to likely need to happen again.

@@ -36,7 +37,7 @@ dependencies:
- field.field.node.vba_facility.field_table_of_contents
- field.field.node.vba_facility.field_timezone
- node.type.vba_facility
- workflows.workflow.editorial
- workflows.workflow.restricted_archive
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems odd this is changing this now. This is unrelated to this PR isn't it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it is unrelated. I also thought it odd. But it's correct, and this vestigial workflow should be corrected from main. Are you suggesting we pull this change out and do it in a separate PR that is specific to workflow?

Copy link
Contributor

Choose a reason for hiding this comment

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

No. Mainly just wanted to note it as odd... and thought maybe you could shed light on it.

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 is odd, so I ran a little test on Service Region. It turns out the dependency of the manage form display config is only picked up when updating the form itself. Changing the workflow does not result in a config change for the form. So I'll update the Service Region config, too, for consistency.

@omahane omahane requested a review from swirtSJW December 15, 2023 13:32
@va-cms-bot va-cms-bot temporarily deployed to Tugboat December 18, 2023 13:51 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat December 18, 2023 20:08 Destroyed
Copy link
Contributor

@swirtSJW swirtSJW left a comment

Choose a reason for hiding this comment

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

Confirmed all the QA steps
image

image

image

image

Pattern is set using centralized content.
image

Copy link
Contributor

@edmund-dunn edmund-dunn left a comment

Choose a reason for hiding this comment

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

i see no issues here.

@omahane omahane enabled auto-merge (squash) December 18, 2023 22:03
@va-cms-bot va-cms-bot temporarily deployed to Tugboat December 18, 2023 22:03 Destroyed
@swirtSJW swirtSJW assigned laflannery and unassigned laflannery Dec 18, 2023
@va-cms-bot va-cms-bot temporarily deployed to Tugboat December 18, 2023 22:56 Destroyed
@omahane omahane merged commit df3840d into main Dec 18, 2023
18 checks passed
@omahane omahane deleted the VACMS-14000-vba-metatags-config branch December 18, 2023 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Facilities Facilities products (VAMC, Vet Center, etc)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants