-
-
Notifications
You must be signed in to change notification settings - Fork 251
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
Update icon quick actions #14077
Update icon quick actions #14077
Conversation
30673bd
to
4a2e0cc
Compare
packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/QuickActions/Update/Update.tsx
Outdated
Show resolved
Hide resolved
0c7cc3b
to
b076abe
Compare
b076abe
to
1178ae9
Compare
|
||
const common: Omit<UpdateStatusData, 'updateStatus'> = { | ||
updateStatusDevice: isFirmwareOutdated ? 'update-available' : 'up-to-date', | ||
// eslint-disable-next-line no-nested-ternary |
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.
Todo: once logic is settled (after product's feedback)
return theme[colorMap[$variant]]; | ||
}; | ||
|
||
export const mapTrezorModelToIcon: Record<DeviceModelInternal, IconName> = { |
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.
@jvaclavik This shall be at some shared places? What do you suggest?
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 suggest to move it here:
packages/product-components/src/utils/mapTrezorModelToIcon.ts
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.
1178ae9
to
f08666c
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.
Good job! ship it 🚀
Just minor comments.
padding: ${spacingsPx.xxs}; | ||
gap: ${spacingsPx.xs}; | ||
|
||
border-top: 1px solid ${({ theme }) => theme.borderElevation1}; |
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.
Could we add elevated border here? 🙏
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.
What do you mean? Can you share some CSS? 🙏 (dunno what "elevated border" exactly means)
@@ -48,7 +48,7 @@ export const Tor = () => { | |||
size: iconSizes.extraSmall, | |||
}} | |||
> | |||
<Icon name="tor" size={iconSizes.medium} /> | |||
<Icon name="tor" size={iconSizes.medium} variant="tertiary" /> |
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.
please could you update it to name="torBrowser"
? 🙏 tor is legacy icon
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.
); | ||
}; | ||
|
||
export const Update = () => { |
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.
Could we rename it to something more descriptive or with some noun? I think it's easier when you are looking for component in your IDE.
Not sure but thinking about something like ManageUpdate
or UpdateStatus
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.
$size: IconSize; | ||
}; | ||
|
||
const UsbCableFroTrezorIcon = styled.div<UsbCableFroTrezorIcon>` |
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.
typo in component name
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.
return null; | ||
} | ||
|
||
const handleOnclick = () => { |
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.
should be handleOnClick
(you have lower case in C)
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.
|
||
type UpdateRowProps = { | ||
children: ReactNode; | ||
leftIcon: ReactNode; |
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.
How about using type IconName
like everywhere else in case of icons? And if you want to add different component you could rename it to leftItemComponent
. WDYT?
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 point, I renamed it to leftItem
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.
return theme[colorMap[$variant]]; | ||
}; | ||
|
||
export const mapTrezorModelToIcon: Record<DeviceModelInternal, IconName> = { |
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 suggest to move it here:
packages/product-components/src/utils/mapTrezorModelToIcon.ts
9d043ac
to
80d4082
Compare
8e07d15
to
6053863
Compare
QA OK Info:
|
Followup of #14014, part of #13990
Todos / Known Issues:
This PR: