Skip to content

[GUI]: add a small indicator for the last block time on lower veil status bar#865

Merged
CaveSpectre11 merged 1 commit intoVeil-Project:masterfrom
WetOne:QtLastBlockTime
Nov 23, 2020
Merged

[GUI]: add a small indicator for the last block time on lower veil status bar#865
CaveSpectre11 merged 1 commit intoVeil-Project:masterfrom
WetOne:QtLastBlockTime

Conversation

@WetOne
Copy link
Collaborator

@WetOne WetOne commented Nov 7, 2020

Problem

A small improvement to the usability: the user often needs to see what the block time is on the current node, and it is very annoying having to open the debug console to extract this information.

Root Cause

The value is not visible.

Solution

Two labels have been added to the bottom status bar and connected the signal to update the block time.

Bounty Payment Address

sv1qqphsvuwhk29xcn2q9gdth9x73qpm8kcktmuxyd8szl50sgt2nt47egpqwnxr83hfj7s6fnec2jr0cv5yc7r6s7nvxhd9969qrgy4cgnznwewqqqauut5m

Veil_Last_Block_In_Status_Bar2020-11-06 17-55-08

@CaveSpectre11 CaveSpectre11 added Component: GUI Primarily related to the display of the user interface Tag: Chainstate Related to blockindexes and the state of the chain. Bounty: Assigned This issue is being worked on by someone that will earn a bounty reward. labels Nov 7, 2020
@CaveSpectre11
Copy link
Collaborator

@WetOne when submitting PRs, you're welcome to add a

### Bounty Payment Address ##
`sv1`

To include your address for payment in the original PR. Payment is made after code review, QA, and merging into the branch.

@CaveSpectre11 CaveSpectre11 added the Tag: Waiting For Code Review Waiting for code review from a core developer label Nov 7, 2020
@CaveSpectre11 CaveSpectre11 changed the title Qt last block time [GUI]: add a small indicator for the last block time on lower veil status bar Nov 7, 2020
@CaveSpectre11
Copy link
Collaborator

@WetOne how big of a deal would it be to flip the location; so "Height: " remains in the same place as it currently is, and the new stuff is in the space to the left.

image

Also, is the line something graphically intentional?

image

@WetOne
Copy link
Collaborator Author

WetOne commented Nov 7, 2020

@CaveSpectre11 Moving the height should be easy - working it now.

I don't quite understand the line. I did nothing that should have affected it. possibly my display?

@CaveSpectre11
Copy link
Collaborator

I don't quite understand the line. I did nothing that should have affected it. possibly my display?

Definitely an artifact in the code; I see it on my screen too.

@WetOne
Copy link
Collaborator Author

WetOne commented Nov 7, 2020

OK, I think I see what is going on. Should have it ready tomorrow.

@WetOne
Copy link
Collaborator Author

WetOne commented Nov 8, 2020

Looks like I got both. How do I update into git?

Veil_Last_Block_In_Status_Bar_2020-11-07 19-37-39

@CaveSpectre11
Copy link
Collaborator

Looks like I got both. How do I update into git?

Have the changes in your QtLastBlockTime branch; then commit the changes into that branch [so the branch will have 3 commits]. You would then "git rebase HEAD~2", which will bring up an editor with the two commits in it. Go to the second and change pick to fixup, and exit the editor. That will rebase the two changes into one.

When you push it, push it with git push --force which will know to replace the previous two commits [reflected in this PR] with the "new" two commits [the combined one and the original sinetek one]. It will automatically reflect in this PR [because the underlying branch in your fork repo changed].

@WetOne
Copy link
Collaborator Author

WetOne commented Nov 8, 2020

"git rebase HEAD~2" resulted in "Current branch QtLastBlockTime is up to date."

Did the forced push.

@CaveSpectre11
Copy link
Collaborator

"git rebase HEAD~2" resulted in "Current branch QtLastBlockTime is up to date."

Did the forced push.

My bad; should have been git rebase -i HEAD~2

@WetOne
Copy link
Collaborator Author

WetOne commented Nov 8, 2020

Bounty Payment Address

sv1qqphsvuwhk29xcn2q9gdth9x73qpm8kcktmuxyd8szl50sgt2nt47egpqwnxr83hfj7s6fnec2jr0cv5yc7r6s7nvxhd9969qrgy4cgnznwewqqqauut5m

CaveSpectre11
CaveSpectre11 previously approved these changes Nov 8, 2020
Copy link
Collaborator

@CaveSpectre11 CaveSpectre11 left a comment

Choose a reason for hiding this comment

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

ACK 2beb3bb

@codeofalltrades
Copy link
Collaborator

image
The staking slider is cut off on windows and linux. I didn't check macOS.
Also there is a new dash to the left of the staking slider.

image

@codeofalltrades codeofalltrades added Tag: Waiting For Developer and removed Tag: Waiting For Code Review Waiting for code review from a core developer labels Nov 9, 2020
@seanPhill
Copy link
Collaborator

seanPhill commented Nov 9, 2020

nAck

I'm getting a problem with the display of that data as you will see in the screenshots.
At first I couldn't make out what it was saying, but I realised later it was displaying "N/A" until it got data from peers.
Giving it more time in case the display text box would become completely visible, it didn't. It needs to be as clearly visible as it is when you click the middle of that bar (on "Synchronising with network ...") and display the Last Block Time that way.
pr865-01
pr865-02
pr865-03
pr865-04
pr865-05

@seanPhill
Copy link
Collaborator

seanPhill commented Nov 9, 2020

