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

Fix : Secondary Button Transition #66045

Merged
merged 5 commits into from
Oct 14, 2024

Conversation

Vrishabhsk
Copy link
Contributor

What? + How?

  • Modify box-shadow style for components-button.is-secondary to allow transition delay to be applied
  • Reference used to fix it : Ref-1 & Ref-2

Why?

This transition works for the primary/tertiary variations but not the secondary variation.

Screenshots or screencast

  • Original
Screen.Recording.2024-10-11.at.12.40.23.PM.mov
  • Fixed
Screen.Recording.2024-10-11.at.12.40.42.PM.mov

@Vrishabhsk Vrishabhsk requested a review from ajitbohra as a code owner October 11, 2024 08:49
Copy link

github-actions bot commented Oct 11, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: Vrishabhsk <vrishabhsk@git.wordpress.org>
Co-authored-by: tyxla <tyxla@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@t-hamano t-hamano added [Type] Bug An existing feature does not function as intended [Package] Components /packages/components labels Oct 12, 2024
Copy link
Contributor

@t-hamano t-hamano left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!

$black looks a bit unnatural to me. Below I temporarily changed the transition-delay from 0.1s to 1s to better demonstrate the focus outline transition:

bb9e5e8df17b2391d04079c2665a1fb1.mp4

currentColor feels smoother to me:

ed2a180abd2433547a2d272cefab3767.mp4

packages/components/src/button/style.scss Outdated Show resolved Hide resolved
@t-hamano t-hamano requested a review from a team October 12, 2024 07:50
@Vrishabhsk
Copy link
Contributor Author

Thanks @t-hamano

  • currentColor does fit in better, and increasing the delay does point out the flaw in using $black
  • I have modified the PR accordingly : 0147438
  • Also, do you want me to implement the same for the feature image button as mentioned here : #65299

Let me know. Thanks

Copy link
Member

@tyxla tyxla left a comment

Choose a reason for hiding this comment

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

Secondary button transition looks good, thanks for fixing it @Vrishabhsk! 🙌

Before we ship it, could you please add a CHANGELOG entry?

@tyxla
Copy link
Member

tyxla commented Oct 14, 2024

Also, do you want me to implement the same for the feature image button as mentioned here : #65299

That would be great, thank you! Ideally, that button should just inherit the styles and transitions from the default secondary button. That might mean some style overrides could be cleaned up.

Feel free to address it in another PR, of course.

Copy link
Member

@tyxla tyxla left a comment

Choose a reason for hiding this comment

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

LGTM 👍 ✅

Thanks for the fix @Vrishabhsk 🚀

@tyxla tyxla merged commit ca9857e into WordPress:trunk Oct 14, 2024
63 checks passed
@github-actions github-actions bot added this to the Gutenberg 19.5 milestone Oct 14, 2024
ciampo pushed a commit that referenced this pull request Oct 14, 2024
* Modify box-shadow to allow transition delay

* Replace hex with

* Replace $black with currentColor

* Update changelog

---------

Co-authored-by: Marin Atanasov <8436925+tyxla@users.noreply.github.com>

Co-authored-by: Vrishabhsk <vrishabhsk@git.wordpress.org>
Co-authored-by: tyxla <tyxla@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
karthick-murugan pushed a commit to karthick-murugan/gutenberg that referenced this pull request Nov 13, 2024
* Modify box-shadow to allow transition delay

* Replace hex with

* Replace $black with currentColor

* Update changelog

---------

Co-authored-by: Marin Atanasov <8436925+tyxla@users.noreply.github.com>

Co-authored-by: Vrishabhsk <vrishabhsk@git.wordpress.org>
Co-authored-by: tyxla <tyxla@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Components /packages/components [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants