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

Move content-build's breadcrumbs liquid logic to a liquid filter #2741

Closed
15 tasks
maxx1128 opened this issue Mar 5, 2024 · 6 comments · May be fixed by department-of-veterans-affairs/content-build#2095
Closed
15 tasks
Assignees
Labels

Comments

@maxx1128
Copy link

maxx1128 commented Mar 5, 2024

User Story or Problem Statement

The breadcrumbs component in content-build will be converted to the V3 component. But first, the logic for modifying the breadcrumbs in the template must be separated into a liquid filter since the component will only accept an array of data objects. This filter must also be thoroughly tested, since the breadcrumbs component will affect most of the pages on content-build.

The current component update deadline is May 3.

This ticket is a blocker for #2742.

Description or Additional Context

The filter must cover the following points:

  • It will receive the crumbs variable after it is potentially passed into the previous two filters, deriveLastBreadcrumbsFromPath and deriveLcBreadcrumbs.
  • It filters out any breadcrumb objects that do not have crumb.url.path.
  • It sets the URL for the final breadcrumb in the array to the path variable.
  • If crumb.url.path equals "/" and hideHomeBreadcrumb is false, then it will use customHomeCrumbText for the breadcrumb's text (if available). If there's no custom text, it uses the text from the crumb object.
  • All other breadcrumbs keep their URL and text data the same.
  • The objects in this array are mapped to meet the specifications for the V3 component's breadcrumb-list parameter.

Please reference src/site/includes/breadcrumbs.drupal.liquid for more details of what logic to carry over.

Change management

Note: 57 products use the Liquid template for breadcrumbs, per Design System: department-of-veterans-affairs/va.gov-cms#14724 (comment)

Not all of those products are Sitewide products. Design System has agreed to help code review on behalf of the other affected products: https://dsva.slack.com/archives/C01DBGX4P45/p1709666843934939?thread_ts=1709664794.685379&cid=C01DBGX4P45

We should also coordinate with DS team to get a change announcement posted for awareness, and/or report in Team of Teams, before we ship.

Steps for Implementation

  • The above filter requirements are met for the new filter
  • Unit testing is added for the filter that tests all necessary variables and stress cases.

Acceptance Criteria

  • Implementation steps are met
  • Prior to merge, notify PM / DM for change management outreach
    • PM/DM: Include in Team of Teams update when this is added to sprint
    • #vfs-change-announcements post prior to ship? (Collab with DS team to decide)
  • @department-of-veterans-affairs/vfs-public-websites-frontend is added as a code reviewer on related PRs.
  • @micahchiang from Design System Team is added as a code reviewer on related PRs.
  • @ndsprinkle from Forms Team is added as a code reviewer on related PRs.
@maxx1128 maxx1128 changed the title Move Breadcrumbs liquid logic to a liquid filter Move content-build's breadcrumbs liquid logic to a liquid filter Mar 5, 2024
@jilladams
Copy link

FYI @FranECross @randimays @chriskim2311 for outcome from the Breadcrumbs spike on V3 component migration. I've added an AC here to make sure PW is looped into code review on this change, so we can test our products.

@xiongjaneg
Copy link

@xiongjaneg Take back to Design System with timing

@xiongjaneg
Copy link

@jilladams
Copy link

jilladams commented Mar 27, 2024

Clarification on that thread re: the suggested May 3 deadline: https://dsva.slack.com/archives/C01DBGX4P45/p1711563151493419?thread_ts=1710356217.340919&cid=C01DBGX4P45

question here to clarify: currently, the breadcrumbs don't use a component. We all want to adopt V3 component, but this effort isn't connected to V1 deprecation.
We'd hoped to prioritize the breadcrumb work in current sprint, but are going to have to push it out due to some competing priorities (getting V3 adopted where V1 will deprecate, and the April 5 analytics deadline, etc.). Could you confirm: since this isn't tied to V1 deprecation, is there something else driving your note about May 3 deadline? Or was that assuming it's tied to V1?

@caw310
Copy link
Contributor

caw310 commented Apr 18, 2024

@Andrew565
Copy link
Contributor

Will carry over due to Sitewide team needing more time to review. CC @jilladams

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants