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

va-alert-sign-in: add new component #1424

Merged
merged 8 commits into from
Dec 12, 2024
Merged

va-alert-sign-in: add new component #1424

merged 8 commits into from
Dec 12, 2024

Conversation

Andrew565
Copy link
Contributor

@Andrew565 Andrew565 commented Dec 3, 2024

Chromatic

https://3364-sign-in-alerts--65a6e2ed2314f7b8f98609d8.chromatic.com


Description

Closes #3364

QA Checklist

  • Component maintains 1:1 parity with design mocks
  • Text is consistent with what's been provided in the mocks
  • Component behaves as expected across breakpoints
  • Accessibility expert has signed off on code changes (if applicable. If not applicable provide reason why)
  • Designer has signed off on changes (if applicable. If not applicable provide reason why)
  • Tab order and focus state work as expected
  • Changes have been tested against screen readers (if applicable. If not applicable provide reason why)
  • New components are covered by e2e tests; updates to existing components are covered by existing test suite
  • Changes have been tested in vets-website using Verdaccio (if applicable. If not applicable provide reason why)

Screenshots

Screenshot 2024-12-03 at 11 25 42 AM
Screenshot 2024-12-03 at 11 26 04 AM
Screenshot 2024-12-03 at 11 26 16 AM
Screenshot 2024-12-03 at 11 26 25 AM
Screenshot 2024-12-03 at 11 26 33 AM

Acceptance criteria

  • QA checklist has been completed
  • Screenshots have been attached that cover desktop and mobile screens

Definition of done

  • Documentation has been updated, if applicable
  • A link has been provided to the originating GitHub issue (or connected to it via ZenHub)

@Andrew565 Andrew565 added the major Major change in semantic versioning label Dec 3, 2024
@Andrew565 Andrew565 self-assigned this Dec 3, 2024
@Andrew565 Andrew565 requested a review from a team as a code owner December 3, 2024 22:27
@jamigibbs jamigibbs added minor For a minor Semantic Version change and removed major Major change in semantic versioning labels Dec 4, 2024
variant: this.variant,
},
};
this.componentLibraryAnalytics.emit(detail);
Copy link
Contributor

Choose a reason for hiding this comment

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

Analytics will need to be coordinated with that platform team so we might just want to remove that logic for now and create a follow-up ticket to work with them.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can comment out the analytics logic I think.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think I would prefer just removing code instead of commenting it out. There are plenty of other analytics examples we can reference in other components if we want to re-add it.

Copy link

@nichia nichia left a comment

Choose a reason for hiding this comment

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

Thanks @Andrew565 for the PR, we (the Cartographers team) are following it closely and very eager to start using it. I'm reviewing the PR and want to check if we can add additional Props to enable customization of the component:

  • the alert Heading defaults to h2 - some of our static pages needs the heading level to be h3. Can we add a heading level props?
  • In additional to the standard Heading text (eg. 'Verify your identity' or 'Sign in'), depending on the apps, we need to append additional service description to the heading eg. 'Sign in to send secure messages' or 'Verify your identity to access more VA.gov tools and features'. Can we add a service description prop. If provided, append it to the heading?

@jamigibbs jamigibbs requested a review from a team December 4, 2024 20:58
@Andrew565
Copy link
Contributor Author

@nichia The decision was made to support custom heading levels but not custom heading text at this time. A storybook example has been added showing how to set custom heading levels, with "H2" still the default.

// };
// this.componentLibraryAnalytics.emit(detail);
// }
// }
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we clean up all of the commented out code?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since we'd need all of this code once analytics is worked out in a week or two, it's my preference to just leave it here.

Copy link
Contributor

Choose a reason for hiding this comment

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

@Andrew565 Can we link to that analytics ticket here then? Is it in a sprint yet?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Decided you were right that we have plenty of other examples of how to implement the analytics code elsewhere, and that it might be longer than I thought to coordinate, so just going ahead and removing the commented out code. As far as I can see there's not an analytics ticket for this component yet, I'll make sure one gets made.

@jamigibbs jamigibbs requested a review from rsmithadhoc December 5, 2024 22:59
@rsmithadhoc
Copy link
Contributor

I'll review for a11y in department-of-veterans-affairs/vets-design-system-documentation#3385

@jamigibbs jamigibbs removed the request for review from rsmithadhoc December 6, 2024 15:46
@babsdenney
Copy link

@Andrew565 This looks good! One thing I'm not sure if we change is the titles of the alerts? This alert doesn't haven't a default alert as it all depends on the use case. Could we change the title to match the documentation?

  • Required sign-in (verified)
  • Optional sign-in (verified)

Copy link

@LWWright7 LWWright7 left a comment

Choose a reason for hiding this comment

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

From a design perspective everything looks good to me for the component itself.

The main thing that jumped out to me is exactly what Barb had said about the alert...
Screen Shot 2024-12-06 at 1 05 02 PM

and after inspecting, it appears the background color should be orange, but appears dark gray for whatever reason:

Screen Shot 2024-12-06 at 1 08 52 PM

Not sure if this is a bug?

(To reduce future confusion when other components start using variants.)
@Andrew565
Copy link
Contributor Author

@babsdenney Storybook requires there to be a "default implementation" of every component or else it doesn't render the page, but I was able to add a duplicate entry for Required Sign In Verified. It won't let me add parentheses.

Screenshot 2024-12-10 at 3 31 07 PM

@LWWright7 The gray background color instead of the orange is due to a glitch in the Formation transition. Apparently, Storybook is still setup to use Formation styles instead of CSS-Library styles, so I'll make a ticket for that.

Screenshot 2024-12-10 at 3 35 39 PM

@jamigibbs
Copy link
Contributor

jamigibbs commented Dec 11, 2024

The gray background color instead of the orange is due to a glitch in the Formation transition. Apparently, Storybook is still setup to use Formation styles instead of CSS-Library styles, so I'll make a ticket for that.

@Andrew565 Just FYI, Ian already wrote a ticket to address Storybook style issues when we upgraded to 7. So it might be a combination of Formation and other custom Storybook styles that changed from that upgrade:

@Andrew565 Andrew565 merged commit 80b5a76 into main Dec 12, 2024
8 checks passed
@Andrew565 Andrew565 deleted the 3364-sign-in-alerts branch December 12, 2024 14:00
@jamigibbs jamigibbs changed the title New va-alert-sign-in component va-alert-sign-in: add new component Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor For a minor Semantic Version change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Alert Sign-in - Development
6 participants