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

Usagov 1789 wizard datalayer #2046

Merged
merged 9 commits into from
Nov 6, 2024
Merged

Usagov 1789 wizard datalayer #2046

merged 9 commits into from
Nov 6, 2024

Conversation

omerida
Copy link
Contributor

@omerida omerida commented Oct 29, 2024

Jira Task

https://cm-jira.usa.gov/browse/USAGOV-1789

Description

Moves the datalayer for wizards out of twig template and builds it with the datalayer event listener.
Fixes 3 issues against current dev, as of 10/29. The last item is being fixed in another ticket:

  • For Spanish wizard pages, sets the Taxonomy_Text_1 to "Página principal",
  • For Spanish wizards pages, setsTaxonomy_URL_1 to "/es/" instead of "/es"
  • Removes the trailing , in Taxonomy_URL_6 that have it.

Type of Changes

  • New Feature
  • Bugfix
  • Frontend (Twig, Sass, JS)
    • Add screenshot showing what it should look like
  • Drupal Config (requires "drush cim")
  • New Modules (requires rebuild)
  • Documentation
  • Infrastructure
    • CMS
    • WAF
    • WWW
    • Egress
    • Tools
    • Cron
  • Other

Testing Instructions

Change Requirements

  • Requires New Documentation (Link: {})
  • Requires New Config
  • Requires New Content

Validation Steps

  • Make two exports for comparison
    • make a tome export of local using the dev branch, rename html/ to html-dev/ Also in the usagov_ssh_postprocessing module, renamed save the published pages CSV for the dev run to compare their output
    • switch to this branch, make a tome export, rename to html-dev
  • Compare HTML(html-tidy config attached)
    • use html-tidy + find command to "normalize" the HTML output in each directory. Use the option to remove indentation. In each HTML folder run a command like:
      find . -name '*.html' -type f -print -exec tidy -config ../tidy-config.txt --warn-proprietary-attributes false -mq '{}' \;
    • use diff + grep to compare the contents of both directories to confirm the HTML is same between branches. Something like this where diff ignores the cache busting query string drupls adds to CSS and JS files will give you a file to review in a text editor..:
      diff -brwd --strip-trailing-cr --exclude=_data -I " rel=\"stylesheet\">" -I "<script src=" -I js-view-dom-id --exclude=themes html-dev/ html/ > html.diff

Security Review

  • Adds/updates software (including a library or Drupal module)
  • Communication with external service
  • Changes permissions or workflow
  • Requires SSPP updates

Reviewer Reminders

  • Reviewed code changes
  • Reviewed functionality
  • Security review complete or not required

Post PR Approval Instructions

Follow these steps as soon as you merge the new changes.

  1. Go to the USAGov Circle CI project.
  2. Find the commit of this pull request.
  3. Build and deploy the changes.
  4. Update the Jira ticket by changing the ticket status to Review in Test and add a comment. State whether the change is already visible on cms-dev.usa.gov and beta-dev.usa.gov, or if the deployment is still in process.

@omerida omerida marked this pull request as draft October 29, 2024 19:27
@omerida omerida marked this pull request as ready for review November 1, 2024 13:19
@DaleMHFrey
Copy link
Contributor

I am having a hard time testing with the recommended command of find . -name '*.html' -type f -print -exec tidy -config ../tidy-config.txt --warn-proprietary-attributes false -mq '{}' \; since the tidy-config.txt file does not seem to be in the repo.

I have checked things manually though, and it all mostley looks good to me. The only thing I see that may be awry, is that we are no longer prefixing "t_" before the "Page ID" column for taxonomy terms, though, with the way this has been refactored, this may no longer be necessary?

I say lets merge this in, and if we really need to add the "t_" prefix back in, then I can do that as a part of USAGOV-2048.

I am seeing a comment from Amy saying "right now we want to hold off so Scott and Gene can test their branch on the dev site" - I'll ping the team and ask if we are ok to proceed forward.

@omerida
Copy link
Contributor Author

omerida commented Nov 5, 2024

@DaleMHFrey the html tidy config file is linked here now: https://github.com/usagov/usagov-2021/wiki/tome

@DaleMHFrey DaleMHFrey merged commit 73e4c6e into dev Nov 6, 2024
5 of 6 checks passed
@DaleMHFrey DaleMHFrey deleted the USAGOV-1789-wizard-datalayer branch November 6, 2024 19:49
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.

2 participants