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

Improvements to the header #594

Merged
merged 6 commits into from
Feb 24, 2021

Conversation

manuelwedler
Copy link
Contributor

Fixes #557

This PR prepares the header for adding the UDC deposit and withdraw functionality (#556) according to Sash's updated design.

We moved the mint button next to the on-chain balance. Before it was next to the off-chain balance even though it doesn't affect it.
Having the selected token first in the header is necessary for being able to still mint all tokens.

@codecov
Copy link

codecov bot commented Feb 18, 2021

Codecov Report

Merging #594 (5041dd9) into master (683c433) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #594      +/-   ##
==========================================
+ Coverage   95.77%   95.79%   +0.01%     
==========================================
  Files          88       88              
  Lines        2203     2210       +7     
  Branches      305      307       +2     
==========================================
+ Hits         2110     2117       +7     
  Misses         51       51              
  Partials       42       42              
Impacted Files Coverage Δ
src/app/components/token/token.component.ts 98.41% <ø> (-0.16%) ⬇️
...rc/app/modules/raiden-icons/raiden-icons.module.ts 100.00% <ø> (ø)
src/app/components/header/header.component.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 683c433...5041dd9. Read the comment docs.

Copy link

@weilbith weilbith left a comment

Choose a reason for hiding this comment

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

Looks pretty good to me. 👍
Just minor things and some questions. 😃

Comment on lines 110 to 114
matTooltip="{{
tokenBalancesOpen
? ''
: 'Show all on-chain balances'
}}"

Choose a reason for hiding this comment

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

Nitpick: Sorry I forgot again if this was easily possible in Angular. But this really bloats the template with details. If possible it would be cool if this could be defined as some kind of computed data and you just have something like matTooltip="{{ showBalancesTooltip }}". What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There's not a feature like the computed data of Vue. You can use a function but that would get invoked for every change detection. But I just found out that there is matTooltipDisabled property you can use to not show the tooltip conditionally. That makes more sense in this case. Thank you for helping me finding this!

text-transform: uppercase;
color: $light-grey;

&--eth {
Copy link

@weilbith weilbith Feb 22, 2021

Choose a reason for hiding this comment

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

Nitpick: modifiers of the BEM scheme are usually behavior descriptive adjectives. So eventually --upper-case or similar fits better. This would also make it re-usable in case you would need it for anything else that needs the same modification. But this is really a stupid nitpick. 😆

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You are totally right :)

[token]="token"
></app-balance-with-symbol>
<button
*ngIf="(network$ | async)?.chainId !== 1"

Choose a reason for hiding this comment

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

I would consider to give this expression a helpful name that reads better. E.g. ngIf="!connectedToMainnet" What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, makes sense as it also was like this before :)

src/app/components/header/header.component.ts Show resolved Hide resolved
The mint button is now displayed next to the on-chain token balance
because it doesn't increase the off-chain balance.
@manuelwedler manuelwedler merged commit 0f96277 into raiden-network:master Feb 24, 2021
@manuelwedler manuelwedler deleted the header-improvements branch February 24, 2021 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improvements to the on-chain balance overlay
2 participants