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-15055: Accelerated Publishing Install and enable computed_breadcrumbs. #15193

Merged
merged 15 commits into from
Sep 27, 2023

Conversation

schiavo
Copy link
Contributor

@schiavo schiavo commented Sep 11, 2023

Description

Include breadcrumb data to JSON API to support Accelerated Publishing Next js implememtation.
Relates to #14741 Spike: Breadcrumb modules for Drupal JSON:API

Testing done

Local testing comparing JSON API data with GraphQL data.

Screenshots

Before
Screenshot-20230911141531-2338x2264

After
Screenshot-20230911141803-2056x2266

Comparison with GraphQL results
GraphQL
image

JSON API
image

QA steps

  1. Do this
    • Validate that breadcrumb data appears in JSON API e.g. /jsonapi/node/page
  2. Then
    • Validate the UI is unaltered e.g. /node/add/page
  3. Then validate Acceptance Criteria from issue
  • Breadcrumb data is available in the JSON:API response for a node
  • JSON:API breadcrumb data functionally matches GraphQL query data for equivalent queries/node types
  • Installation of the module does not alter the editor experience in any way

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

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

Is this PR blocked by another PR?

  • DO NOT MERGE

@va-cms-bot va-cms-bot temporarily deployed to Tugboat September 11, 2023 18:08 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat September 11, 2023 18:21 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat September 11, 2023 19:06 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat September 11, 2023 19:18 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat September 11, 2023 19:25 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat September 11, 2023 19:31 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat September 11, 2023 19:39 Destroyed
@github-actions
Copy link

GitHub Workflows (.github/workflows/*.yml)

Have you...

  • pinned all affected GitHub Actions at a specific commit by SHA?
  • reviewed the source code of the action at the commit you are pinning?
  • confirmed that no GitHub security measures are being bypassed?
  • checked for any injection of user content into protected contexts?
  • reviewed Security hardening for GitHub Actions?
  • reviewed GitHub Workflows?

@va-cms-bot va-cms-bot temporarily deployed to Tugboat September 11, 2023 19:43 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat September 11, 2023 19:54 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat September 11, 2023 20:17 Destroyed
tjheffner
tjheffner previously approved these changes Sep 11, 2023
Copy link
Contributor

@tjheffner tjheffner left a comment

Choose a reason for hiding this comment

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

This appears to be working for me.

I am not sure what the CI failure is about... there are only 49 lines changed in composer.lock here 😉 And they are changes we want... so 🤷

Run thollander/actions-comment-pull-request@d61db783da9abefc3437960d0cce08552c7c004f
  with:
    comment_tag: check-composer-lock-changes
    message: The number of lines changed in composer.lock exceeds the acceptable threshold.
  
  - Lines changed: 50
  - Threshold: [2](https://github.com/department-of-veterans-affairs/va.gov-cms/actions/runs/6151340447/job/16691185057?pr=15193#step:5:2)00
  
  This is a warning only. Please review the changes and ensure that they are acceptable.
  
    GITHUB_TOKEN: ***
    mode: upsert
    create_if_not_exists: true
  env:
    LINES_CHANGED: [5](https://github.com/department-of-veterans-affairs/va.gov-cms/actions/runs/6151340447/job/16691185057?pr=15193#step:5:5)0
    THRESHOLD: 200
No comment has been found with asked pattern. Creating a new comment.
Error: Resource not accessible by integration

@ndouglas
Copy link
Contributor

ndouglas commented Sep 11, 2023

@tjheffner I believe it's a permissions issue:

Error: Resource not accessible by integration

GITHUB_TOKEN has read-only permissions on this PR because of the origin, so it can't write to the PR thread.

It doesn't matter, though. You can safely ignore it. I'll figure out a less annoying fallback.

@ndouglas
Copy link
Contributor

This one is more interesting:

CMS Facility editors are able to interact with Lovell -- Anonymous users can see the Lovell sidebar menu on Lovell TRICARE (failed)

@ndouglas
Copy link
Contributor

interesting. On main:

Screenshot 2023-09-11 at 5 08 41 PM

On this preview:

Screenshot 2023-09-11 at 5 10 09 PM

So it looks like this test is checking every single link, and then this PR adds a new link that doesn't conform 🤔

I'm not crazy about this test. I think it should restrict by a class or something. Because this is really an innocuous PR and it shouldn't break this test.

@ndouglas
Copy link
Contributor

Opened an issue: #15196

@ndouglas
Copy link
Contributor

ndouglas commented Sep 11, 2023

@timcosgrove FYSA I think this PR is blocked by a bug in a Facilities test. Feel free to double-check me because it's late in the day for the ol' Nug Doug.

EDIT: Got bored, opened a PR.

@va-cms-bot va-cms-bot temporarily deployed to Tugboat September 25, 2023 21:37 Destroyed
@jilladams
Copy link
Contributor

@laflannery should take a look at this from an a11y perspective.
Since it's CMS UX, @BlakeOrgan should also prob weigh in if he hasn't already.

@laflannery
Copy link
Contributor

laflannery commented Sep 27, 2023

Would someone be able to more clearly tell me what I'm looking at? Such as:

  • Is this CMS only, not VA.gov breadcrumbs?
  • Am I just looking to make sure these match what is on Prod currently?
  • Should I be testing any particular content types or are random nodes fine?
  • Any known issues that I should be ignoring?
  • Anything else?

Also the Tugboat failed

@tjheffner
Copy link
Contributor

@laflannery @BlakeOrgan looking at CMS breadcrumbs only, and we'll have this PR environment working again for you ASAP.

The breadcrumbs will match prod CMS in most cases, but not all. Swirt's comment has a good breakdown of the differences between this PR, prod CMS, & the live site. Essentially some pages have gained a visible breadcrumb in the CMS that wasn't visible before. This new crumb matches what the breadcrumb visible on the live site in most cases.

Essentially looking from an a11y+ux perspective that including an extra breadcrumb for the current page is kosher.

Testing on random nodes is fine.

@va-cms-bot va-cms-bot temporarily deployed to Tugboat September 27, 2023 18:30 Destroyed
@laflannery
Copy link
Contributor

I actually like the new, additional breadcrumb, this makes everything much more expected and consistent. I have no issues with this new display

@BlakeOrgan
Copy link
Contributor

Approved. I like the addition of displaying the current page within the breadcrumbs.

@va-cms-bot va-cms-bot temporarily deployed to Tugboat September 27, 2023 21:42 Destroyed
@tjheffner tjheffner enabled auto-merge (squash) September 27, 2023 21:51
@tjheffner tjheffner merged commit 0eda648 into department-of-veterans-affairs:main Sep 27, 2023
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants