-
Notifications
You must be signed in to change notification settings - Fork 95
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
Implement votes tab on account page - Closes #1779 #1822
Conversation
…:LiskHQ/lisk-hub into 1779-implement-votes-tab-on-account-page
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 man, looks good, I think just 1 or 2 changes and the rest are details that I don't know if we should discuss in Monday meeting with @slaweet to see what will be the best way to follow related destructuring in the render
i18n/locales/en/common.json
Outdated
@@ -311,6 +313,7 @@ | |||
"Password": "Password", | |||
"Paste": "Paste", | |||
"Pending...": "Pending...", | |||
"Percentage of successfully forged blocks of when the delegate should have forged a block of transactions.": "Percentage of successfully forged blocks of when the delegate should have forged a block of transactions.", |
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 I am not wrong this is not properly write, should be without the of between blocks and when, like this.
Percentage of successfully forged blocks of when the delegate should have forged a block of transactions
Percentage of successfully forged blocks when the delegate should have forged a block of transactions
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.
Checked all tooltips with marketing team, and updated where necessary
|
||
&.isLoading { | ||
& .loadingOverlay { | ||
background: rgba(255, 255, 255, 0.8); |
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.
maybe you can use a constant in 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.
This one is because it's just for the mask when in the loading state, that we will probably change for the final design.
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
src/components/votes/votesTab.css
Outdated
align-items: center; | ||
bottom: 0; | ||
background: var(--color-white); | ||
box-shadow: 0 -1px 5px 0 rgba(30, 25, 77, 0.06); |
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 better to use a constant in here
src/components/votes/votesTab.js
Outdated
<h1>{t('Voted delegates')}</h1> | ||
<div className={`${styles.filterHolder}`}> | ||
<InputV2 | ||
disabled={votes && votes.length === 0} |
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 this can be replace for {votes && !votes.length}
src/components/votes/votesTab.js
Outdated
</div> | ||
) : null | ||
} | ||
{filteredVotes.length > 0 |
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 in here too.
you can just use filteredVotes.length.
By the way, maybe you can try to use the same way in all the files when open/close brackets for dont affect the indentation.
in line 60 you open brackets and then use the next line to code but in here you open brackets and the code next to the brackets, so it is not a real problem is just that is easier to read when you do the same and not change it very often and the indentation is better to follow. Same in lines 97 and 103
(really minor details nothing related to the code) 👍🏻
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.
awesome 👍🏻
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.
looks good
What issue have I solved?
#1779
How have I implemented/fixed it?
Implemented Votes tab on another account page, that consumes the votes api to show the data, loading additional data for delegates will be handled in a follow up ticket: #1820
How has this been tested?
Go to
/explorer/accountsV2/:address
of some account and check if:The filter should filter by username:
Review checklist