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

Resolve content model tentacles on 10089 Events checkbox #15641

Closed
10 of 14 tasks
jilladams opened this issue Oct 11, 2023 · 18 comments
Closed
10 of 14 tasks

Resolve content model tentacles on 10089 Events checkbox #15641

jilladams opened this issue Oct 11, 2023 · 18 comments
Assignees
Labels
Defect Something isn't working (issue type) Drupal engineering CMS team practice area Events product maintained by Public Websites team Public Websites Scrum team in the Sitewide crew sitewide

Comments

@jilladams
Copy link
Contributor

jilladams commented Oct 11, 2023

Description

#10089 added an Events checkbox to the Events form.
This change shipped and broke the content model in the front end in 2 known places:

  1. Outreach Materials -- not displaying Publications in VA.gov frontend
  2. VAMC Stories (example) -- "See all stories" link is missing at the foot of the page.
  3. We also need to re-verify Lovell, per Tim, though still no smoking gun for what that might mean

Slack threads

Topline for DaveC

Engineering notes

Feature Toggle may still be "ON" in prod, despite the revert of our code which created it.

We need to be careful about the FEATURE_EVENT_OUTREACH_CHECKBOX feature toggle being deployed as "enabled". The latest CMS mirror is showing it as enabled, but unsure if this was because the snapshot was taken before the revert was deployed.

Everywhere field_listing is used in templates/queries
10 results - 6 files

src/site/layouts/news_story.drupal.liquid:
  45                      </div>
  46:                     {% if fieldListing.entity.entityUrl.path %}
  47:                         <a onClick="recordEvent({ event: 'nav-secondary-button-click' });" class="vads-u-display--block vads-u-margin-bottom--7" href="{{ fieldListing.entity.entityUrl.path }}" id="news-stories-listing-link">See all stories</a>
  48                      {% endif %}

src/site/layouts/publication_listing.drupal.liquid:
  87                {% for entity in outreachAssetsDataArray.entities %}
  88                {% for entity in outreachAssetsDataArray.entities %}
  89:               {% if entity.fieldListing.targetId == entityId %}
  89                {% assign topicsString = entity.fieldLcCategories | buildTopicsString %}
  90                {% assign topicsString = entity.fieldLcCategories | buildTopicsString %}

