-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
pkg/ui: Don't force tracez tags to uppercase. #83913
Conversation
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.
thanks
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.
You're welcome @knz ! CI is passing now, can I get an LGTM? Thank you!
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @adityamaru and @andreimatei)
I'm OK with the change, but I'm not technology expert on the front-end. |
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.
Can do!
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @adityamaru and @andreimatei)
So
This actually makes this kind of confusing for me to read since we are applying the
giving us something like,
Anyway, just a thought. Code quote: const { size, status, icon, iconPosition, text, allowLowerCase } = props;
const styles = ["badge", `badge--size-${size}`, `badge--status-${status}`];
if (!allowLowerCase) {
styles.push("badge--uppercase");
}
const classes = cx(...styles); |
Thanks for cutting out a duplicate! I think I would prefer that we use Thank you. |
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.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @adityamaru, @andreimatei, @dhartunian, @koorosh, and @nathanstilwell)
pkg/ui/workspaces/cluster-ui/src/badge/badge.tsx
line 35 at r1 (raw file):
Previously, nathanstilwell (Nathan Stilwell) wrote…
So
classnames
already has the functionality you are creating here (the ability to add a className based on a boolean variable). So I think what you want is something like,const classes = cx("badge", `badge--size-${size}`, `badge--status-${status}`{ "badge--uppercase": !allowLowerCase, });
This actually makes this kind of confusing for me to read since we are applying the
badge--uppercase
class after negating a variable. It seems like the default for badges should be that they are uppercase and we want the ability to override that. So what if we had a prop called something likeuppercase
and defaulted it to false? Then thecx
call would look like,const classes = cx("badge", `badge--size-${size}`, `badge--status-${status}`{ "badge--uppercase": uppercase, });
giving us something like,
export function Badge(props: BadgeProps) { const { size, status, icon, iconPosition, text, uppercase = true } = props; const classes = cx("badge", `badge--size-${size}`, `badge--status-${status}`{ "badge--uppercase": uppercase, });
Anyway, just a thought.
Oh, neat trick! Thanks! How's this look?
Previously, benbardin (Ben Bardin) wrote…
I still find reviewable very confusing, but I'm not seeing a change yet. Am I missing something? |
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.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @adityamaru, @andreimatei, @dhartunian, @koorosh, and @nathanstilwell)
pkg/ui/workspaces/cluster-ui/src/badge/badge.tsx
line 35 at r1 (raw file):
Previously, nathanstilwell (Nathan Stilwell) wrote…
I still find reviewable very confusing, but I'm not seeing a change yet. Am I missing something?
No, I just forgot to commit locally before pushing 🤦 How about now?
Previously, benbardin (Ben Bardin) wrote…
Nice. |
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.
Reviewed 10 of 10 files at r1, 1 of 1 files at r2, 2 of 2 files at r3, all commit messages.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @adityamaru, @andreimatei, @dhartunian, and @koorosh)
Also, deprecate uses of db-console/.../Badge in favor of the identical version in cluster-ui. Release note: None
bors r+ |
Build succeeded: |
Also, deprecate uses of db-console/.../Badge in favor of the identical version
in cluster-ui.
Release note: None