-
Notifications
You must be signed in to change notification settings - Fork 99
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
Load "small" before "full" report #1697
Load "small" before "full" report #1697
Conversation
Codecov Report
@@ Coverage Diff @@
## gsa-8.0 #1697 +/- ##
===========================================
- Coverage 39.52% 39.52% -0.01%
===========================================
Files 965 965
Lines 22095 22120 +25
Branches 6237 6230 -7
===========================================
+ Hits 8734 8743 +9
- Misses 12098 12111 +13
- Partials 1263 1266 +3
Continue to review full report at Codecov.
|
They can be still loading and should not be required
e66282f
to
3a7fb5c
Compare
@@ -181,8 +183,8 @@ class ReportEntitiesContainer extends React.Component { | |||
|
|||
ReportEntitiesContainer.propTypes = { | |||
children: PropTypes.func, | |||
counts: PropTypes.counts.isRequired, | |||
entities: PropTypes.array.isRequired, | |||
counts: PropTypes.oneOfType([PropTypes.counts, PropTypes.object]).isRequired, |
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 should an object be passed as counts here?
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 need an object instead of counts, because if I pass a new CollectionCount() its construction sets all fields to 0 resulting in faulty information on the detailspage (it will tell me that the report is empty instead of showing Loading).
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 not passing undefined instead? undefined has a clear meaning.
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.
For example in ResultsTab I would have to check again, if it's undefined when calling counts.filtered or counts.all. in order not to have to add several tests like that i just pass an empty object.
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.
you could init the counts instead when passing undefined
{counts = {}} = props
Seems to be much cleaner to me :-)
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.
In ReportEntitiesContainer i would still have to accept CollectionCount and Object then.
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.
ok. i'll take a look after the pr is merged.
7a43411
to
2219310
Compare
Checklist: