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-10626: Drupalize new homepage components #11114

Merged
merged 21 commits into from
Oct 13, 2022
Merged

VACMS-10626: Drupalize new homepage components #11114

merged 21 commits into from
Oct 13, 2022

Conversation

dsasser
Copy link
Contributor

@dsasser dsasser commented Oct 5, 2022

Description

This PR originally started here: #11016. It was decided to move to an integration branch for the homepage updates, so this PR was created.

Closes #10626

Note that permissions, and field guidance text are ticketed separately. This PR addresses the ACs for #10626 only.

New Block Types:
Benefit Promo
News Promo

New Entity Queues:
Home page news spotlight
Home page hero

New Menus:
Other Search Tools
Popular on VA.gov

QA steps

Run GraphQL queries:
Validate GraphQL queries provide expected output:

query homePageHeroQuery {
  entitySubqueueById(id: "home_page_hero") {
    ... on EntitySubqueueHomePageHero {
      itemsOfEntitySubqueueHomePageHero {
        entity {
          entityId
          ... on BlockContentBenefitPromo {
            entityId
            entityLabel
            fieldPromoHeadline
            fieldPromoText
            fieldPromoCta {
              entity {
                ... on ParagraphButton {
                  fieldButtonLink {
                    url {
                      path
                    }
                  }
                  fieldButtonLabel
                }
              }
            }
          }
        }
      }
    }
  }
}


query homePageNewsSpotlightQuery {
  entitySubqueueById(id: "home_page_news_spotlight") {
    ... on EntitySubqueueHomePageNewsSpotlight {
      itemsOfEntitySubqueueHomePageNewsSpotlight {
        entity {
          entityId
          ... on BlockContentNewsPromo {
            entityId
            entityLabel
            fieldPromoHeadline
            fieldPromoText
            fieldImage {
              entity {
                ... on MediaImage {
                  image {
                    derivative(style: LARGE) {
                      url
                    }
                  }
                }
              }
            }
            fieldLink {
              url {
                path
              }
            }
            fieldLinkLabel
          }
        }
      }
    }
  }
}


query homePageOtherSearchToolsMenuQuery {
  menuByName(name: "other-search-tools") {
    name
    links {
      label
      url {
        path
      }
      links {
        label
        url {
          path
        }
      }
    }
  }
}

query homePagePopularOnVaGovMenuQuery {
  menuByName(name: "popular-on-va-gov") {
    name
    links {
      label
      url {
        path
      }
      links {
        label
        url {
          path
        }
      }
    }
  }
}

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.

Select Team for PR review

  • Platform CMS Team
  • Sitewide program
  • ⭐️ Sitewide CMS
  • ⭐️ Public websites
  • ⭐️ Facilities
  • ⭐️ User support

Is this PR blocked by another PR?

  • DO NOT MERGE

Does this PR need review from a Product Owner

  • Needs PO review

CMS user-facing annoucement

Is an announcement needed to let editors know of this change?

  • Yes, and it's written in issue ____ and queued for publication.
    • Merge and ping the UX writer so they are ready to publish after deployment
  • Yes, but it hasn't yet been written
    • Don't merge yet -- ping the UX writer to write and queue content
  • No announcement is needed for this code change.
    • Merge & carry on unburdened by announcements

@va-cms-bot va-cms-bot temporarily deployed to Tugboat October 5, 2022 21:35 Destroyed
@dsasser dsasser changed the title Vacms 10626 drupalize new homepage components VACMS-10626: Drupalize new homepage components Oct 5, 2022
@dsasser dsasser linked an issue Oct 5, 2022 that may be closed by this pull request
23 tasks
@va-cms-bot va-cms-bot temporarily deployed to Tugboat October 6, 2022 22:12 Destroyed
@dsasser dsasser marked this pull request as ready for review October 7, 2022 17:00
@va-cms-bot va-cms-bot temporarily deployed to Tugboat October 7, 2022 17:00 Destroyed
@dsasser dsasser requested review from swirtSJW and chri5tia October 7, 2022 17:01
@chri5tia
Copy link
Contributor

chri5tia commented Oct 11, 2022

