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 2206 hide call center js #2193

Open
wants to merge 14 commits into
base: dev
Choose a base branch
from

Conversation

whitealbum
Copy link
Contributor

@whitealbum whitealbum commented Jan 24, 2025

Jira Task

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

Description

script runs on all pages, if api returns -1, css is injected to hide contact info.

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

You can add actualSeconds = -1; to the top of createDisplayWaitTime(). This should force the logic into the 'else' statement where it will call the injectCSS() function. Any element with the data-contact-callout attribute should no longer be visible. data-contact-callout="visible" should change to data-contact-callout="hidden" and style="display: none;" should be appended to the end.
<span id="top-phone" class="usa-nav__secondary-item" data-contact-callout="hidden" style="display: none;">

If actualSeconds != -1, the contact center stuff should show 80% of the time. To test this, simply reload the page several times. If at any point the contact info isn't visible, this works.

Change Requirements

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

Validation Steps

  • Test instruction 1
  • Test instruction 2
  • Test instruction 3

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.

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.

1 participant