Skip to content

Conversation

@bdfranck
Copy link
Collaborator

@bdfranck bdfranck commented Oct 7, 2025

This PR updates the badge component to match the v2 styles and adds two new properties: size and emphasis.

@bdfranck bdfranck force-pushed the benjifranck/3070-v2-badge-update branch from 633ba13 to a2f80e9 Compare October 7, 2025 22:00
@bdfranck bdfranck changed the title --goa-border-width feat(#3070): v2 badge with emphasis and size Oct 7, 2025
@bdfranck bdfranck force-pushed the benjifranck/3070-v2-badge-update branch 2 times, most recently from 39716fb to 964e764 Compare October 7, 2025 22:16
setTimeout(() => validateType(type), 1);
setTimeout(() => {
if (version === "2" && !type) {
type = "default";
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Type is required in v1 but optional in v2. I'm not sure if this is the best approach. Maybe we could handle it in the wrappers or rethink how to have a default option.

Copy link
Collaborator

Choose a reason for hiding this comment

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

should we keep it required in both? I know we have a default badge type, but I don't know if that's expected.

@bdfranck bdfranck marked this pull request as ready for review October 7, 2025 22:43
@bdfranck bdfranck requested a review from twjeffery October 7, 2025 22:43
@bdfranck bdfranck linked an issue Oct 7, 2025 that may be closed by this pull request
Copy link
Collaborator

@twjeffery twjeffery left a comment

Choose a reason for hiding this comment

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

@bdfranck Looks great overall. Just a few spots where we can use tokens instead of hardcoded values, and a couple typos for the token names.

setTimeout(() => validateType(type), 1);
setTimeout(() => {
if (version === "2" && !type) {
type = "default";
Copy link
Collaborator

Choose a reason for hiding this comment

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

should we keep it required in both? I know we have a default badge type, but I don't know if that's expected.

@bdfranck
Copy link
Collaborator Author

@twjeffery I've amended my commit with the following changes:

  • Removed the change where version 2 uses default when no type is specified
  • Added the new text colours
  • Replaced border colours with entire boxShadow tokens

@bdfranck bdfranck force-pushed the benjifranck/3070-v2-badge-update branch from 964e764 to b71f24f Compare October 31, 2025 16:11
@bdfranck bdfranck requested a review from twjeffery October 31, 2025 16:11
Copy link
Collaborator

@twjeffery twjeffery left a comment

Choose a reason for hiding this comment

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

@bdfranck Looks great!

Version 2 styles all look correct

Image Image Image Image

While Version 1 styles maintained

Image Image Image Image

@twjeffery twjeffery requested a review from chrisolsen October 31, 2025 18:19
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.

Badge 2.0 Update

3 participants