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): add component tokens #10689

Merged
merged 11 commits into from
Nov 15, 2024
Merged

feat(link): add component tokens #10689

merged 11 commits into from
Nov 15, 2024

Conversation

driskull
Copy link
Member

@driskull driskull commented Nov 5, 2024

Related Issue: #7180

Summary

Add link component tokens.

--calcite-link-text-color: Specifies the component's text color.

@github-actions github-actions bot added the enhancement Issues tied to a new feature or request. label Nov 5, 2024
@driskull driskull marked this pull request as ready for review November 5, 2024 00:50
@driskull driskull requested a review from alisonailea November 6, 2024 23:43
Copy link
Contributor

This PR has been automatically marked as stale because it has not had recent activity. Please close your PR if it is no longer relevant. Thank you for your contributions.

@github-actions github-actions bot added the Stale Issues or pull requests that have not had recent activity. label Nov 14, 2024
# Conflicts:
#	packages/calcite-components/src/components.d.ts
#	packages/calcite-components/src/components/link/link.e2e.ts
@driskull driskull added the pr ready for visual snapshots Adding this label will run visual snapshot testing. label Nov 15, 2024
@driskull
Copy link
Member Author

@alisonailea @macandcheese can I get a review of this one?

@driskull driskull removed the pr ready for visual snapshots Adding this label will run visual snapshot testing. label Nov 15, 2024
Copy link
Contributor

@macandcheese macandcheese left a comment

Choose a reason for hiding this comment

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

Looks good, just some small q / notes


describe("theme", () => {
describe("default", () => {
themed(html` <calcite-link href="#" icon-start="banana" icon-end="information">link</calcite-link> `, {
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure how granular we want to get with these - you could also test against an internal span element rendered without a href - don't know if that's totally duplicative with this or not.

* These properties can be overridden using the component's tag as selector.
*
* @prop --calcite-link-text-color: Specifies the component's text color.
*/
Copy link
Contributor

Choose a reason for hiding this comment

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

Not actionable: I think this single property works for the time being - in the future I could see the need for --calcite-link-icon-start-color and --calcite-link-icon-end-color.

Users can currently just use --calcite-icon-color - but if they wanted granular control over each icon for whatever reason, we can add those down the road as needed.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, down the road.

relative
inline
border-none
bg-transparent
p-0;
color: var(--calcite-link-text-color, var(--calcite-color-text-link));
line-height: inherit;
white-space: initial;
background-image: linear-gradient(currentColor, currentColor),
Copy link
Contributor

Choose a reason for hiding this comment

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

For this underline, maybe we could pass it through with --calcite-link-underline ? Kind of a strange prop, I know design was maybe going to re-evaluate this, but for now we'd need to let users override it somehow. If they've overridden the link color they'll need to change this right?

Copy link
Member Author

Choose a reason for hiding this comment

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

Lets just think about it. we can add it later.

@driskull driskull added the pr ready for visual snapshots Adding this label will run visual snapshot testing. label Nov 15, 2024
@driskull driskull dismissed alisonailea’s stale review November 15, 2024 22:00

Addressed feedback.

@driskull driskull merged commit 5d26527 into dev Nov 15, 2024
16 checks passed
@driskull driskull deleted the dris0000/link-tokens-7180 branch November 15, 2024 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Issues tied to a new feature or request. pr ready for visual snapshots Adding this label will run visual snapshot testing. Stale Issues or pull requests that have not had recent activity.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants