-
Notifications
You must be signed in to change notification settings - Fork 45
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
Implemented pagination on app details page #119
Conversation
Signed-off-by: LilyLME <[email protected]>
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 looks like a good start. Just some initial thoughts.
Signed-off-by: LilyLME <[email protected]>
Signed-off-by: LilyLME <[email protected]>
Signed-off-by: LilyLME <[email protected]>
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.
Thanks for your persistence on this! It turns out this is a rather complex issue to solve. I've put in some more feedback, hopefully it is helpful.
Signed-off-by: LilyLME <[email protected]>
Signed-off-by: LilyLME <[email protected]>
Signed-off-by: LilyLME <[email protected]>
Signed-off-by: LilyLME <[email protected]>
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.
Thanks for your persistence on this, and sorry for the slowness of my response. I think this is actually pretty close, after taking a second look at this, I think you may have been right about some aspects (e.g. the need to keep more state in the module calling the pagination component). To keep things more managable, I think we can keep track of the various variables inside a paginationState
variable. Could you give that a try?
Signed-off-by: LilyLME <[email protected]>
Hello @wlach, I have updated this as per requirements discussed. The calling module maintains it's level of state but now very neatly embedded in a single state object. I would have loved if the components itself could let objects with properties be exported, but looks like it's a difficult problem trying to figure out how attributes within objects change : |
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.
After testing this out a bit, I'm noticing a few problems:
- There's an unpaginated list of metrics on top of the paginated one (might just be a merging artifact), this should be easy to fix.
- The pagination behaviour doesn't play nicely with the filtering. Basically we want to paginate through any list of items that the user has filtered (you can test with a string like "search" with the Fenix browser: http://localhost:5000/#!/apps/fenix)
Thanks again for your hard work on this.
Signed-off-by: LilyLME <[email protected]>
@wlach all last change requests made. The pagination now plays nicely with the |
Signed-off-by: LilyLME <[email protected]>
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 is getting closer for sure, but I found a bug:
- Navigate to: http://localhost:5000/#!/apps/firefox-android-release
- Skip to "page 6" on metrics
- Type "search" into the filter box
- Try to skip back to "page 1"
Neither the search or the skip will work and I see this in the console:
Signed-off-by: LilyLME <[email protected]>
Signed-off-by: LilyLME <[email protected]>
Hello @wlach sorry for taking a while with this, can you review again and check for the last the bug so we move on? |
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.
Thanks, this works great now!
Some quick followup tasks for this:
@LilyLME feel free to work on these (but obviously feel no obligation). I'll make a note to file some issues on these in the future (today is technically a holiday for me) |
@wlach that's fine, Since the simpler and faster thing to do would be adding the pagination to ping page, I would rather start with that before looking a lodash' chunk.
|
For sure. For what it's worth, I think the lodash chunk task should be quite easy. Mostly just a matter of running
Ah yes! We definitely want that too. |
As required in #88 pagination has been added to reduce scroll on very long pages.
Tasks