-
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
Merged
chinesedfan
merged 12 commits into
gitpoint:master
from
chinesedfan:paginate-issue-comments
Nov 18, 2018
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
ef26fb0
refactor(issue): fetch issue and its repository by new api
chinesedfan 865e890
fix(issue): render issue correctly
chinesedfan 42b43a9
chore(issue): filter events that have no id
chinesedfan c72e3a1
fix: no assigner in timeline’s self-assign event
chinesedfan fb1206b
fix: remove anchor of issueURL and fix crash caused by repository
chinesedfan f65052c
fix: fix permissions is not defined
chinesedfan 3adbe0f
chore: give up union entity
chinesedfan 2335a64
chore: better loading
chinesedfan 105e7a9
refactor(new-issue): read repository from navigation.state.params
chinesedfan 0692caa
refactor: edit-issue-comment doesn’t depend on old store any more
chinesedfan 4ff796a
refactor: issue-settings doesn’t depend on old store any more
chinesedfan d9f40ac
refactor: pull-merge doesn’t depend on old store any more
chinesedfan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -109,6 +109,7 @@ query ($owner: String!, $name: String!) { | |
...PullRequestsList | ||
} | ||
} | ||
viewerPermission | ||
} | ||
} | ||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { schema } from 'normalizr'; | ||
|
||
export const issueSchema = new schema.Entity( | ||
'issues', | ||
{}, | ||
{ | ||
idAttribute: issue => issue.url, | ||
} | ||
); | ||
|
||
// TODO: some events have no id field, i.e. cross-referenced | ||
export const issueTimelineItemSchema = new schema.Entity('issueTimelineItems'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
src/components/loading-indicators/loading-common-item.component.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import React from 'react'; | ||
import { ActivityIndicator } from 'react-native'; | ||
import styled from 'styled-components'; | ||
|
||
import { colors } from 'config'; | ||
|
||
const Container = styled.View` | ||
height: 44; | ||
background-color: ${colors.white}; | ||
align-items: center; | ||
justify-content: center; | ||
`; | ||
|
||
export const LoadingCommonItem = () => ( | ||
<Container> | ||
<ActivityIndicator animating size="small" /> | ||
</Container> | ||
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.