Skip to content

feat: add list with open pull requests on user profile pages - #554

Open
radiKal07 wants to merge 3 commits into
gitpoint:masterfrom
radiKal07:master
Open

radiKal07 wants to merge 3 commits into
gitpoint:masterfrom
radiKal07:master

Conversation

@radiKal07

Copy link
Copy Markdown

Fixed #500

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

@chinesedfan chinesedfan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@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>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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

Comment thread src/auth/auth.action.js
};
};

export const searchUserOpenPullRequests = () => {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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

Comment thread src/auth/auth.type.js
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');

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

GET_USER_OPEN_PULL_REQUESTS maybe.

Comment thread src/auth/auth.reducer.js
SEARCH_USER_OPEN_PULL_REQUESTS,
} from './auth.type';

const initialState = {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You'd better add an initial value here.

Comment thread src/auth/auth.reducer.js
case SEARCH_USER_OPEN_PULL_REQUESTS.PENDING:
return {
...state,
isPendingSearchUserOpenPullRequests: true,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This field can be renamed correspondingly.

searchUserOpenPullRequests: Function,
user: Object,
orgs: Array,
searchedUserOpenPullRequests: Array,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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

@alejandronanez alejandronanez left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

  • Please add key prop when iterating a list of components.

>
{searchedUserOpenPullRequests.map(item =>
<IssueListItem
type={'git-pull-request'}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Add key prop in here please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

See contributions and open PR’s on profile/homepage

3 participants