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

Show proposal vote block heights #2701

Merged

Conversation

vibros68
Copy link
Contributor

@vibros68 vibros68 commented Dec 29, 2021

Closes #2699

This diff add the block start and end heights on the gui for proposal
votes.

Screenshot from 2022-01-13 15-14-40
Screenshot from 2022-01-13 15-14-53

@vibros68
Copy link
Contributor Author

Ready for review @lukebp

Copy link
Member

@tiagoalvesdulce tiagoalvesdulce left a comment

Choose a reason for hiding this comment

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

Looks good but it won't show on mobile since we aren't showing blocks left too.

@vibros68
Copy link
Contributor Author

@tiagoalvesdulce How do you think? Should we display blocks left on mobile?

<>
<Tooltip
placement="bottom"
content={`Block heights: ${startblockheight} - ${endblockheight}`}
Copy link
Member

Choose a reason for hiding this comment

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

Let's update this to just:

Suggested change
content={`Block heights: ${startblockheight} - ${endblockheight}`}
content={`Block ${startblockheight} to ${endblockheight}`}

styles.blocksLeft
)}
size="small">
{`duration: ${votingBlocks} block${
Copy link
Member

Choose a reason for hiding this comment

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

Let's replace this with the text Block ${startblockheight} to ${endblockheight} and remove the tooltip here since it's redundant.

@lukebp
Copy link
Member

lukebp commented Jan 10, 2022

Should we display blocks left on mobile?

No, I think it's fine as it. It's ok if mobile doesn't have the tooltip info.

@tiagoalvesdulce
Copy link
Member

Yeah, I think it's fine as well.

@vibros68 vibros68 requested a review from lukebp January 12, 2022 10:08
Copy link
Member

@lukebp lukebp left a comment

Choose a reason for hiding this comment

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

Two more UX tweeks.

  1. Let's not capitalize Block in Block xxxx to xxxx. block xxxx to xxxx is more consistent with the other text.

  2. After seeing this, I think it's too cluttered.

image

For proposals that have finished voting, can we display the block xxxx to xxxx as a second line in the exiting tooltip that shows the date. i.e. the tooltip would display:

Mon, 10 Jan 2022 18:38:09 GMT
block xxxx to xxxx

Lets see how that looks. I think it will be cleaner.

Comment on lines 421 to 430
{/*{isVotingFinished && (
<Text
className={classNames(
"hide-on-mobile",
styles.blocksLeft
)}
size="small">
{`Block ${startblockheight} to ${endblockheight}`}
{`block ${startblockheight} to ${endblockheight}`}
</Text>
)}
)}*/}
Copy link
Member

Choose a reason for hiding this comment

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

comment

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry. My bad

@vibros68 vibros68 requested a review from lukebp January 14, 2022 13:21
Copy link
Member

@lukebp lukebp left a comment

Choose a reason for hiding this comment

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

I do like it better this way. What do you think @tiagoalvesdulce?

image
image

@tiagoalvesdulce
Copy link
Member

I agree.

Copy link
Member

@tiagoalvesdulce tiagoalvesdulce left a comment

Choose a reason for hiding this comment

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

Code looks good and works as expected.

@tiagoalvesdulce tiagoalvesdulce merged commit 3321085 into decred:master Jan 17, 2022
@tiagoalvesdulce tiagoalvesdulce added the pi-not-deployed This item has been merged into master, but has not been deployed to production yet. label Jan 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pi-not-deployed This item has been merged into master, but has not been deployed to production yet.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Show proposal vote block heights.
3 participants