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 ToolTip on Network Traffic graph #492

Closed
wants to merge 4 commits into from

Conversation

rebroad
Copy link
Contributor

@rebroad rebroad commented Dec 1, 2021

Enables a tooltip on the graph to make it easier to see what point in time a part of the graph corresponds to.

image

This PR includes the change in #484, but also deals with the potential issues that the simplicity of 484 introduced.

TODO:

  • make it easier to select a point on the graph by factoring in the vertical position of the mouse pointer also.
  • maybe - add ridges on the X-axis to show where an interval change or time jump occurs.
  • make the Units translateable.

@shaavan
Copy link
Contributor

shaavan commented Dec 2, 2021

Concept ACK

I think this PR is an improvement from a UX perspective. I shall be testing this PR when the TODO is completed.

@rebroad rebroad force-pushed the NetworkGraphTooltip branch 2 times, most recently from b617de1 to ec67f11 Compare December 2, 2021 14:42
@rebroad
Copy link
Contributor Author

rebroad commented Dec 2, 2021

Concept ACK

I think this PR is an improvement from a UX perspective. I shall be testing this PR when the TODO is completed.

@shaavan TODOs now updated

@rebroad
Copy link
Contributor Author

rebroad commented Dec 6, 2021

Had to keep changing the strUnit function as the printf test kept failing (it makes false assumptions).

@rebroad rebroad marked this pull request as ready for review December 7, 2021 09:39
src/util/strencodings.cpp Outdated Show resolved Hide resolved
@rebroad rebroad force-pushed the NetworkGraphTooltip branch 2 times, most recently from 03e8413 to 30fca02 Compare December 9, 2021 21:51
@katesalazar
Copy link
Contributor

katesalazar commented Dec 10, 2021 via email

@rebroad
Copy link
Contributor Author

rebroad commented Dec 10, 2021

I'd fancy reviewing this, but my time is very limited. As you keep finishing PRs, I could use some meta issue (or something) helping me realize the dependency tree between PRs without me having to spend time figuring it out. Cheers,

Hi. The latest push to this PR ought to be the last one - I had been trying to get the ToolTips to behave better, which they now do. They no longer time-out (disappear) and they also can now moved along with the graph regardless of the duration/speed selected. Also, the yellow circle will disappear more reliably now if the ToolTip also disappears (due to the mouse pointing elsewhere). It took a while to refine this functionality, which in the latest commit required an additional timer (tt_timer) to check the ToolTip status at an interval independent of the graph being updated, or the mouse moving.

@rebroad rebroad force-pushed the NetworkGraphTooltip branch 2 times, most recently from 6679d1f to 968fb4b Compare December 12, 2021 18:51
@DrahtBot
Copy link
Contributor

DrahtBot commented Dec 30, 2021

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #539 (gui: scale network graph based on time interval by RandyMcMillan)
  • #524 (Replace int with std::chrono in for the timer->setInterval() argument by shaavan)
  • #473 (Enable a non-linear network traffic option (click to toggle between linear and non-linear) by rebroad)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@katesalazar
Copy link
Contributor

Why isn't "Add formatBytesps function" (cdc5f0b) squashed in
"Show ToolTip on Network Traffic graph" (e5897a7)?

@katesalazar
Copy link
Contributor

Built and tested this, seems cool.

Comment on lines +179 to +183
painter.setPen(Qt::yellow);
int w = width() - XMARGIN * 2;
int x = XMARGIN + w - w * ttpoint / DESIRED_SAMPLES;
int y = y_value(floatmax(vSamplesIn.at(ttpoint), vSamplesOut.at(ttpoint)));
painter.drawEllipse(QPointF(x, y), 3, 3);
Copy link
Contributor

Choose a reason for hiding this comment

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

What about fencing these in a function? Maybe a macro?
Maybe add a couple of comments?

@@ -262,8 +262,7 @@ void TrafficGraphWidget::setGraphRangeMins(int mins)
int msecsPerSample = nMins * 60 * 1000 / DESIRED_SAMPLES;
timer->stop();
timer->setInterval(msecsPerSample);

clear();
timer->start();
Copy link
Contributor

Choose a reason for hiding this comment

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

Why did you separate this change in a rev of its own?

@DrahtBot
Copy link
Contributor

DrahtBot commented Feb 4, 2022

🐙 This pull request conflicts with the target branch and needs rebase.

Want to unsubscribe from rebase notifications on this pull request? Just convert this pull request to a "draft".

@hebasto
Copy link
Member

hebasto commented May 26, 2022

Closing due to a long period of inactivity here. Feel free to reopen.

@hebasto hebasto closed this May 26, 2022
@katesalazar
Copy link
Contributor

katesalazar commented Sep 18, 2022 via email

@bitcoin-core bitcoin-core locked and limited conversation to collaborators Sep 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants