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

Lunarfusion/css 174 breadcrumbs tokens #1569

Merged
merged 20 commits into from
Jan 27, 2023

Conversation

lunarfusion
Copy link
Contributor

@lunarfusion lunarfusion commented Jan 4, 2023

Description

BREAKING CHANGE: This migrates the Breadcrumbs component to core tokens.

Note: as of 01/04, waiting for decision from design regarding the background color on draggable / focused breadcrumb items.

How and where has this been tested?

Screenshots

To-do list

  • 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.
  • I have read the CONTRIBUTING document.
  • I have tested these changes in Windows High Contrast mode.
  • This pull request is ready to merge.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 4, 2023

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

@github-actions github-actions bot temporarily deployed to pull request January 4, 2023 17:11 Inactive
@lunarfusion lunarfusion marked this pull request as ready for review January 4, 2023 22:55
@github-actions github-actions bot temporarily deployed to pull request January 4, 2023 23:00 Inactive
@github-actions github-actions bot temporarily deployed to pull request January 5, 2023 21:27 Inactive
@pfulton pfulton removed the request for review from bernhard-adobe January 23, 2023 20:38
@lunarfusion lunarfusion force-pushed the lunarfusion/css-174-breadcrumbs-tokens branch from 0c8580c to cd55e10 Compare January 23, 2023 21:11
@pfulton pfulton added released-beta Indicates a beta release has been rolled for this PR pending-swc-validation Being reviewed in/by SWC; required for breaking changes labels Jan 23, 2023
@github-actions github-actions bot temporarily deployed to pull request January 23, 2023 21:23 Inactive
@pfulton pfulton requested a review from jenndiaz January 25, 2023 20:50
Copy link
Contributor

@jenndiaz jenndiaz left a comment

Choose a reason for hiding this comment

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

No blockers, looks really good overall. nice work on this!

a couple of questions, opportunity to update a copyright year and a potentially out of scope accessibility concern.


/* text regular active item */
--spectrum-breadcrumbs-font-size-current: var(--spectrum-font-size-200);
--spectrum-breadcrumbs-font-family-current: var(--spectrum-font-family-base); /* placeholder for --spectrum-font-family-default */
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to keep these placeholder comments in here?

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, these are placeholder stand-ins for tokens that are not functional.
When we have encountered a token that is absent and needs to be created immediately or that is non-functional (like --spectrum-font-family-default, which does not point to a true font stack), we create a stand-in token in components > tokens > custom-spectrum > custom-vars.css. These tokens then compile into components > tokens > dist > index.css so they can be used.

I am leaving the placeholder note to have a record of the original token that was assigned for this incase the original token is later repaired and the placeholder/stand-in token needs to be removed.

inline-size: 100%;
}

> .spectrum-ActionButton {
Copy link
Contributor

Choose a reason for hiding this comment

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

Not blocking, would you be able to explain or point to some docs for what > . is doing?

Copy link
Contributor Author

@lunarfusion lunarfusion Jan 26, 2023

Choose a reason for hiding this comment

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

CSS selector, selects all .spectrum-ActionButton elements that are immediate children (first ancestor, not grandchildren) of the parent.

So this will select:

.spectrum-Breadcrumbs--compact 
   .spectrum-Breadcrumbs-item 
      .spectrum-ActionButton

But it will not select:

.spectrum-Breadcrumbs--compact 
   .spectrum-Breadcrumbs-item 
      .spectrum-ActionButton
        .spectrum-ActionButton

This selector was already in the CSS, and I try to preserve as much existing CSS as possible as long as it still aligns with the designs and is reflective of up to date code standards.

@@ -0,0 +1,17 @@
/*
Copyright 2022 Adobe. All rights reserved.
Copy link
Contributor

Choose a reason for hiding this comment

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

should go ahead and update these years?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

✨ Great catch, thank you! Updated.

@@ -0,0 +1,17 @@
/*
Copyright 2022 Adobe. All rights reserved.
Copy link
Contributor

Choose a reason for hiding this comment

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

this year too

Copy link
Contributor Author

Choose a reason for hiding this comment

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

✨ Thanks again!

@@ -57,27 +57,27 @@ examples:
status: Verified
markup: |
<nav>
<ul class="spectrum-Breadcrumbs spectrum-Breadcrumbs--sizeL">
<ul class="spectrum-Breadcrumbs">
<li class="spectrum-Breadcrumbs-item">
<button class="spectrum-ActionButton spectrum-ActionButton--sizeM spectrum-ActionButton--quiet">
Copy link
Contributor

Choose a reason for hiding this comment

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

accessibility concern: potentially out of scope since you did not edit these buttons

Having the SVG as the only content of the button and setting aria-hidden"true" results in a button that is empty to screen readers, which I was able to reproduce on Voiceover. Potential solution would be to add a title for the SVG.

Relevant to all open folder svg buttons. I tried to comment each but might of missed a couple.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

🎣 Good catch. I started a slack conversation with our Accessibility folks. @jnurthen

@@ -169,27 +169,27 @@ examples:
status: Verified
markup: |
<nav>
<ul class="spectrum-Breadcrumbs spectrum-Breadcrumbs--sizeS spectrum-Breadcrumbs--multiline">
<ul class="spectrum-Breadcrumbs spectrum-Breadcrumbs--multiline">
<li class="spectrum-Breadcrumbs-item">
<button class="spectrum-ActionButton spectrum-ActionButton--sizeM spectrum-ActionButton--quiet">
<svg class="spectrum-Icon spectrum-Icon--sizeM spectrum-ActionButton-icon spectrum-Breadcrumbs-folder" focusable="false" aria-hidden="true">
Copy link
Contributor

Choose a reason for hiding this comment

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

same accessibility comment from line 63

@@ -258,27 +258,27 @@ examples:
status: Verified
markup: |
<nav>
<ul class="spectrum-Breadcrumbs spectrum-Breadcrumbs--sizeM">
<ul class="spectrum-Breadcrumbs spectrum-Breadcrumbs--compact">
<li class="spectrum-Breadcrumbs-item">
<button class="spectrum-ActionButton spectrum-ActionButton--sizeM spectrum-ActionButton--quiet">
Copy link
Contributor

Choose a reason for hiding this comment

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

same accessibility comment from line 63

find: /--spectrum-breadcrumb(.*)-s-/;
filter: color;
replace: --spectrum-breadcrumb$1-;
[dir="rtl"] & {
Copy link
Contributor

Choose a reason for hiding this comment

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

ohh fancy! nice.

@lunarfusion lunarfusion force-pushed the lunarfusion/css-174-breadcrumbs-tokens branch from d1dd470 to cdb9e00 Compare January 27, 2023 15:26
@github-actions github-actions bot temporarily deployed to pull request January 27, 2023 15:31 Inactive
@github-actions github-actions bot temporarily deployed to pull request January 27, 2023 17:48 Inactive
@github-actions github-actions bot temporarily deployed to pull request January 27, 2023 18:02 Inactive
@pfulton pfulton merged commit a46f3c3 into main Jan 27, 2023
@pfulton pfulton deleted the lunarfusion/css-174-breadcrumbs-tokens branch January 27, 2023 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending-swc-validation Being reviewed in/by SWC; required for breaking changes released-beta Indicates a beta release has been rolled for this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants