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

VACMS-18457 Implement action links on Event CTAs #850

Merged
merged 4 commits into from
Dec 19, 2024

Conversation

randimays
Copy link
Contributor

@randimays randimays commented Dec 17, 2024

Description

Implements DS web components for the CTAs on events pages.

Ticket

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

Developer Task

Tasks

Preview Give feedback

Testing Steps

Validate events pages with the various CTAs to ensure the links are working as expected.

Screenshots

Tested "Register" CTA on /outreach-and-events/events/75551/

Before After
Screenshot 2024-12-17 at 5 22 21 PM Screenshot 2024-12-17 at 5 21 23 PM
Screenshot 2024-12-18 at 10 06 49 AM Screenshot 2024-12-18 at 10 07 49 AM

Tested "Apply" CTA on /outreach-and-events/events/74964/

Before After
Screenshot 2024-12-17 at 5 27 08 PM Screenshot 2024-12-18 at 10 12 40 AM
Screenshot 2024-12-17 at 5 27 16 PM Screenshot 2024-12-18 at 10 12 47 AM

Tested "More details" CTA on /fayetteville-coastal-health-care/events/75509/

Before After
Screenshot 2024-12-17 at 5 29 45 PM Screenshot 2024-12-18 at 10 13 45 AM
Screenshot 2024-12-17 at 5 29 53 PM Screenshot 2024-12-18 at 10 13 56 AM

Tested "RSVP" CTA on /outreach-and-events/events/75660/ using this Tugboat: https://cms-eg5uejd1ek9ar4hzjfk1xcfpcwtwz94r.demo.cms.va.gov/

Screenshot 2024-12-18 at 2 20 16 PM Screenshot 2024-12-18 at 2 20 28 PM

Reviewer

Reviewing a PR

This section lists items that need to be checked or updated when making changes to this repository.

Standard Checks

Tasks

Preview Give feedback

Merging an Approved Layout

When merging a layout, you must ensure that the content type has been turned on for next-build inside the CMS. 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.

@va-cms-bot va-cms-bot temporarily deployed to Tugboat December 17, 2024 23:36 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat December 18, 2024 20:08 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat December 18, 2024 20:10 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat December 18, 2024 20:24 Destroyed
@@ -1,6 +1,10 @@
import { deriveFormattedTimestamp } from './date'

export function formatEventCTA(input: string): string {
if (input.toLowerCase() === 'rsvp') {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before this change, this function returned rsvp as Rsvp

{link && (
<p className="vads-u-margin--0">
<a className="vads-c-action-link--green" href={link?.uri}>
{eventCTA && eventCTA != 'more_details'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replaced the nested ternary with the formatEventCTA utility function which does the same thing.

@randimays randimays marked this pull request as ready for review December 18, 2024 20:27
Copy link
Contributor

@chriskim2311 chriskim2311 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, tested locally and all CTAs look good

@randimays randimays merged commit 510b90d into main Dec 19, 2024
11 of 12 checks passed
@randimays randimays deleted the VACMS-18457-action-link branch December 19, 2024 15:35
@timcosgrove timcosgrove restored the VACMS-18457-action-link branch December 19, 2024 17:51
timcosgrove added a commit that referenced this pull request Dec 19, 2024
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.

4 participants