Skip to content
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

Merged
merged 4 commits into from
Sep 6, 2024

Conversation

tjuanitas
Copy link
Contributor

Confirmed with designer that Fill icons should be used for icon buttons.

Before
Screenshot 2024-09-03 at 2 02 26 PM

After
Screenshot 2024-09-03 at 1 53 32 PM


Before
Screenshot 2024-09-03 at 2 03 53 PM

After
Screenshot 2024-09-03 at 1 52 13 PM


Before
Screenshot 2024-09-03 at 1 59 52 PM

After
Screenshot 2024-09-03 at 1 56 44 PM

@tjuanitas tjuanitas requested review from a team as code owners September 3, 2024 21:12
i18n/en-US.properties Outdated Show resolved Hide resolved
greg-in-a-box
greg-in-a-box previously approved these changes Sep 3, 2024
@greg-in-a-box greg-in-a-box changed the title fix: resolve ItemAction issues fix(content-uploader): resolve ItemAction issues Sep 3, 2024
Copy link
Contributor Author

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} />
Copy link
Contributor

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?

Copy link
Contributor Author

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" />
Copy link
Contributor

@tjiang-box tjiang-box Sep 4, 2024

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;

Copy link

@bfoxx1906 bfoxx1906 left a comment

Choose a reason for hiding this comment

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

lgtm

@mergify mergify bot merged commit ba299b1 into box:master Sep 6, 2024
7 checks passed
@tjuanitas tjuanitas deleted the fix-item-action-icons branch September 6, 2024 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants