The Wayback Machine - https://web.archive.org/web/20201218002830/https://github.com/gitpoint/git-point/pull/554
Skip to content
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: add list with open pull requests on user profile pages #554

Open
wants to merge 3 commits into
base: master
from

Conversation

@tudor07
Copy link

@tudor07 tudor07 commented Oct 22, 2017

Fixed #500

On user profile pages and on own profile page now there can be seen a list with open pull requests.

Copy link
Member

@chinesedfan chinesedfan left a comment

@radiKal07 Nice job and welcome to become a new contributor! But maybe we need to discuss the design first. Pending the PR list at the end of own profile seems not to be the best idea, especially we may need closed PR list and open/closed issue list in future.

#500 doesn't require a PR list for other user's profile, which keeps the same with Github. It expects something like contribution calendar.

At last, package-lock.json can be removed, because we use yarn.

/>
)}
</SectionList>

This comment has been minimized.

@chinesedfan

chinesedfan Oct 22, 2017
Member

Usually, we only care about our PRs, but do not for other users'.

@@ -157,6 +159,34 @@ export const getUserEvents = user => {
};
};

export const searchUserOpenPullRequests = () => {

This comment has been minimized.

@chinesedfan

chinesedfan Oct 22, 2017
Member

I suggest to rename as getOpenPullRequest, which is simpler and more similar with other functions.

@@ -7,3 +7,4 @@ export const GET_AUTH_ORGS = createActionSet('GET_AUTH_ORGS');
export const GET_EVENTS = createActionSet('GET_EVENTS');
export const CHANGE_LOCALE = createActionSet('CHANGE_LOCALE');
export const GET_AUTH_STAR_COUNT = createActionSet('GET_AUTH_STAR_COUNT');
export const SEARCH_USER_OPEN_PULL_REQUESTS = createActionSet('SEARCH_USER_OPEN_PULL_REQUESTS');

This comment has been minimized.

@chinesedfan

chinesedfan Oct 22, 2017
Member

Similar here. Let's make actions start with GET_.

This comment has been minimized.

@alejandronanez

alejandronanez Oct 22, 2017
Member

GET_USER_OPEN_PULL_REQUESTS maybe.

@@ -7,6 +7,7 @@ import {
GET_EVENTS,
CHANGE_LOCALE,
GET_AUTH_STAR_COUNT,
SEARCH_USER_OPEN_PULL_REQUESTS,
} from './auth.type';

const initialState = {

This comment has been minimized.

@chinesedfan

chinesedfan Oct 22, 2017
Member

You'd better add an initial value here.

case SEARCH_USER_OPEN_PULL_REQUESTS.PENDING:
return {
...state,
isPendingSearchUserOpenPullRequests: true,

This comment has been minimized.

@chinesedfan

chinesedfan Oct 22, 2017
Member

This field can be renamed correspondingly.

user: Object,
orgs: Array,
searchedUserOpenPullRequests: Array,

This comment has been minimized.

@chinesedfan

chinesedfan Oct 22, 2017
Member

searchUserOpenPullRequests and searchedUserOpenPullRequests are really easy to be mixed.

@andrewda andrewda changed the title Added list with open pull requests on user profile pages feat: add list with open pull requests on user profile pages Oct 22, 2017
noItemsMessage={translate('repository.main.noOpenPullRequestsMessage', locale)}
>
{searchedUserOpenPullRequests.map(item =>
<IssueListItem

This comment has been minimized.

@alejandronanez

alejandronanez Oct 22, 2017
Member

Can you please add the key prop for IssueListItem? Thanks!

Copy link
Member

@alejandronanez alejandronanez left a comment

  • Please add key prop when iterating a list of components.
>
{searchedUserOpenPullRequests.map(item =>
<IssueListItem
type={'git-pull-request'}

This comment has been minimized.

@alejandronanez

alejandronanez Oct 22, 2017
Member

Add key prop in here please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants
You can’t perform that action at this time.