@dsasser When running the GraphQL query in the explorer, this pop up comes up. Is that expected and if so, which one should I select?

Screen Shot 2022-10-11 at 9 12 53 AM

I get the following for all four so that piece looks like it's working:

{
  "data": {
    "entitySubqueueById": {
      "itemsOfEntitySubqueueHomePageHero": []
    }
  }
}

@dsasser
Copy link
Contributor Author

dsasser commented Oct 11, 2022

@dsasser When running the GraphQL query in the explorer, this pop up comes up. Is that expected and if so, which one should I select?

There are 4 distinct queries. When you add all of them to the Graphql explorer and try to run them, it prompts you to select which query you are running. It is very buggy when doing this, I recommend adding in one query at a time as a result.

@chri5tia
Copy link
Contributor

chri5tia commented Oct 11, 2022

I didn't have any issues running through the steps to add the new components and the output of the graphql queries was healthy, see output of my test items:

{
  "data": {
    "entitySubqueueById": {
      "itemsOfEntitySubqueueHomePageHero": [
        {
          "entity": {
            "entityId": "200",
            "entityLabel": "test",
            "fieldPromoHeadline": "test",
            "fieldPromoText": "test",
            "fieldPromoCta": {
              "entity": {
                "fieldButtonLink": {
                  "url": {
                    "path": "/disability/eligibility/hazardous-materials-exposure/agent-orange/testing-storage-areas"
                  }
                },
                "fieldButtonLabel": "test"
              }
            }
          }
        }
      ]
    }
  }
}
{
  "data": {
    "entitySubqueueById": {
      "itemsOfEntitySubqueueHomePageNewsSpotlight": [
        {
          "entity": {
            "entityId": "201",
            "entityLabel": "test test",
            "fieldPromoHeadline": "tests",
            "fieldPromoText": "test",
            "fieldImage": {
              "entity": {
                "image": {
                  "derivative": {
                    "url": "http://pr11114-zsu5hscui7bhz5wkd4vteyr3eskornyf.ci.cms.va.gov/sites/default/files/styles/large/public/2022-10/IMG_4190.jpg"
                  }
                }
              }
            },
            "fieldLink": {
              "url": {
                "path": "/pittsburgh-health-care/legionella-water-testing"
              }
            },
            "fieldLinkLabel": "Read the full article"
          }
        }
      ]
    }
  }
}
{
  "data": {
    "menuByName": {
      "name": "Other Search Tools",
      "links": [
        {
          "label": "Test event",
          "url": {
            "path": "/health-care/view-test-and-lab-results"
          },
          "links": []
        }
      ]
    }
  }
}
{
  "data": {
    "menuByName": {
      "name": "Popular on VA.gov",
      "links": [
        {
          "label": "test test 4",
          "url": {
            "path": "/resources/test-registry-exam-checklist"
          },
          "links": []
        }
      ]
    }
  }
}

This looks good to me.

Copy link
Contributor

@chri5tia chri5tia left a comment

Choose a reason for hiding this comment

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

All the testing steps worked and I don't see any issues.

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.

This looks great.
I just want to declare what we talked about on zoom.

  • Design review and ux guidance all that will come later
  • user permissions will also happen later.
  • The primary focus here is to get the fields in to the CMS, to unblock FE.

Also for archival purposes: we had talked about condensing the two block types into one, since they are both the same right now, but had discussed the likelihood/risk that the two blocks would need to diverge from each other. So this PR is hedging that bet.

| Products | products | Vocabulary | |
| Topics | topics | Vocabulary | |
| Type of Redirect | type_of_redirect | Vocabulary | |
Scenario: Bundles
Copy link
Contributor

Choose a reason for hiding this comment

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

Assuming this formatting is the default formatting coming directly out of the spec tool?

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 appears so, unfortunately. I poked around in phpstorm and didn't see any auto-format for behat feature files, but it could be that I just missed it. In the future I'll double check with a text editor.

@swirtSJW
Copy link
Contributor

Nice work on the QA steps

@swirtSJW
Copy link
Contributor

This PR originally started here: #11016. It was decided to move to an integration branch for the homepage updates, so this PR was created.

Next time around, it is easy enough to change the target branch after the fact. The old PR could have been fine, no need to close. That would have kept all the comments and other history.

Full disclosure, github makes it hard to find the option to change the target.
You have to click "edit" which looks like it is just for the PR title
image

Then you are presented with the destination UI
image

@swirtSJW swirtSJW merged commit cc406ae into department-of-veterans-affairs:integration-VACMS-8877-homepage-hardening-refresh Oct 13, 2022
@dsasser
Copy link
Contributor Author

dsasser commented Oct 13, 2022

This PR originally started here: #11016. It was decided to move to an integration branch for the homepage updates, so this PR was created.

Next time around, it is easy enough to change the target branch after the fact. The old PR could have been fine, no need to close. That would have kept all the comments and other history.

Full disclosure, github makes it hard to find the option to change the target. You have to click "edit" which looks like it is just for the PR title image

Then you are presented with the destination UI image

Thanks so much Steve. I thought this was possible, but it wasn't apparent how, and I avoided looking it up for some reason.

dsasser added a commit that referenced this pull request Oct 14, 2022
* VACMS-10626: Add new benefits promo block type.

* VACMS-10626: Add new home page hero entityqueue.

* VAMCS-10626: Add owner field to benefit promo block.

* VACMS-10626: Use select form widget for owner field.

* VACMS-10626: Add other search tools menu.

* VACMS-10626: Add popular on va.gov menu.

* VACMS-10626: Add news promo custom block and related fields.

* VACMS-10626: Add feature toggle for new homepage version.

* VACMS-10626: Add homepage news spotlight entityqueue.

* VACMS-10626: Add content model test changes.

* VACMS-10626: Add menus test updates.

* VACMS-10626: Add custom block fields to behat tests.

* VACMS-10626: Update custom block fields behat test from spec tool output.

* VACMS-10626: Update form display for news promo block.

* VACMS-10626: Swap out link teaser for cta paragraph on news promo block.

* VACMS-10626: Remove field_owner from new block types.

* VACMS-10626: Add field_administration section field to new blocks.

* VACMS-10626: Update guidance and character count formatting for new blocks.

* VACMS-10626: Add image field to news promo block.

* VACMS-10626: Replace alert block cta paragraph ref field with individual fields for better control.

* VACMS-10626: Update behat spect tool test to reflect new content model changes.

Co-authored-by: Daniel Sasser <[email protected]>
@jilladams jilladams mentioned this pull request Oct 26, 2022
1 task
dsasser added a commit that referenced this pull request Nov 2, 2022
* VACMS-10626: Add new benefits promo block type.

* VACMS-10626: Add new home page hero entityqueue.

* VAMCS-10626: Add owner field to benefit promo block.

* VACMS-10626: Use select form widget for owner field.

* VACMS-10626: Add other search tools menu.

* VACMS-10626: Add popular on va.gov menu.

* VACMS-10626: Add news promo custom block and related fields.

* VACMS-10626: Add feature toggle for new homepage version.

* VACMS-10626: Add homepage news spotlight entityqueue.

* VACMS-10626: Add content model test changes.

* VACMS-10626: Add menus test updates.

* VACMS-10626: Add custom block fields to behat tests.

* VACMS-10626: Update custom block fields behat test from spec tool output.

* VACMS-10626: Update form display for news promo block.

* VACMS-10626: Swap out link teaser for cta paragraph on news promo block.

* VACMS-10626: Remove field_owner from new block types.

* VACMS-10626: Add field_administration section field to new blocks.

* VACMS-10626: Update guidance and character count formatting for new blocks.

* VACMS-10626: Add image field to news promo block.

* VACMS-10626: Replace alert block cta paragraph ref field with individual fields for better control.

* VACMS-10626: Update behat spect tool test to reflect new content model changes.

Co-authored-by: Daniel Sasser <[email protected]>

Co-authored-by: Daniel Sasser <[email protected]>
Co-authored-by: Daniel Sasser <[email protected]>
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.

Drupalize new Homepage components
4 participants