-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
feat(issue-stream): Update priority badge/selector #78726
feat(issue-stream): Update priority badge/selector #78726
Conversation
label: ( | ||
<GroupPriorityBadge | ||
variant={hasStreamlinedIssueStream ? 'streamlined' : 'default'} | ||
priority={priority} | ||
/> | ||
), |
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.
Note that I have decided to keep the labels for the badges that are shown in the dropdown, unlike for the badges in the issue stream.
interface Props extends SVGIconProps { | ||
bars?: 0 | 1 | 2 | 3; | ||
} | ||
const IconCellSignal = forwardRef<SVGSVGElement, Props>(({bars = 3, ...props}, ref) => { |
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.
Not attached to this name, feel free to give suggestions.
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.
Looks like material icons has a similar name, so seems okay to me.
Only other think I could think of would be IconSignalBars
type={variant === 'signal' ? 'default' : getTagTypeForPriority(priority)} | ||
icon={variant === 'signal' && <IconCellSignal bars={bars} />} | ||
> | ||
{(showLabel && PRIORITY_KEY_TO_LABEL[priority]) ?? t('Unknown')} |
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 you use VisuallyHidden
here so that the text still exists for screen readers and tests?
60d6679
to
9bf00de
Compare
closes #77819
Creates the new design for the issue priority badge under the
variant
prop within the<GroupPriorityBadge/>
component. This design is currently under a feature flag, so it is not visible.Demo with flag manually set to true:
Screen.Recording.2024-10-07.at.1.47.39.PM.mov