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: halo focus ring #603

Merged
merged 34 commits into from
Mar 6, 2020
Merged

feat: halo focus ring #603

merged 34 commits into from
Mar 6, 2020

Conversation

GarthDB
Copy link
Member

@GarthDB GarthDB commented Mar 3, 2020

Description

Added support for the halo focus ring on:

  • Button
  • Logic Button
  • Checkbox
  • Radio
  • ToggleSwitch
  • Slider

How and where has this been tested?

Steps

  1. Run gulp dev
  2. Visit http://localhost:3000/docs/halo-focus.html
  3. Tab around like a maniac

Tested in:

  • ✅ Chrome
  • ✅ Safari
  • ✅ Firefox
  • ❌ IE 11
    • Checked Checkboxes have incorrect halo size (it's inside of the box)
    • Checked Radios have incorrect halo size (doesn't have gap)

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.
  • Make animation of ring look nicer
  • Create stand-in DNA vars for some components (right now, reusing the Button's vars for Slider)
  • Fix IE 11 bugs
  • Final design signoff
  • This pull request is ready to merge.

@adobe-spectrum-bot
Copy link
Collaborator

@adobe-spectrum-bot
Copy link
Collaborator

@adobe-spectrum-bot
Copy link
Collaborator

@adobe-spectrum-bot
Copy link
Collaborator

@GarthDB GarthDB changed the title feat: fixed button hover focus with dna vars Halo focus ring with DNA vars Mar 3, 2020
@adobe-spectrum-bot
Copy link
Collaborator

@GarthDB GarthDB requested a review from lazd March 3, 2020 19:27
@GarthDB GarthDB linked an issue Mar 3, 2020 that may be closed by this pull request
@GarthDB GarthDB assigned GarthDB and unassigned GarthDB Mar 3, 2020
Copy link
Member

@lazd lazd left a comment

Choose a reason for hiding this comment

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

Move the dimensional stuff to index.css as semantically named variables and calc it all, create static aliases in DNA for the static pixel values you need in skin.css, and this will be good.

Also, have you tested at Large scales?

components/button/skin.css Outdated Show resolved Hide resolved
components/button/skin.css Outdated Show resolved Hide resolved
components/button/skin.css Show resolved Hide resolved
components/button/skin.css Outdated Show resolved Hide resolved
components/button/skin.css Outdated Show resolved Hide resolved
components/checkbox/skin.css Outdated Show resolved Hide resolved
@adobe-spectrum-bot
Copy link
Collaborator

Copy link
Member

@lazd lazd left a comment

Choose a reason for hiding this comment

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

This looks excellent. Just a question about the :focus and the extra selector.

Also, re: the conversation today, should we include Slider in this?

components/button/index.css Outdated Show resolved Hide resolved
components/button/index.css Outdated Show resolved Hide resolved
--spectrum-button-primary-border-size-increase-key-focus: 1px;
--spectrum-actionbutton-quiet-border-size-key-focus: 1px;
--spectrum-button-primary-focus-ring-gap-key-focus: var(--spectrum-alias-focus-ring-gap);
--spectrum-button-primary-focus-ring-size-key-focus: calc(var(--spectrum-alias-focus-ring-gap) + var(--spectrum-alias-focus-ring-size));
Copy link
Member

Choose a reason for hiding this comment

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

+1

@lazd
Copy link
Member

lazd commented Mar 3, 2020

From today's discussion re: Clear Button in toast, the outline should probably be in the same place as the over background button next to it.

@jianliao
Copy link
Contributor

jianliao commented Mar 4, 2020

Hi, I found a few build errors in this PR.
Error running 'checkbox:build': CssSyntaxError in plugin "gulp-postcss"

@lazd lazd changed the title Halo focus ring with DNA vars feat: halo focus ring Mar 4, 2020
@adobe-spectrum-bot
Copy link
Collaborator

* also, remove unnecessary removal of box-shadow on Action Button
@adobe-spectrum-bot
Copy link
Collaborator

@jianliao
Copy link
Contributor

jianliao commented Mar 5, 2020

Pull the trigger too early. Is this an issue for Dial component?
image

@lazd
Copy link
Member

lazd commented Mar 5, 2020

@jianliao hmm, does that same thing happen to the Dial here? http://spectrum-css-archives.s3-website.us-east-2.amazonaws.com/2.17.0/docs/dial.html

I can't even get the thing to focus...

@lazd
Copy link
Member

lazd commented Mar 5, 2020

@lazd
Copy link
Member

lazd commented Mar 5, 2020

@jianliao fixed the Dial issue, good catch!

Now will just fixup the DNA vars and then we can merge.

@adobe-spectrum-bot
Copy link
Collaborator

@adobe-spectrum-bot
Copy link
Collaborator

@adobe-spectrum-bot
Copy link
Collaborator

@adobe-spectrum-bot
Copy link
Collaborator

@adobe-spectrum-bot
Copy link
Collaborator

@@ -25,6 +25,9 @@ governing permissions and limitations under the License.
}

%spectrum-BaseButton {
/* Contain halo */
position: relative;
Copy link
Member

Choose a reason for hiding this comment

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

I hope this doesn't break anything for anyone.

Copy link

Choose a reason for hiding this comment

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

@lazd yes, unfortunately, it causes major regression CUI-7431

@adobe-spectrum-bot
Copy link
Collaborator

@adobe-spectrum-bot
Copy link
Collaborator

@lazd lazd mentioned this pull request Mar 5, 2020
64 tasks
@lazd lazd merged commit d87e9a5 into master Mar 6, 2020
@GarthDB GarthDB deleted the focus-ring branch March 6, 2020 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Halo focus implementation
5 participants