-
Notifications
You must be signed in to change notification settings - Fork 6
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
VAMS-20163 news release contact number #919
base: main
Are you sure you want to change the base?
Conversation
dd61b73
to
5baaf95
Compare
Looks good - I Tested standard phone numbers and exts. I don't currently know of any instances where Fax, TTY or SMS are used here so I wasn't able to confirm those |
id: number?.id || null, | ||
type: number?.field_phone_number_type || null, | ||
number: number?.field_phone_number || null, | ||
ext: number?.field_phone_extension || null, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😅 What happens if these are false-y? I can't think of a reason we'd ever want empty strings for any of these, but this will turn those empty strings into null
. 🤔 Probably fine? 🤷
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was also dubious about this, but was trying to follow style/pattern. Getting existential about the identity of a defect ticket, it was feeling weird to shift that style for this work. Mostly because I would then feel the need to change other un-related areas to match. I think next steps around this sort of thing for me at least would be to hook my local drupal up to local next to start playing around with different missing data states.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to see a few things up, but I think it looks generally good.
Co-authored-by: Chris Valarida <[email protected]>
Co-authored-by: Chris Valarida <[email protected]>
Description
Adds media contact phone number to press releases. Adds query into paragraph entity for phone. Adds the
va-telephone
webcomponent intoIntrinsicElements
. Changes the person_profile to use the phone type paragraph for phone instead of the incorrect phone string, this created changes beyond press release. Updates mocks to return more data for contacts and phone.Generated description
This pull request includes several changes to the handling and formatting of contact information, particularly phone numbers, in the
pressRelease
andnewsStory
data queries. The changes ensure that phone numbers are now treated as arrays of objects, allowing for multiple numbers and additional details such as type and extension.Changes to contact information handling:
src/data/queries/pressRelease.ts
: Updated theparams
function to includefield_press_release_contact.field_telephone
and modified theformatter
function to handle phone numbers as arrays of objects with additional details. [1] [2]src/data/queries/tests/__snapshots__/newsStory.test.tsx.snap
: Added detailed phone number information to the snapshot for news stories.src/data/queries/tests/__snapshots__/pressRelease.test.tsx.snap
: Updated the snapshot for press releases to include detailed contact information with phone numbers.src/data/queries/tests/pressRelease.test.tsx
: Added a test to handle missing or null contact fields correctly and updated theparams
function test to includefield_press_release_contact.field_telephone
.src/mocks/newsStory.mock.json
: Updated the mock data to include detailed phone number information.src/mocks/pressRelease.mock.json
: Updated the mock data to include detailed contact information with phone numbers.src/mocks/staffProfile.mock.js
: Updated the mock response to include detailed phone number information.Changes to tests and components:
src/templates/layouts/pressRelease/index.test.tsx
: Updated the test to check for the presence of multiple phone numbers and their attributes. [1] [2]src/templates/layouts/pressRelease/index.tsx
: Modified thePressRelease
component to render multiple phone numbers with their respective details.src/templates/layouts/staffProfile/dataService.test.tsx
: Removed phone number fields from the test data. [1] [2]Ticket
closes #20163.
Developer Task
main
branch ofnext-build
.main
. (Note that changes tomain
will move automatically into production.)Testing Steps
<va-telephone>
webcomponentScreenshots
Reviewer
Reviewing a PR
This section lists items that need to be checked or updated when making changes to this repository.
Standard Checks
Merging an Approved Layout
When merging a layout, you must ensure that the content type has been turned on for
next-build
inside theCMS
. This CMS flag must be turned on for editors to preview their work using the next build preview server.Resource types (layouts) that have not been approved by design should NOT be pushed to production. Ensure that slug.tsx does not include your resource type if it is not approved.
The status of layouts should be kept up to date inside templates.md. This includes QA progress, development progress, etc. A link should be provided for where testing can occur.
Merging a Non-Approved Layout
Your new resource type should not be included inside slug.tsx. Items added here will go into production once merged into the
main
branch. It is imperative that we do not push anything live that has not been approved.Ensure that this layout has been added to the templates.md file with the current status of the work.