Conversation
…ry row no matter how many there are
| keyGetter: PropTypes.func.isRequired, | ||
| children: PropTypes.arrayOf(PropTypes.node).isRequired, | ||
| paginated: PropTypes.bool, | ||
| isTruelyInfinite: PropTypes.bool, // Will render all rows even if there are 1,000,000 |
There was a problem hiding this comment.
can we think of a better name for this prop type? we shouldn't be depending on comments to explain what a prop does. furthermore, why cant paginated set to false support our use case here?
There was a problem hiding this comment.
I'll respond to the second point first. The problem is there are now three pagination options, so a boolean can't encompass them all:
- Paginated (this can be split into api paginated and local paginated, but that's not relevant here)
- Not paginated, but uses infinite scrolling (which is what the requests and tasks tables do)
- Not paginated, renders all rows no matter what (which is introduced in this PR and is what the
My Starred Requeststable will do)
The third pagination type is implemented because we want to render all starred requests for ctrl-f access instantly upon loading the page. This won't happen if the user has more than a certain number of starred requests if we're using infinite scrolling.
So to be more descriptive with the name, maybe renderAllRowsImmediately or something like that would be a better name.
There was a problem hiding this comment.
Thanks for the clarification -- let's go with renderAllRows
| keyGetter: PropTypes.func.isRequired, | ||
| children: PropTypes.arrayOf(PropTypes.node).isRequired, | ||
| paginated: PropTypes.bool, | ||
| renderAllRows: PropTypes.bool, // Will render all rows even if there are 1,000,000 |
|
LGTM after last piece of feedback |
Renders every row on the
My Paused RequestsandMy Starred Requeststables on the dashboard page.Note that this will render every row even if there are thousands - but there won't be thousands unless a user stars every request in the system for some reason.
cc @tpetr @wolfd @kwm4385