You can see also that it appears not to be using the same data source as the pop up syncing information, as that already has a displayable last block time while the one below only has "N/A".

Also, the popup window that works comes up by default and can be brought back up again by simply clicking on "Synchronising with network ...", so maybe this whole thing can be solved by just adding the text "--> last block time" or something to that effect) after the ellipse.

@seanPhill
Copy link
Collaborator

The above test is on MacOS Catalina 10.15.6 using the binaries downloaded from Github Actions.

@CaveSpectre11
Copy link
Collaborator

CaveSpectre11 commented Nov 9, 2020

You can see also that it appears not to be using the same data source as the pop up syncing information, as that already has a displayable last block time while the one below only has "N/A".

Note that when it's showing "N/A", the pop up is downloading headers still, not blocks. My guess is that it's only being populated by new blocks brought in, and no new blocks have come in yet since it's still doing headers? Definitely something for WetOne to confirm [note that part of the code was from Sinetek's PR; WetOne was asked to move it to where it's supposed to be.

Also, the popup window that works comes up by default and can be brought back up again by simply clicking on "Synchronising with network ...", so maybe this whole thing can be solved by just adding the text "--> last block time" or something to that effect) after the ellipse.

Not sure we want to have it in different places when synchronizing vs. regular functional running of the code. Remember this is supposed to be there all the time [so you don't have to dig it out from the "Debug Window->Advanced Options->Information.

But graphically I concur:

  • Still has a strange line to the left of the Staking switch [the one that was to the right was cleared up]
  • The top of the staking slider is clipped [Linux, MacOS]. The bottom of the date is clipped [MacOS].
  • styling [font, etc] is in line with the styling of the left column, and appears to be unchanged after being moved to the bottom veil status bar. Styling should probably match the Height.
    "Last block time: Height: "

@WetOne is there a new box around the whole status bar that's causing the clipping?

@CaveSpectre11 CaveSpectre11 dismissed their stale review November 9, 2020 23:42

closer look

@CaveSpectre11 CaveSpectre11 self-requested a review November 9, 2020 23:43
@WetOne
Copy link
Collaborator Author

WetOne commented Nov 14, 2020

Looks like I fixed the clipping. When I updated the bar there was a new layout which resulted the clipping. This is what the update should look like.
Veil_Last_Block_In_Status_Bar_2020-11-13 14-49-54

@WetOne
Copy link
Collaborator Author

WetOne commented Nov 14, 2020

Now, regarding the update to the Last Block Time in the status bar vs in the Modal Display:
CaveSpectre, you are correct that the N/A is only there until new blocks come in.

I see we have 2 options

  1. The current implementation on the branch updates the status bar when signal numBlocksChanged is emitted (this is done from clientModel::BlockTipChanged).
  2. If we want them to be the same we could change the implementation to be a function call rather than a SIGNAL-SLOT connection and call it from BitcoinGUI::setNumBlocks.

I prototyped the second. There still seems to be a small difference between the popup and the status bar using this method and the N/A is still there until new blocks come in (really until setNumBlocks is called). The small difference is probably due to some logic at the beginning of setNumBlocks.

The second option probably makes more sense as most of the updates to the status bar and modal overlay are both are done from BitcoinGUI::setNumBlocks. Understand that I would probably remove most of Sinetek’s code as the SIGNAL-SLOT connection would not make sense with the second implementation.

@CaveSpectre11, @codeofalltrades, @seanPhill : your call as to which way you want this.

@CaveSpectre11
Copy link
Collaborator

I would think the second implementation [as it makes more sense] would be desirable. I'll have to defer to @seanPhill though, as he had the original expectation of them mirroring one another.

@seanPhill
Copy link
Collaborator

I'm fine with whatever works, functionally and aesthetically.

@CaveSpectre11 CaveSpectre11 added Tag: Waiting For Code Review Waiting for code review from a core developer Code Review: Passed and removed Tag: Waiting For Developer Tag: Waiting For Code Review Waiting for code review from a core developer Code Review: Passed labels Nov 22, 2020
Copy link
Collaborator

@CaveSpectre11 CaveSpectre11 left a comment

Choose a reason for hiding this comment

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

ACK cc13532

Copy link
Collaborator

@codeofalltrades codeofalltrades left a comment

Choose a reason for hiding this comment

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

ACK cc13532

@seanPhill
Copy link
Collaborator

seanPhill commented Nov 23, 2020

ACK
I have tested this one now (on MacOS Catalina), and the block date and time indicator looks fine now.
Screen Shot 2020-11-23 at 9 25 45 pm

@CaveSpectre11 CaveSpectre11 added Code Review: Passed QA: Passed This has passed QA testing and can be merged to master and removed Tag: Waiting For Code Review Waiting for code review from a core developer labels Nov 23, 2020
@CaveSpectre11 CaveSpectre11 merged commit 62a2c49 into Veil-Project:master Nov 23, 2020
@CaveSpectre11
Copy link
Collaborator

10 hours @ 310 = 3100 Veil
fixed form use bonus = 100 Veil
3200 Veil paid

Thank you for your contribution to Veil!

@CaveSpectre11 CaveSpectre11 added Bounty: Paid This PR has been paid a bounty and removed Bounty: Assigned This issue is being worked on by someone that will earn a bounty reward. labels Nov 23, 2020
@CaveSpectre11 CaveSpectre11 added this to the v1.1.1 milestone Dec 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bounty: Paid This PR has been paid a bounty Code Review: Passed Component: GUI Primarily related to the display of the user interface QA: Passed This has passed QA testing and can be merged to master Tag: Chainstate Related to blockindexes and the state of the chain.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants