-
Notifications
You must be signed in to change notification settings - Fork 783
feat(issue): paginate issue comments and events #848
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
feat(issue): paginate issue comments and events #848
Conversation
This is so so great, thank you so much. Something we've needed in the app for some time for these screens :) Will take a look by tonight 🙌 |
@chinesedfan thank you for the excellent work, but I do not yet have the opportunity to check it. |
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.
Aside from some tiny nits/comments --> this looks great 😍
THANK YOU FOR THIS, probably one of the things I was looking forward to the most once @machour started restructuring our data flow 👍
@@ -73,6 +73,7 @@ export class Client { | |||
HTML: 'application/vnd.github.v3.html+json', | |||
JSON: 'application/vnd.github.v3+json', | |||
MERCY_PREVIEW: 'application/vnd.github.mercy-preview+json', | |||
MOCKINGBIRD_PREVIEW: 'application/vnd.github.mockingbird-preview+json', |
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 may want to somehow keep track of when these preview APIs end up changing
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.
Looks like this one opened in 2016, wow lol
https://developer.github.com/changes/2016-05-23-timeline-preview-api/
But still something to keep in mind 🤔
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 other preview API, MERCY_PREVIEW, which was for fetching topics of repository, was replaced by GraphQL. If no so-called preview versions in GraphQL, we can also switch the timeline API.
@@ -314,14 +341,20 @@ class Issue extends Component { | |||
); | |||
}; | |||
|
|||
renderFooter = () => { | |||
return this.props.timelineItemsPagination.nextPageUrl ? ( | |||
<LoadingCommonItem /> |
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 for showing the loading indicator at the bottom when user is pulling the screen up to scroll more right? Maybe we should rename this to LoadingFooterIcon
or something similar?
Tiny nit though
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.
Naming is one of the most difficult things in computer science. 🙈
I saw other loading components were called loading-xx-item
, and thought this one was more in common use. BOOM, loading-common-item
.
Screenshots
There are several screens that have been refactored.
Description
This PR loads paginated issue comments and events together by the new API client. Feeling hard to keep sorting by time with two pagination APIs, so I choose the issue timeline API, even though it is still in preview version.
To make this PR as small as possible, feature improvements can include but do not limit to,