-
Notifications
You must be signed in to change notification settings - Fork 98
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
Billy/1054 my stake page #1272
Billy/1054 my stake page #1272
Conversation
…into billy/1054-my-stake-page
Codecov Report
@@ Coverage Diff @@
## develop #1272 +/- ##
===========================================
- Coverage 95.91% 95.81% -0.11%
===========================================
Files 82 82
Lines 1615 1624 +9
Branches 76 75 -1
===========================================
+ Hits 1549 1556 +7
- Misses 60 61 +1
- Partials 6 7 +1
|
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
app/src/renderer/scripts/common.js
Outdated
@@ -1,3 +1,16 @@ | |||
module.exports.sleep = function(ms) { | |||
return new Promise(resolve => setTimeout(resolve, ms)) | |||
} | |||
|
|||
module.exports.shortAddress = function(address, length = 4) { |
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 add a comment on what this does
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.
👍
display inline-block | ||
margin auto | ||
&:first-of-type .label-text:after | ||
// content '' |
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 need to keep those comments?
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.
👎
tasks/runner.js
Outdated
@@ -61,6 +61,7 @@ function startRendererServer() { | |||
} | |||
|
|||
module.exports = async function(networkPath) { | |||
console.log(networkPath) |
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 need that?
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.
👎
tasks/testnet.js
Outdated
@@ -5,7 +5,7 @@ async function main() { | |||
const network = process.argv[2] || config.default_network | |||
|
|||
// run Voyager in a development environment | |||
runDev(`./app/networks/${network}/`) | |||
runDev(`./builds/testnets/${network}/`) |
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 hiding the problem?
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.
🙃
padding 12px 1em | ||
background-color var(--app-nav) | ||
|
||
& > .li-delegate__value:not(:first-of-type) span |
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.
highly impressive css 👏 🥇
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.
be wary of :first-of-type
it only refers to native elements, not classes!!!
.li-delegate__value.percent_of_vote | ||
span {{ delegate.percent_of_vote }} | ||
.li-delegate__value.uptime | ||
span.NOT_green {{ uptime }} |
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 is this NOT
about?
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.
because we don't have any logic to apply when things are green, orange or red. the classes to enable them are .green
.yellow
and .red
so these are just references to the fact those classes exist but aren't being used yet. (would hate to think of someone in the future re-buiding them when that functionality is finally available!)
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 didn't quite get that. Would you please explain it again in German?
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 guess those are placeholders. I replace them with comments.
tm-data-empty(v-else-if="delegates.delegates.length === 0") | ||
data-empty-search(v-else-if="sortedFilteredEnrichedDelegates.length === 0") | ||
tm-data-loading(v-if="delegates.loading && sortedFilteredEnrichedDelegates.length === 0") | ||
tm-data-empty(v-else-if="!delegates.loading && delegates.delegates.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.
should delegates.delegates.length
be sortedFilteredEnrichedDelegates.length
?
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 switched the logic because loading was getting triggered over and over again when there were accurate validators in the store already. The logic should be that you see the current validator set if there is one, and it gets updated when new info is added, but should only show the loading screen if there are no current validators while you're loading new ones.
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.
smells like a refactor (one day).
delegates.delegates.delegates.delegates.delegates.goose
🦆 🦆 🦆 🦆 🦆
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.
didn't we have the discussion before? ;)
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 addressed the comments.
Closes #1054
with
.red
,.green
and.orange
classes added to some of the values it looks like this. I added back the checkbox since as of now there's no other way to get to those pages. The tab is disabled for "My Stake" because that task is now part of #1281, #1278, #1280.