-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[PM-16102] Add min width on interactive badges #12514
Conversation
New Issues
|
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found.
Additional details and impacted files@@ Coverage Diff @@
## main #12514 +/- ##
=======================================
Coverage 33.78% 33.78%
=======================================
Files 2912 2912
Lines 90693 90693
Branches 17151 17151
=======================================
Hits 30641 30641
Misses 57666 57666
Partials 2386 2386 ☔ View full report in Codecov by Sentry. |
@@ -65,7 +65,7 @@ export class BadgeComponent implements FocusableElement { | |||
"disabled:tw-cursor-not-allowed", | |||
] | |||
.concat(styles[this.variant]) | |||
.concat(this.hasHoverEffects ? hoverStyles[this.variant] : []) | |||
.concat(this.hasHoverEffects ? [...hoverStyles[this.variant], "tw-min-w-10"] : []) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, this is fine because I don't want to raise the scope of this ticket, but...
This is a prime example of Tailwind implicitly encouraging weird / non-performant workarounds to simple CSS functionality vs a simple :is(a,button)
selector. yells at cloud
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we could write that here instead. But we would also need to write it for every style in hoverStyles
. Also, why do we have an array of classes to begin with. ☁️ ☁️ ☁️ 👴
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah.... I think it's worth revisiting how we are structuring css for these components
🎟️ Tracking
PM-16102
📔 Objective
This PR adds a min-width of 2.5rem to interactive badges --
button
anda
elements. This will make it easier to click a button that would otherwise have a smaller click box.📸 Screenshots
⏰ Reminders before review
🦮 Reviewer guidelines
:+1:
) or similar for great changes:memo:
) or ℹ️ (:information_source:
) for notes or general info:question:
) for questions:thinking:
) or 💭 (:thought_balloon:
) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion:art:
) for suggestions / improvements:x:
) or:warning:
) for more significant problems or concerns needing attention:seedling:
) or ♻️ (:recycle:
) for future improvements or indications of technical debt:pick:
) for minor or nitpick changes