department-of-veterans-affairs / va.gov-cms

Editor-centered management for Veteran-centered content.
https://prod.cms.va.gov
GNU General Public License v2.0
99 stars 69 forks source link

Update CTA widget code to use more modern pattern #18349

Open jilladams opened 5 months ago

jilladams commented 5 months ago

Status: [2024-06-18] Note from Jill in this Slack thread: this is Public Websites tech debt. Not timing critical, but did make a dumpster fire of testing Fri / yesterday. If Dave takes the CTA widget with him to the Health apps crew, this'll be a no op for us.

Context

As a result of moving CTA widget code to LH V1 / facilities-api V2, we found that our older code patterns made testing very difficult. We should update the code to future-proof testing.

Context:

Issue to resolve

To test better in Staging, we could rewrite the CTA widget component to a function component that uses useEffect to only render after the props are received from the flipper vets-api endpoint.

Product pre-requisites / CHANGE MANAGEMENT

The CTA Widget is used all over the place by many teams in implementations we do not own. We need to understand:

Acceptance Criteria

FranECross commented 3 months ago

@jilladams Will this ticket be moving to another team, as many of the other widget tickets? Thanks!

jilladams commented 3 months ago

Maybe! Moving to the "transfer" column until that convo is resolved. Tracking ownership question in 2 places: