Skip to content

feat: Support pagination in issue-list screen and pull-list screen #856

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
merged 7 commits into from
Dec 11, 2018

Conversation

chinesedfan
Copy link
Member

Question Response
Version? v1.6.0
Devices tested? iPhone 6 Simulator
Bug fix? no
New feature? yes
Includes tests? no
All Tests pass? yes
Related ticket? #751

Screenshots

issue-list

Description

Sadly, the ability to show different colors between closed and merged pull requests, see #852, is broken. Because the search API always returns state closed. I will open an issue to record it and hope someone can implement later.

@coveralls
Copy link

Coverage Status

Coverage decreased (-1.4%) to 48.895% when pulling 224e864 on chinesedfan:paginate-repo-related into 2d17c52 on gitpoint:master.

Copy link
Member

@housseindjirdeh housseindjirdeh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So much stale code cleared up, thank you 😄

Feel free to merge whenever, this all looks good!

@@ -23,68 +20,6 @@ describe('Issuer Reducer', () => {
expect(issueReducer()).toEqual(initialState);
});

describe('GET_ISSUE_COMMENTS', () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for cleaning this up 🚀

@@ -12,6 +12,7 @@ export const ACTIVITY_WATCH_REPO = createActionSet('ACTIVITY_WATCH_REPO');
export const ACTIVITY_UNWATCH_REPO = createActionSet('ACTIVITY_UNWATCH_REPO');
export const SEARCH_REPOS = createPaginationActionSet('SEARCH_REPOS');
export const SEARCH_USERS = createPaginationActionSet('SEARCH_USERS');
export const SEARCH_ISSUES = createPaginationActionSet('SEARCH_ISSUES');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@@ -48,8 +48,7 @@ export const repoSchema = new schema.Entity(
'repos',
{},
{
idAttribute: repo =>
(repo.full_name ? repo.full_name : repo.name).toLowerCase(),
idAttribute: repo => (repo.full_name ? repo.full_name : repo.name),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm assuming there's no harm to just keeping the repo name as is (without lowercase) as the idAttribute right? (definitely better this way but just want to double check)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I remember some edge cases where the case was a problem, but definitely can't tell what it was now.
Let's drop the lowercase and see what happens :)

Copy link
Member Author

@chinesedfan chinesedfan Dec 10, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@housseindjirdeh @machour Thanks for your concerns. @machour was inspired from redux examples. It reads user input as keyword to fetch Github data. And when finding entities, it also converts the key to lower cases, see link. Because Github APIs accept case-insensitive arguments and return case-sensitive data, as I commented in #826 (comment).

I think our use cases are a bit different. We always use case-sensitive ids. So we should stop converting entity ids to lower cases.

mapping keys entities ids result
redux examples always lower cases always lower cases no problem
our old codes not sure always lower cases can't find entity
our new codes always case-sensitive always case-sensitive no problem

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That clears things up nicely, thank you makes perfect sense :)

Copy link
Member

@machour machour left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Finally, thank you so much!

My stale branch implementing graphql got the best of me, thank you for taking care of this 🙏

Copy link
Member

@andrewda andrewda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@chinesedfan chinesedfan merged commit 5d503c1 into gitpoint:master Dec 11, 2018
@chinesedfan chinesedfan deleted the paginate-repo-related branch July 12, 2019 02:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants