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
Add info relative to clicked node values to nodeInfoDisplayer #3
Add info relative to clicked node values to nodeInfoDisplayer #3
Conversation
Hi @David-Desmaisons, do you accept PRs? I have a couple more ideas but I will not even bother creating the PRs if I know they don't stand a chance. |
Hello @isaacbernat , I accept PRs!
For further changes, the best way should to create first an issue so we can discuss the pertinence of the changes for this repo and once we agreed on the feature, you could go ahead and create a PR. |
Hi @David-Desmaisons , sorry if I sounded too harsh/impatient. I just saw you updated several commits to this repo and that you did not reply to the PR, so I thought you were actively ignoring it. I also want to take the chance to praise the excellent work done on this component. |
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.
Any feebacks on my comments?
<span>{{percentage}}</span><br/> {{description}} | ||
<span>{{percentage}}</span> | ||
<br/> {{description}} | ||
<br/> ({{current.value}} / {{base}}) |
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 would remove this:
<br/> ({{current.value}} / {{base}})
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 think having the absolute values (not only %) can be useful. I admit it may also feel a bit too much information. Maybe a solution would be a parameter to decide wether to show absolute values or not?
Another way of displaying the information would be some kind of tooltip on the mouse pointer when hovering over a section.
percentage() { | ||
if (this.current == null || this.root == null) { | ||
return null; | ||
} | ||
|
||
const percentage = (100 * this.current.value) / this.root.value; | ||
const percentage = (100 * this.current.value) / this.base; |
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.
This new way of calculating porcentage is interesting. The only drwaback is that it could be more than 100% when zooming. I will take here the min beetween 100 and the actual value.
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.
👍A value bigger than 100% might look confusing.
Hi @David-Desmaisons, was that feedback sufficient? |
Merged and available in version 0.20.0 |
Summary: The goal of this PR is to add more relevant information to the end user with as little burden as possible.
App.vue
description
value is shortened.nodeInfoDisplayer
breadcrumbTrail
Here is a screenshot of how the changes would look in the example:
PS: I have never built anything using Vue.js and it's been a few years since I did anything serious at all in js. Feel free to make the changes you deem necessary.