-
Notifications
You must be signed in to change notification settings - Fork 314
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
fix(content-uploader): resolve ItemAction issues #3631
Conversation
4b937c4
to
3868277
Compare
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.
this is a duplicate file, there's already an existing tsx file
{...resin} | ||
/> | ||
<Tooltip content={tooltipText}> | ||
<IconButton aria-label={tooltipText} disabled={isDisabled} onClick={onClick} icon={XMark} {...resin} /> |
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.
Just want to make sure that it is intended to use the default icon styles here while overriding the prop like color
for XMark?
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.
good question. yes this is intended since IconButton
has styles that will handle different states like hovering. if we override color
than the styles wouldn't match the rest of the design
in the case of IconInProgress
, this is a custom component that handles the loading state together with the icon. but it should probably be refactored because i don't think it's good for accessibility
tooltip = messages.uploadsCancelButtonTooltip; | ||
} | ||
break; | ||
case STATUS_PENDING: | ||
default: | ||
if (isResumableUploadsEnabled) { | ||
isLoading = true; | ||
Icon = () => ( | ||
<LoadingIndicator aria-label={formatMessage(messages.loading)} className="bcu-ItemAction-loading" /> |
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.
I saw this line is duplicate with the STATUS_STAGED case above. Could we deduplicate it by having it written separately since the LoadingIndicator would kind be fixed.
const LoadingIndicatorIcon = () => <LoadingIndicator aria-label={formatMessage(messages.loading)} className="bcu-ItemAction-loading" />
And replaced the current line with Icon = LoadingIndicatorIcon;
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.
lgtm
Confirmed with designer that
Fill
icons should be used for icon buttons.Before

After

Before

After

Before

After
