Skip to content

feat(link): new typography tokens, focus color and design, WHCM focus state#3570

Merged
aramos-adobe merged 21 commits into
spectrum-twofrom
aramos-adobe/css1019-link-s2-migration
Mar 13, 2025
Merged

feat(link): new typography tokens, focus color and design, WHCM focus state#3570
aramos-adobe merged 21 commits into
spectrum-twofrom
aramos-adobe/css1019-link-s2-migration

Conversation

@aramos-adobe
Copy link
Copy Markdown
Contributor

@aramos-adobe aramos-adobe commented Feb 20, 2025

Link S2 migration

New tokens

Color

spectrum-link-focus-indicator-color
spectrum-link-focus-indicator-thickness
spectrum-link-focus-indicator-gap
spectrum-link-corner-radius

Typography

spectrum-link-line-height
spectrum-link-line-height-cjk-100
spectrum-link-font-size
spectrum-link-font-style
spectrum-link-font-weight
spectrum-link-text-underline-thickness
spectrum-link-text-underline-gap

How and where has this been tested?

Please tag yourself on the tests you've marked complete to confirm the tests have been run by someone other than the author.

Validation steps

Regression testing

Validate:

  1. The documentation pages for at least two other components are still loading, including:
  • The pages render correctly, are accessible, and are responsive.
  1. If components have been modified, VRTs have been run on this branch:
  • VRTs have been run and looked at.
  • Any VRT changes have been accepted (by reviewer and/or PR author), or there are no changes.

Screenshots

Screenshot 2025-02-20 at 2 16 30 PM Screenshot 2025-02-20 at 2 16 50 PM

To-do list

  • I have read the contribution guidelines.
  • I have updated relevant storybook stories and templates.
  • I have tested these changes in Windows High Contrast mode.
  • If my change impacts other components, I have tested to make sure they don't break.
  • If my change impacts documentation, I have updated the documentation accordingly.
  • ✨ This pull request is ready to merge. ✨

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Feb 20, 2025

🦋 Changeset detected

Latest commit: b24cbc7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@spectrum-css/link Major
@spectrum-css/contextualhelp Major
@spectrum-css/dropzone Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@aramos-adobe aramos-adobe force-pushed the aramos-adobe/css1019-link-s2-migration branch from 9a2a1e9 to 773de88 Compare February 20, 2025 19:40
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 20, 2025

File metrics

Summary

Total size: 1.37 MB*

Package Size Minified Gzipped
link 4.86 KB 4.61 KB 1.12 KB

link

Filename Head Minified Gzipped Compared to base
index.css 4.86 KB 4.61 KB 1.12 KB 🔴 ⬆ 1.59 KB
metadata.json 2.57 KB - - 🔴 ⬆ 1.07 KB
* Size is the sum of all main files for packages in the library.
* An ASCII character in UTF-8 is 8 bits or 1 byte.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 20, 2025

🚀 Deployed on https://pr-3570--spectrum-css.netlify.app

@castastrophe castastrophe added the S2 Spectrum 2 label Feb 21, 2025
@castastrophe castastrophe force-pushed the spectrum-two branch 5 times, most recently from d5e72d4 to 0f14273 Compare February 24, 2025 22:39
@aramos-adobe aramos-adobe force-pushed the aramos-adobe/css1019-link-s2-migration branch from 8bcd07d to d3a605e Compare February 25, 2025 18:08
@rise-erpelding rise-erpelding self-requested a review February 27, 2025 20:14
Copy link
Copy Markdown
Collaborator

@rise-erpelding rise-erpelding left a comment

Choose a reason for hiding this comment

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

This was such a nicer-sized migration to review compared to some of the ones we've had lately! 😸

The primary, secondary, and static colors are on point and looking good, same for standalone default and standalone quiet! The main recommendation that I'd make here is to ensure that we can see the inline variant with Storybook controls, tests, and with a story of its own on the Docs page. It looks like the only real change there is maybe just the font weight? It seems like there's a clear differentiation between standalone and inline links in S2, so it's probably worth adding something more in the documentation. For instance, we probably want to demonstrate it without filler text, and even if we don't name the variant standalone in CSS (IMO it's fine if the default is standalone), we should probably note somewhere on the docs that standalone is the default.

The changelog says that inline quiet links were removed for accessibility reasons, that's probably a good thing we can integrate into our updated docs page for link. Ideally, we can add this into the JSDoc comments somewhere, and hopefully we'll have Storybook picking those up and putting them back into story descriptions again soon!

Last thing: I'm also wondering if it's possible to stack variants within a story? Like put primary and primary (quiet) in a single frame? I don't know if that was a deliberate decision made when we did the docs site to storybook migration for Link or whether the migration happened before we started doing that, but it might be nice to make the docs page a little bit neater. Up to you.

@aramos-adobe aramos-adobe force-pushed the aramos-adobe/css1019-link-s2-migration branch from 5334465 to c8ecf03 Compare March 3, 2025 15:15
Copy link
Copy Markdown
Collaborator

@rise-erpelding rise-erpelding left a comment

Choose a reason for hiding this comment

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

I think this is almost there!

There are a few, mostly documentation things that I think could make this even more polished - some of these might also be in the individual comments, but I'm duplicating them here because occasionally those comments get lost:

  • Docs page:
    • We could say something about the standalone link being the default variant vs. the inline variant.
    • Rename the Multiline story to include something about focus state in the title (I don't feel super strongly about this one since you talk about it in the JSDoc comment, so I'll leave it to your discretion).
    • Consider changing the wrapping element for TemplateWithFillerText and MultilineText to a <p> instead of <div>
    • Mention the classes being used for variants in sentences.
  • Storybook controls - Remove the ability to turn on both inline and quiet controls.
  • CSS - We should change the font-family to the font-stack.
  • Changeset - Add a bit more about what's changing from S1 to S2 so it reads nicely in the changelog.

Comment thread components/link/stories/link.stories.js
Comment thread components/link/stories/link.stories.js
Comment thread components/link/stories/link.stories.js Outdated
Comment thread components/link/stories/template.js Outdated
Comment thread components/link/index.css Outdated
Comment thread components/link/index.css
Comment thread components/link/stories/link.stories.js Outdated
Comment thread .changeset/tasty-eagles-draw.md
@rise-erpelding rise-erpelding self-requested a review March 13, 2025 17:33
Copy link
Copy Markdown
Contributor

@castastrophe castastrophe left a comment

Choose a reason for hiding this comment

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

Looks great! I left some questions, some suggestions, some ideas, but all of this could go in as-is if needed!

Comment thread .changeset/tasty-eagles-draw.md Outdated
Comment thread .changeset/tasty-eagles-draw.md Outdated
Comment thread .changeset/tasty-eagles-draw.md Outdated
Comment thread .changeset/tasty-eagles-draw.md Outdated
Comment thread .changeset/tasty-eagles-draw.md
Comment thread components/link/index.css
Comment thread components/link/stories/link.stories.js
Comment thread components/link/stories/link.test.js Outdated
Comment thread components/link/stories/template.js Outdated
Comment thread components/link/stories/template.js Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants