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
Bug 1835232: Added skeleton loading state for data consumption and object data reduction card #3836
Bug 1835232: Added skeleton loading state for data consumption and object data reduction card #3836
Conversation
afreen23
commented
Dec 27, 2019
•
edited
edited
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 few minor comments overall it looks good.
/> | ||
} | ||
minDomain={{ y: 0 }} | ||
maxDomain={{ y: maxVal + 10 }} |
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.
Please use proper statistical quartile.
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.
What do you suggest here ?
Showing plus 10 of max value seems good enough.
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 3rd quartile.
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.
Why we should be using that ? Please explain
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.
how are we determining the maxVal
? The third quartile is suitable for a tick point but not for the maxDomain. Basically you want the graph to be larger than the value by some factor. For large values +10
would not make a difference. Maybe something like. maxVal + maxVal*.25
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.
maxVal
if you check is the highest of all datapoints and its a humanized value.- Exactly this is not for tickpoints, but to have some extra space on axis for enhancing the look of graph.Typically above max value.
- I like the suggestion here wrt
maxVal + maxVal*.25
just one minor thing is that it will provide some fraction values and that can mess up in certain situations. (reason: d3 scale uses max domain to plot ticks and counts of ticks , and a fractional max domain does not comes up well, what I have tested)
I think(maxVal + Math.round(maxVal*.25))
would improve and save.
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.
3 sounds like the way to go. Thanks for the info. Dint know about the issue.
...ackages/noobaa-storage-plugin/src/components/data-consumption-card/data-consumption-card.tsx
Outdated
Show resolved
Hide resolved
</> | ||
); | ||
} else { | ||
body = <GraphEmpty />; |
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.
put this as initial value of body
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.
We want to show loading states first and this is rendered in case of errors.
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 see no problem with it. If the initial value is graphyEmpty
. And if it is loading then that should get changed.
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 not prefer overriding :)
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.
Technically you are still overriding with the else statement. This would result in you not requiring else
statement.
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.
Think about it, I dont think so :)
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.
Maybe I am missing something. LGTM. :)
728869a
to
160fea4
Compare
@afreen23: This pull request references Bugzilla bug 1835232, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. 3 validation(s) were run on this bug
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/> | ||
<ChartGroup offset={sortByKpi === BY_EGRESS ? 0 : 11}> | ||
{chartData.map((data, i) => ( | ||
<ChartBar key={`chartbar-${i}`} data={data} /> // eslint-disable-line react/no-array-index-key |
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.
<ChartBar key={`chartbar-${i}`} data={data} /> // eslint-disable-line react/no-array-index-key | |
<ChartBar key={`chartbar-${i}`} data={data} /> |
No need to disable the rule
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.
Required, since its still using array index.
May be we can refactor it in 4.6 to send in the indexes in chartdata.
Lets keep the PR focused to what bug its trying to solve.
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.
Sure. But I have passed keys like the way you have passed it in several places and it dint give me that linter error. But if you're facing the issue then we need to disable it. No issues. :)
/lgtm cancel |
160fea4
to
d004c69
Compare
@@ -22,3 +22,7 @@ | |||
.nb-object-data-reduction-card__row-title { | |||
margin-right: 0.5em; | |||
} | |||
|
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.
Can we get rid of line 1? I don't think it's being used anywhere.
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.
Sure.
…uction card Signed-off-by: Afreen Rahman <afrahman@redhat.com>
d004c69
to
f94ac63
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: afreen23, bipuladh The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@afreen23: All pull requests linked via external trackers have merged: openshift/console#3836. Bugzilla bug 1835232 has been moved to the MODIFIED state. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |