-
Notifications
You must be signed in to change notification settings - Fork 712
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
Zoom level indicator #2420
Zoom level indicator #2420
Conversation
a278e9b
to
d9c2680
Compare
d9c2680
to
716f8ac
Compare
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.
The numbers not adding up is a blocker, because it diminishes trust. If it helps, maybe show zoom % instead of metrics for the sake of getting this out fast.
|
||
// Does the same that the deprecated d3.round was doing. | ||
// Possibly imprecise: https://github.com/d3/d3/issues/210 | ||
export function round(number, precision = 0) { |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
716f8ac
to
96ea505
Compare
edca137
to
d2c1701
Compare
…ull information consistency.
@davkal PTAL. I draw only a simple small scale in the bottom-right corner now, according to your feedback and our discussion that followed (I also tried it closer to the resource boxes, but didn't look that good to me).
I adjusted the displayed metrics info (last commit) so hopefully the trust will not be diminished now :) |
LGTM. This can be merged as is. I still find the two axis confusing (eg., expressing used memory both in x and y dimensions). Also, when zooming into the center part, the boxes to the left still disappear and you have no way of knowing that they are there. I am aware that other flame graphs suffer the same problems, but maybe indicators could help: either a thumbnail overview with a rectangle representing the visible part, or thin-lined boxes to the left that afford a panning action to get them into view. |
Thanks for reviewing @davkal. I agree with both of your points, let me try to summarize my thoughts on them:
This currently only affects the Hosts layer, but in the future it might affect any layer with the notion of resource capacity, so it'd be good to decide on the final looks sooner rather than later. Here are some ideas that I had:
Note: Show the bar for hosts horizontally instead of vertically maybe sounds like a good idea but it actually looked quite messy when I tried it. I don't really have any other ideas that wouldn't require major changes to the layout. However, I got this comment more than once so I quickly prototyped another layout idea in another experimental branch. Looks more or less like this: So basically all the layers are collapsed into one and the nodes are embedded into their parents instead of being shown on top of them. The trigger for me was thinking how point 3. above leaves hosts empty, so I thought of filling them with some information.
In conclusion, I'm not sure whether it makes sense to actually merge this PR, especially if we are going to do some changes to the current layout, so I'd freeze it a bit before I get more feedback on what I wrote above I think. |
Dropped in favor of a more generic zoom control/indicator #2513. |
Addresses the first suggestion from #2392 - in the resource view, a small horizontal resource scale is displayed from which we can see how deeply we've zoomed. The problem of having zoomed to deeply into a wide box and not seeing any changes when scrolling was brought to me a couple of times.
Notes
The resource boxes of zero width are hidden from the resource view now, which fixes the zoom limit being overflown in the CPU view.Consistent resource consumption info in the resource view #2499round
helper from Update D3 to version 4.4.0 #2028 that was removed in the meantime.Additional changesMade the displayed metric info reflect the adjustment in resource boxes width. Now the data we display is fully consistent with the layout, although the information is not really always that accurate. Makes Resource view - reconcile inconsistencies between metrics of different topologies #2389 less obvious, but doesn't really fix it.Consistent resource consumption info in the resource view #2499The way we calculate viewport dimensions has been adjusted for consistency between running Scope UI independently as a part of Weave Cloud (previously the margins were a bit off because of the difference in the nav bar height between the two).Viewport height not calculated correctly inside Weave Cloud #2472