-
Notifications
You must be signed in to change notification settings - Fork 68
refactor(UI): Replace trash icon with custom SVG asset #3345
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
Conversation
Replace the default trash icon from cozy-ui with a custom SVG asset in the Empty trash component to improve visual appearance. This change improves the user experience when viewing empty trash folder.
BundleMonFiles updated (3)
Unchanged files (18)
Total files change +2.24KB +0.04% Groups updated (1)
Unchanged groups (2)
Final result: ✅ View report in BundleMon website ➡️ |
src/components/Error/Empty.jsx
Outdated
} | ||
|
||
let iconToShow = EmptyIcon[type] | ||
if (isTwakeTheme() && type !== 'trash') { |
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.
if we can use only isTwakeTheme()
in the condition, it will be easier to simplify the code when we no longer need this condition (and then have to remove uesless code in few weeks)
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.
updated
Update the condition in Empty.jsx to only check isTwakeTheme() which makes the code cleaner and easier to remove when this condition is no longer needed.
@@ -27,7 +27,7 @@ const EmptyCanvas = ({ type, canUpload, localeKey, hasTextMobileVersion }) => { | |||
const { isMobile } = useBreakpoints() | |||
|
|||
let iconToShow = EmptyIcon[type] | |||
if (isTwakeTheme() && type !== 'trash') { | |||
if (isTwakeTheme()) { |
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 meant to use isTwakeTheme()
only somehow 🤔 so by changing the code if necessary... do we have the same result here than before?
Replace the default trash icon from cozy-ui with a custom SVG asset in the Empty trash component to improve visual appearance.
This change improves the user experience when viewing empty trash folder.