-
Notifications
You must be signed in to change notification settings - Fork 5
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
[LW 10157] Show collateral deposits fee outside tx summary #1070
[LW 10157] Show collateral deposits fee outside tx summary #1070
Conversation
Allure report
smokeTests: ✅ test report for 498939e4
|
<SummaryExpander | ||
title={t('core.dappTransaction.fromAddress')} | ||
disabled={!isFromAddressesEnabled} | ||
testId="dapp-transaction-from-section-expander" | ||
> | ||
<div className={styles.summaryContent}> | ||
<div className={styles.fromAddress}> |
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.
SonarCloud complains because of the code duplication in this file.
Can we maybe break this looong return into a few sub components?
I see there is a pattern. We have dapp-transaction-from-row
and dapp-transaction-to-row
which looks the same, the only difference is the value we put.
I think if we break this long return into smaller components we can gain better maintenance and code reusability. We can start from local components. We may not need to put them into separate files.
What do you think?
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.
There are more differences than the value, also the class applied to some components and "minus" sign for the "from" section.
I created a new component and cover these cases here: 2467580.
packages/core/src/ui/components/DappTransaction/DappTransaction.module.scss
Outdated
Show resolved
Hide resolved
packages/ui/src/design-system/profile-picture/user-profile.component.tsx
Outdated
Show resolved
Hide resolved
packages/ui/src/design-system/profile-picture/user-profile.component.tsx
Outdated
Show resolved
Hide resolved
packages/ui/src/design-system/profile-picture/user-profile.component.tsx
Outdated
Show resolved
Hide resolved
packages/ui/src/design-system/profile-picture/user-profile.component.tsx
Outdated
Show resolved
Hide resolved
packages/ui/src/design-system/profile-picture/user-profile.component.tsx
Show resolved
Hide resolved
packages/ui/src/design-system/profile-picture/profile-picture.stories.tsx
Show resolved
Hide resolved
packages/ui/src/design-system/dapp-transaction-summary/dapp-transaction-summary.component.tsx
Outdated
Show resolved
Hide resolved
@@ -65,7 +65,7 @@ export const TransactionAssets = ({ | |||
<Grid {...props} columns="$fitContent"> | |||
<Cell> | |||
<UserProfile | |||
fallback={setThemeFallbackImagine} | |||
fallbackLogo={setThemeFallbackImagine} |
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.
another place where we have inconsistency. We have fallbackLogo and we are setting Image. Good to have it aligned. By the way, what this Imagine is? Can we change it to setThemFallbackImage
, please :)
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 valid.
I would say maybe this would require its own ticket for refactoring. The component is also called UserProfile
but it's used to set the images of assets in dapp transaction. Initially it wasn't created for this purpose. We could open a ticket to address this and improve the component in all the app.
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.
Fixed here: bf29a29
margin-bottom: size_unit(2.5); | ||
} | ||
|
||
.divider { |
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.
do we have a divider that is general for the app that we could import? if not, is it worth making this one?
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 couldn't find a component elsewhere. I think is a good idea for a new task, as to not increase the scope 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.
is this something you are looking for? https://github.com/input-output-hk/lace/blob/chore/deps-update-cardano-js-sdk/packages/ui/src/design-system/divider/divider.component.tsx#L12
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.
Yes, thank you. I looked in storybook, but I didn't find it since there is no story for this component.
Fixed here: e7f76d6
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.
Great work! I left a small couple of comments but it looks nice! Do you think there is better way to structure the file of DappAddressContainer
? and break it into smaller components? or not have code duplication?
Thank you. Do you mean |
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.
Great work @lucas-barros
@@ -422,6 +422,8 @@ | |||
"address": "Address", | |||
"origin": "Origin", | |||
"transactionSummary": "Transaction Summary", | |||
"transactionSummaryTooltip": "This summary includes all assets entering or leaving your wallet as part of this transaction, including fees, deposits.", | |||
"additionalInformation": "Additional information", |
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 think the additionalInformation
should be moved to the browser translations file to avoid the long load times (we had this issue for a while that for a few seconds you see the translation path until the core translations are loaded)
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.
Great work 👏
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!
97f5c82
to
b07b759
Compare
b07b759
to
7a23b13
Compare
ab8e314
to
d220bfe
Compare
Quality Gate passedIssues Measures |
Checklist
Proposed solution
Features
Fixes
Testing
Describe here, how the new implementation can be tested.
Provide link or briefly describe User Acceptance Criteria/Tests that need to be met
Screenshots