src/site/stages/build/drupal/process-lovell-pages.js:
  69  
  70  
  71:   if (page?.fieldListing?.entity?.entityUrl) {
  72:     page.fieldListing.entity.entityUrl.path = getLovellVariantOfUrl(
  73:       page.fieldListing.entity.entityUrl.path,
  73        variant,
  74        variant,

src/site/stages/build/drupal/graphql/newStoryPage.graphql.js:
  33      }
  34:     fieldListing {
  35        entity {

src/site/stages/build/drupal/graphql/nodeEvent.graphql.js:
  114      }
  115      }
  116:     fieldListing {

  116        entity {
  117        entity {

  284      }
  285      }
  286:     fieldListing {
  286        entity {
  287        entity {

src/site/stages/build/drupal/graphql/file-fragments/outreachAssets.graphql.js:
  13          fieldDescription
  14:         fieldListing {
  15            targetId

ACs.

  • BE: Events: Add "national outreach calendar" checkbox to Event UI #10089 changes are present and
    • Outreach materials present Publications correctly at /outreach-and-events/outreach-materials/
    • Stories display a link at page footer to "See all stories"
    • Lovell is verified. Talk to Tim and maybe Ryan to clarify what needs verified.
  • Ensure the feature toggle FEATURE_EVENT_OUTREACH_CHECKBOX does not deploy as 'enabled'.
  • AP are added as code reviewers on any related PRs (CMS, or FE)
  • Deployment plan is in place, as FE changes will be required this time.
  • A11y review completed

Deployment Plan

  • Test changes in both this PR, and the related content-build together in a tugboat environment. Completed by Jill October 20, 2023 on this tugboat.
  • A11y confirmation/testing by @laflannery in tugboat
  • PRs (BE 15761, FE c-b 1752) approved by PW and AP teams
  • Merge the BE PR.
  • Wait for deployment of the BE PR and test success.
  • Merge the FE PR.
@jilladams jilladams added Defect Something isn't working (issue type) Public Websites Scrum team in the Sitewide crew Events product maintained by Public Websites team labels Oct 11, 2023
@jilladams jilladams added Needs refining Issue status VA.gov frontend CMS team practice area labels Oct 11, 2023
@jilladams jilladams mentioned this issue Oct 11, 2023
28 tasks
@jilladams jilladams added Drupal engineering CMS team practice area and removed Needs refining Issue status labels Oct 11, 2023
@jilladams
Copy link
Contributor Author

Estimate doesn't factor Lovell complexity. Daniel to talk to AP folks and update as needed with Lovell in mind.

@dsasser
Copy link
Contributor

dsasser commented Oct 19, 2023

Mid-sprint Update 10/19/23

When taking on this ticket, we were planning no architectural changes on the backend, and instead making the frontend (content-build) robust enough to handle both a single value and an array of values. However, this approach had a lot of technical debt built in, and little risk mitigation was possible.

Because of this, we are pivoting to a different architecture:

Backend Changes

  • We will create a new field on the Event content type on the BE.
  • This field will hold 'additional listings' (it is an entity reference field, just like field_listing)
  • It will be hidden from view, and only populated with the correct Outreach calendar Event Listing reference if the checkbox is set.

Frontend (content-build) Changes

  • An additional Graphql reverse entity query will be added to the existing nodeEventListing query, in the same way that the field_listing data is done.
  • We will combine the event data from the two queries prior to piping into the event listing template. This will allow us to inject the data in a single location, without affecting vets-website's related React widget (we won't need to worry about combining, sorting, or other tasks beyond what we are doing in content-build).

Overall this approach is much safer, since we aren't touching the structure of an existing field, but adding another field which is brand new to the ecosystem.

@jilladams
Copy link
Contributor Author

@dsasser I like this and also: it smells like we may get questions at code review time. Would it be worth bouncing this off any other Drupal folks for smell testing before we fully commit? Or feels very safe / uncontroversial as a fix?

@dsasser
Copy link
Contributor

dsasser commented Oct 19, 2023

@dsasser I like this and also: it smells like we may get questions at code review time. Would it be worth bouncing this off any other Drupal folks for smell testing before we fully commit? Or feels very safe / uncontroversial as a fix?

Getting feedback during review time is adequate in this case.

@jilladams
Copy link
Contributor Author

jilladams commented Oct 20, 2023

Testing notes:
Thread related to testing: https://dsva.slack.com/archives/C52CL1PKQ/p1697837268281799?thread_ts=1697835404.910689&cid=C52CL1PKQ

Tugboat with feature toggle enabled: https://cms-ytipldihujdcko41uemzx3w18e31hyof.ci.cms.va.gov/admin/config/system/feature_toggle
FE: https://web-ytipldihujdcko41uemzx3w18e31hyof.ci.cms.va.gov/

Editor login, roles, section Event type Expected behavior Pass/fail in CMS Pass/fail in FE
[email protected], Content creator - VAMC / Content publisher event VAMC event AK, not Natl, recurring Shoudn't see national checkbox 🟢 checkbox does not appear 🟢 Event published normally; AK Events listing fine
[email protected]; Content creator - outreach hub, Content publisher event Outreach event, recurring Shouldn't see the checkbox 🟢 checkbox does not appear 🟢 Event publishes correctly, appears on pg 7 of Outreach events, in correct sequence
[email protected] - shortlisted beta editor, Content creator - VAMC Bedford & Boston / Content publisher event VAMC event, Boston, not recurring. National. Should see / select National checkbox. Event should publish to Natl calendar 🟢 checkbox appears, is selected /s aved. 🟢 Event single page; Boston listing; Outreach calendar page 5 of results
[email protected] - shortlisted beta editor, Content creator - VAMC Bedford & Boston / Content publisher event VAMC event, Bedford, not recurring. National. Should see / select National checkbox. Event should publish to Natl calendar 🟢 checkbox appears, is selected /s aved. - 🟢 single page
- 🟢 Bedford listing - first occurrence appears.
- 🟢 Outreach events listing first occurrence appears pg 7, 11/6; no further occurrences appear (11/13, pg 11).

Other FE tests:

Listings:

Recurring events: expected behavior

In production today, for a recurring event, only the next upcoming instance will appear in the Upcoming filter.
https://www.va.gov/minneapolis-health-care/events/48206/
https://www.va.gov/minneapolis-health-care/events/?selectedOption=upcoming

  • 10/23 recurrence appears
  • 10/30 recurrence does not

https://www.va.gov/outreach-and-events/events/61561/
https://www.va.gov/outreach-and-events/events/

  • 10/31 recurrence appears
  • 11/7 recurrence does not

@dsasser
Copy link
Contributor

dsasser commented Oct 23, 2023

Deployment Plan

  • Test changes in both this PR, and the related content-build together in a tugboat environment. Completed by Jill October 20, 2023 on this tugboat.
  • A11y confirmation/testing by @laflannery in tugboat
  • PRs (BE, FE) approved by PW and AP teams
  • Merge the BE PR.
  • Wait for deployment of the BE PR and test success.
  • Merge the FE PR.

Jill meddled here

I moved this list as checkboxes into the body of the ticket, so it's easy to see next to ACs for modern state of truth.

@dsasser
Copy link
Contributor

dsasser commented Oct 23, 2023

@laflannery when you get a chance, could you review this PR for a11y + breadcrumb signoff? Tugboat is hit or miss today, but you should be able to get in eventually if you keep trying. There is a list of existing FE pages that Jill created while testing that might be of interest to you.

@laflannery
Copy link
Contributor

laflannery commented Oct 23, 2023

@dsasser I got in for a bit but wasn't able to test everything yet. However I do have one general QA item I wanted to mention - I saw this issue that I had flagged as a D10 issue and thought had been resolved in a previous ticket. Is it a problem that it's here in this tugboat?
image

@jilladams
Copy link
Contributor Author

@dsasser @laflanner I see what Laura is seeing here: https://cms-ytipldihujdcko41uemzx3w18e31hyof.ci.cms.va.gov/node/62493/edit

I tried to repro that, using this new event: https://cms-ytipldihujdcko41uemzx3w18e31hyof.ci.cms.va.gov/node/62522/edit

Then got a 502. 😂 but will check when it's back up, re: whether the 2nd date fields appear.

@dsasser
Copy link
Contributor

dsasser commented Oct 23, 2023

@dsasser @laflanner I see what Laura is seeing here: https://cms-ytipldihujdcko41uemzx3w18e31hyof.ci.cms.va.gov/node/62493/edit

I tried to repro that, using this new event: https://cms-ytipldihujdcko41uemzx3w18e31hyof.ci.cms.va.gov/node/62522/edit

Then got a 502. 😂 but will check when it's back up, re: whether the 2nd date fields appear.

I'm still not clear how to reproduce what you and @laflannery are seeing w/ the 2nd set of date fields. Noting that this would be an unexpected change, since we didn't change those fields in any way intentionally.

@laflannery
Copy link
Contributor

laflannery commented Oct 23, 2023

@dsasser and @jilladams some notes:

  • I think that extra fieldset is only showing on recurring events
    • I can see it on the 3 recurring events you have in the table above but NOT in the one non-recurring event and not in the new non-recurring event you made
  • In the previous ticket, the D10 one, the issue was the combination of the version of the events module and D10 that caused that extra fieldset to show. Daniel and Edmund worked on it together to resolved that.
    • This Tugboat is not on D10 but I'm wondering if this is a new version of the module that is not working with our current version of Drupal?

@jilladams
Copy link
Contributor Author

The D10 note is interesting - I know the CMS team was most recently planning to ship that 1st week of November. So I just realized: wow, we need to take that into account with this launch. I'll ping CMS channelt o confirm timing.

@dsasser
Copy link
Contributor

dsasser commented Oct 23, 2023

@laflannery what is the behavior on staging/prod?

@laflannery
Copy link
Contributor

Staging has this same behavior and shows me the extra fieldset:
image

So that being said I feel like I (or someone?) should just ignore this entirely here and ticket this separately right?

@jilladams
Copy link
Contributor Author

Yes, good call. If in Staging, officially not tied to this feature and we can/should handle separately.

@laflannery
Copy link
Contributor

laflannery commented Oct 23, 2023

So back to what I was actually supposed to be reviewing, using the table from Jill above:

Scenario 1

  • FE breadcrumbs look good (it has the VAMC breadcrumbs as expected)
  • FE accessibility approved

Scenario 2

  • FE breadcrumbs look good (it has the Outreach breadcrumbs as expected)
  • FE accessibility approved

Scenario 3

  • FE breadcrumbs look good (it has the VAMC breadcrumbs coming from both listings as expected)
  • FE accessibility approved

Scenario 4

  • FE breadcrumbs look good (it has the VAMC breadcrumbs coming from both listings as expected)
  • FE accessibility approved

CMS

  • Tested logged in as me, Winfield and Timothy, no issues in any of those experiences. Approved

@jilladams
Copy link
Contributor Author

( Noting: all test data at tugboat links i comments above got blown away by Tugboat refresh. )

@laflannery
Copy link
Contributor

Everything is approved by me, breadcrumbs look good and not a11y issues!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Defect Something isn't working (issue type) Drupal engineering CMS team practice area Events product maintained by Public Websites team Public Websites Scrum team in the Sitewide crew sitewide
Projects
None yet
Development

No branches or pull requests

3 participants