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-link: Replacing external icon with text #1396

Merged
merged 6 commits into from
Nov 14, 2024
Merged

Conversation

Andrew565
Copy link
Contributor

@Andrew565 Andrew565 commented Nov 11, 2024

Chromatic

https://3303-external-link-update--65a6e2ed2314f7b8f98609d8.chromatic.com


Description

Closes #3303

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-11-11 at 11 40 07 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 patch Patch change in semantic versioning label Nov 11, 2024
@Andrew565 Andrew565 self-assigned this Nov 11, 2024
@Andrew565 Andrew565 requested a review from a team as a code owner November 11, 2024 16:40
@@ -285,8 +285,7 @@ export class VaLink {
onClick={handleClick}
target="_blank"
>
{text}
<va-icon class="external-link-icon" icon="launch"></va-icon>
{text} (opens in a new tab)
Copy link
Contributor

Choose a reason for hiding this comment

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

This should have flagged a visual change in Chromatic on the va-link and va-statement-of-truth stories at a minimum. Can you try toggling the onlyChanged flag to see if that picks it up?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can do!

@jamigibbs jamigibbs requested a review from a team November 12, 2024 15:14
Copy link
Contributor

@jamigibbs jamigibbs left a comment

Choose a reason for hiding this comment

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

Can you check what's up with va-privacy-agreement? It doesn't look like it's updated: https://3303-external-link-update--65a6e2ed2314f7b8f98609d8.chromatic.com/?path=/docs/uswds-va-privacy-agreement--docs

Screenshot 2024-11-12 at 9 16 29 AM

Also is it possible to keep the period from dropping to the next line in va-statement-of-truth?

Screenshot 2024-11-12 at 9 15 47 AM

@Andrew565
Copy link
Contributor Author

@jamigibbs Looks like the privacy agreement wasn't using the va-link component, just a hard-coded link and va-icon. I'll update it, thanks for catching that!

I'll see what I can do about the statement of truth dropped period, that period exists outside of the va-link component so I'll have to mod the va-statement-of-truth component someway somehow.

<va-icon class="hydrated privacy-policy-icon"></va-icon>
<span class="usa-sr-only">opens in a new window</span>
</a>.
<va-link class="hydrated"></va-link>.
Copy link
Contributor

@jamigibbs jamigibbs Nov 14, 2024

Choose a reason for hiding this comment

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

I am surprised this test doesn't expect more details on the link. 🤔 Like these attributes:

href="/privacy-policy/"
text="privacy policy"
external

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I was surprised by that too. Good thing we still have separate e2e tests for the va-link component itself to make sure those props work!

@@ -16,6 +16,12 @@
margin: 24px;
}

@media screen and (max-width: $small-screen) {
:host .short-line {
width: var(--vads-size-line-length-1);
Copy link
Contributor

Choose a reason for hiding this comment

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

Good to see this new token coming in handy!

@Andrew565 Andrew565 merged commit 4d04298 into main Nov 14, 2024
8 checks passed
@Andrew565 Andrew565 deleted the 3303-external-link-update branch November 14, 2024 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch Patch change in semantic versioning
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove external link variation [Development]
4 participants