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
96 stars 70 forks source link

Update how phone numbers for Support services are added in the CMS #17326

Open laflannery opened 6 months ago

laflannery commented 6 months ago

Status

[2024-08-20] [Dave] Created separate tickets for Vanity and International phone numbers [2024-07-25] [Dave] This probably needs to be split into multiple tickets.

  1. Adding Vanity and International options to Phone Paragraph type
  2. Migrating content type & FE to use Phone paragraph type

[2024-07-12] [Fran] Moved to Next Refinement because until the changes described in this ticket are implemented, we are blocked from using the 'va-telephone' design component. [2024-07-12] [Fran] Note that 'Call us links' have NOT been updated to va-telephone components - Laura pointed out that because we have a bit too much wriggle room in the CMS for adding phone numbers, our va-telephone component cannot easily support all the different types of numbers it'll receive. (The GIBILL number on va.gov/education is a good example of an outlier). Her ticket: https://github.com/department-of-veterans-affairs/va.gov-cms/issues/17326

When #17326 is addressed, we can convert (at least most of) these phone numbers to va-telephone and remove the custom events on them.

Background

We are trying to get all our products on VA.gov to be in alignment with the DS, which means they should always be using the most up to date versions of all available components when possible. In order for the components to work and be rendered correctly on the front end, the content must be passed in a particular way. Unfortunately, the way we have the Support Service phone number fields set up in the CMS, the data cannot be passed properly to the component.

Description

The Support Service content type was created a while ago, long before the DS component, so what was needed for a particular front end component was not considered. This component and the applicable props now do a lot of the display and functionality that the Support Service CMS fields are manually doing.

Considerations for updates:

Additional info

### DRUPAL - Update phone\_number Paragraph Type to include new options
- [ ] https://github.com/department-of-veterans-affairs/va.gov-cms/issues/18999
- [ ] https://github.com/department-of-veterans-affairs/va.gov-cms/issues/18959
- [ ] Add two new options to field_phone_number_type: Vanity & International
- [ ] Add logic to paragraph type that hide/displays appropriate fields when Vanity or International are selected (do they get Extension field?)
- [ ] Add new field for Vanity Info (what should limits on this field be?)
- [ ] Add new field for country code? for International
- [ ] Test on multiple content types
### DRUPAL - Update support\_service Content Type to use phone\_number Paragraph Type
- [ ] BLOCKED by previous task list
- [ ] Data migration of ?? existing phone numbers in field_phone_number to phone_number Paragraph Type
- [ ] Hide field_phone_number on Drupal UI for Support Service
- [ ] Add phone_number Paragraph Type to Support Service (cardinality?)
- [ ] Test it
- [ ] Keep PR in Pending Integration until FE work is ready
### FE - Update Content Build query(ies) + template(s)
- [ ] BLOCKED by previous task list
- [ ] Use new phone number data source for Support Services
- [ ] Name of support service: This is an existing field The text provided in this field should be used for the message-aria-describedby prop
- [ ] Test on all templates where Support Service shows up
- [ ] Keep PR in Pending Integration until Drupal PR merges & deploys
### DRUPAL - Cleanup
- [ ] BLOCKED by previous task list
- [ ] Verification on Prod of all above changes is complete
- [ ] Remove field_phone_number from Support Service

Acceptance Criteria

omahane commented 4 months ago

The only place that we have something like what you're describing for the phone number at present is in Service Locations, using the field_phone (a paragraph type). https://prod.cms.va.gov/node/add/health_care_local_health_service Screenshot 2024-04-10 at 17 38 29

randimays commented 2 months ago

FE QUESTION: Should they not be entering the dashes between the numbers either? Should be be validating and/or providing help text against that or is that ok and the component can handle those?

The web component doesn't like dashes. In many cases we're having to remove them in content-build / the FE

Could we make changes now, update the CMS and the front end but allow this GIBILL number to not use the component?

We can make exceptions in the code for this type of phone number 👍🏻

FranECross commented 1 month ago

@davidmpickett @dsasser @jv-agile6 I feel like this needs some review/love love outside of a refinement meeting to determine the best approach. Would all/some of you be the ones to do that? BTW this ticket is currently blocking implementing the 'va-telephone' component. Thanks! (I'm scooting it back to the backlog. cc @Agile6MSkinner

davidmpickett commented 1 month ago

This sounds like the exact same work as we will be doing in the Q3 Phone Number effort.

laflannery commented 1 month ago

This requires more work that the existing phone pattern does not support:

If this pattern was considered a good option, we could consider adding additional options so that this could cover all scenarios needed for the component:

  • Vanity - If selected this should trigger an conditional field for the vanity info
  • International
davidmpickett commented 1 month ago

Got it, so we'd likely need to update the Phone Paragraph type with those new options and then implement

davidmpickett commented 1 month ago

@laflannery I took a first pass at adding task lists here. Would love a sanity check.

One of the first steps would be defining the exact requirements for the Vanity and International phone number types. Do you feel like you have the info to specify those? Or should we make a little spike ticket for you and I to collaborate on that?

Agile6MSkinner commented 1 week ago

Going to put this in a future epic for vanity/international, etc.