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

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

Open
wants to merge 5 commits into
base: spectrum-two
Choose a base branch
from

Conversation

aramos-adobe
Copy link
Collaborator

@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. ✨

Copy link

changeset-bot bot commented Feb 20, 2025

🦋 Changeset detected

Latest commit: c8ecf03

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

@@ -2,7 +2,8 @@ import { Template as ButtonGroup } from "@spectrum-css/buttongroup/stories/templ
import { Template as Checkbox } from "@spectrum-css/checkbox/stories/template.js";
import { Template as CloseButton } from "@spectrum-css/closebutton/stories/template.js";
import { Template as Modal } from "@spectrum-css/modal/stories/template.js";
import { getRandomId, renderContent } from "@spectrum-css/preview/decorators";
import { getRandomId } from "@spectrum-css/preview/decorators";
import { Template as Typography } from "@spectrum-css/typography/stories/template.js";
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [eslint] <no-unused-vars> reported by reviewdog 🐶
'Typography' is defined but never used.

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

github-actions bot commented Feb 20, 2025

File metrics

Summary

Total size: 1.38 MB*

Package Size Minified Gzipped
link 4.52 KB 4.29 KB 1.06 KB

link

Filename Head Minified Gzipped Compared to base
index.css 4.52 KB 4.29 KB 1.06 KB 🔴 ⬆ 1.26 KB
metadata.json 2.34 KB - - 🔴 ⬆ 0.87 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.

Copy link
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
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
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