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

Header megamenu: Menu links not explicitly connecting to their Promo #15491

Closed
2 tasks done
Tracked by #14739
jilladams opened this issue Oct 2, 2023 · 8 comments
Closed
2 tasks done
Tracked by #14739
Assignees
Labels
Accelerated Publishing Drupal engineering CMS team practice area sitewide Transfer VA.gov frontend CMS team practice area VA.gov megamenu CMS managed product owned by Public Websites team

Comments

@jilladams
Copy link
Contributor

jilladams commented Oct 2, 2023

Status

[2024-07-02] Slack message to Micah/Carol about transferring this ticket to their team repo for their Header/footer epic.
[2024-02-16] Comment in ticket to Micah in DST: Here's a ticket for your team's consideration when they componentize the header/footer.

To Do Refinement session 1/9:

  • make the changes on a lower environment
  • spin up a tugboat to ensure nothing is broken
  • Fran to reach out to CAIA with results and ask do they want to make the changes on prod or do they need help?

Description

https://dsva.slack.com/archives/CDHBKAL9W/p1696271256885979

In the megamenu, the benefit areas can be expanded, and include a Promo block, e.g.:

Screenshot 2023-10-02 at 11 40 18 AM

The Promo block used in the menu should ideally be connected to the menu item via Drupal. But in some cases, a menu item that is displaying a Promo block in the FE does not have that Promo block relationship set in the menu item > Related Promo field. (How is the FE getting the right block to display, without this field value? Great question: content-build is reverse engineering and grabbing related promo from the Benefit page itself, when needed. More notes: https://dsva.slack.com/archives/CDHBKAL9W/p1696272554275839?thread_ts=1696271256.885979&cid=CDHBKAL9W)

Menu: https://prod.cms.va.gov/admin/structure/menu/manage/header-megamenu
Terms that display a Promo block in the FE, but do not have the value set in the Menu Item:

User story

AS A Drupal maintainer
I WANT to ensure that data connections are established correctly in Drupal
SO THAT we don't accidentally regress the megamenu

Engineering / testing notes

It is probably simple to just select the right promo and set it in the Menu Items. But because the header works today without those field values, we want to test this locally first to make sure nothing breaks when we add the values to Drupal.

Content-build is able to successfully put promos on every hub in prod today, without the Drupal data association, via logic in this file: https://github.com/department-of-veterans-affairs/content-build/blob/main/src/site/stages/build/drupal/menus.js#L220

Per Tanner:

that getRelatedHubByPath function works because content-build queries the data for the whole site at once and stores it. so that pages object it's checking is actually:

   const pages = buildOptions.isPreviewServer
    ? contentData.data.nodes.entities
    : contentData.data.nodeQuery.entities;

which is all the node entities for the whole site. so it goes and finds the appropriate benefits hub entity and grab the promo block from that instead

Acceptance criteria

  • Promo blocks are set in Related Promo for each Megamenu item that shows a Promo block today in production
  • Verified pre-prod that setting these Related Promo values does not break the megamenu
@jilladams jilladams added Needs refining Issue status Public Websites Scrum team in the Sitewide crew VA.gov frontend CMS team practice area Drupal engineering CMS team practice area labels Oct 2, 2023
@jilladams
Copy link
Contributor Author

It's a FE task to make sure content-build doesn't get weird once these block values are added, but might need CMS people help to get that data local for testing? Not clear to me.

@FranECross
Copy link

FranECross commented Nov 29, 2023

@FranECross Split into two tickets for FE and BE. FE estimate swag 2-3

@FranECross FranECross removed the Needs refining Issue status label Jan 11, 2024
@FranECross
Copy link

@micahchiang Here's a ticket for your team's consideration when they componentize the header/footer.

@FranECross FranECross added the Blocked Issues that are blocked on factors other than blocking issues. label Feb 16, 2024
@FranECross FranECross removed the Blocked Issues that are blocked on factors other than blocking issues. label Apr 24, 2024
@FranECross FranECross added Transfer and removed Public Websites Scrum team in the Sitewide crew labels Jul 2, 2024
@jilladams
Copy link
Contributor Author

This came up again related to Accelerated Publishing launch: https://dsva.slack.com/archives/C01SR56755H/p1732122329103169?thread_ts=1731449060.323069&cid=C01SR56755H

The megamenu in the Accelerated Publishing build is missing the right-hand promo blocks, because in some cases those are built via content-build knowledge, and the data relationship is not established correctly in Drupal. I believe the first step here is to edit the relevant data in Drupal to make the right data associations, and then we can verify if anything is left to do. We likely need to do that in Tugboat first, to make sure it doesn't double things up in the header.

In the modern world of Header ownership:

  • CAIA owns the data piece, though Sitewide can assist.
  • DST owns the build & compiled presentation. Though: DST has not been onboarded to the idea of next-build at all. SO: they own the content-build in prod.

@mmiddaugh @FranECross @micahchiang for awareness. and cc @laflannery cuz I know you were gonna try to bring this up in refinement.

@jilladams
Copy link
Contributor Author

jilladams commented Nov 20, 2024

I have made the suggested content changes in a Tugboat: https://cms-wiat77wwflrifw00ikgu4mku19x5itmk.demo.cms.va.gov/

Just requested a content release, and should be able to prove dupe promo blocks in the megamenu or not in the FE once it builds.

  • If dupe promo blocks: FE work will be required to account for that in content-build, in order to make the data change in Prod, in order to fix next-build
  • If no dupe promo blocks: we can make the changes in Prod CMS, close this ticket, and AP will be unblocked.

@jilladams
Copy link
Contributor Author

jilladams commented Nov 20, 2024

No dupe blocks in the FE after a successful content-release: https://web-wiat77wwflrifw00ikgu4mku19x5itmk.demo.cms.va.gov/.

Screenshots ![Image](https://github.com/user-attachments/assets/19c6b00e-2744-42b9-901e-83da908d1799) ![Image](https://github.com/user-attachments/assets/6a580799-2dce-4c5b-8de5-b02ea00c6fd5) ![Image](https://github.com/user-attachments/assets/1c0a71f7-b510-4612-acc3-b0e0c4e4e49e) ![Image](https://github.com/user-attachments/assets/bbb3e786-354d-49a2-b015-1f3af2a71770) ![Image](https://github.com/user-attachments/assets/7a08fa34-191a-4c3f-9ef1-7f543a6e99a2) ![Image](https://github.com/user-attachments/assets/c4c8efca-a47b-4c32-b255-2b54bb7eb1a4)

@jilladams
Copy link
Contributor Author

I made the required block / menu item changes in Prod Drupal.

There's a content release in progress for 15 mins now, 17101. It should finish at 4pm PT.
They should roll out in content release 17102. ETA for that is ~5:15pm PT.

@jilladams
Copy link
Contributor Author

Verified in prod, closing.

@jilladams jilladams self-assigned this Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accelerated Publishing Drupal engineering CMS team practice area sitewide Transfer VA.gov frontend CMS team practice area VA.gov megamenu CMS managed product owned by Public Websites team
Projects
None yet
Development

No branches or pull requests

3 participants