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

FormTokenField: Added Padding to resolve close button overlap issue #41556

Merged
merged 5 commits into from
Jun 9, 2022

Conversation

akasunil
Copy link
Member

@akasunil akasunil commented Jun 5, 2022

What?

Fixed issue of close button overlap while isBorderless prop is true in FormTokenField component.

Why?

FIx #41447

Testing Instructions

Please include step by step instructions on how to test this PR.

  1. Open a Post or Page edit.
  2. Go to tags input.
  3. Add tags and check design.

Screenshots or screencast

CleanShot 2022-06-05 at 13 09 28@2x

Copy link
Member

@mirka mirka 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 patch!

I can see the CSS structure is not in an optimal place to begin with. For example, the button outline is already too close to the text in the default variant, and starts to overlap text in the borderless variant. And the default/borderless switching really shouldn't be this hacky.

CleanShot.2022-06-06.at.20.56.08.mp4

But I understand that a proper fix requires a bit more in-depth reworking of the elements. So I'm fine with merging the bandaid fix in this PR for now, as it is at least incrementally better and doesn't add any complexity that would be hard to remove when refactoring.

I'd just like to rope in @jameskoster for a quick design check on the spacings. (Bonus: James, it would be cool if you could give us some updated mockups of this component so the button isn't jammed and has the newer look & feel 🙂 Not necessary for this PR though.)

@mirka mirka added the [Package] Components /packages/components label Jun 6, 2022
@mirka mirka requested review from jameskoster and ciampo June 6, 2022 12:17
@jameskoster
Copy link
Contributor

Here's what I see:

Screenshot 2022-06-07 at 09 38 33

To my eye the X looks a little too close to the text. I think we can increase that to 24px ($grid-unit-30), which also helps (a little) with the outline issue:

Screenshot 2022-06-07 at 09 39 55


Agree this component could use some design love. I'm not sure about the history, but I don't know that we really need the 'borderless' variant, there's probably more value in a consistent appearance? It's especially strange since neither variant has a border :)

@ciampo ciampo added the [Type] Bug An existing feature does not function as intended label Jun 9, 2022
@ciampo ciampo added this to In progress (owned) ⏳ in WordPress Components via automation Jun 9, 2022
@ciampo ciampo moved this from In progress (owned) ⏳ to In progress ⏳ (un-owned) in WordPress Components Jun 9, 2022
@mirka
Copy link
Member

mirka commented Jun 9, 2022

@sunil25393 Thanks for updating! If you could add a brief changelog entry, this PR is ready to merge 👍

@mirka mirka changed the title Added Padding to resolve close button overlap issue FormTokenField: Added Padding to resolve close button overlap issue Jun 9, 2022
WordPress Components automation moved this from In progress ⏳ (un-owned) to In progress (owned) ⏳ Jun 9, 2022
Copy link
Member

@mirka mirka left a comment

Choose a reason for hiding this comment

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

Thanks! 🚀

@mirka mirka merged commit d56ade5 into WordPress:trunk Jun 9, 2022
WordPress Components automation moved this from In progress (owned) ⏳ to Done 🎉 Jun 9, 2022
@github-actions github-actions bot added this to the Gutenberg 13.5 milestone Jun 9, 2022
@akasunil akasunil deleted the fix-form-token-field-style-issue branch June 10, 2022 03:44
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
Development

Successfully merging this pull request may close these issues.

FormTokenField: Styling is broken when isBorderless
4 participants