Conversation
chinesedfan
left a comment
There was a problem hiding this 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> | ||
|
|
There was a problem hiding this comment.
Usually, we only care about our PRs, but do not for other users'.
| }; | ||
| }; | ||
|
|
||
| export const searchUserOpenPullRequests = () => { |
There was a problem hiding this comment.
I suggest to rename as getOpenPullRequest, which is simpler and more similar with other functions.
| 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'); |
There was a problem hiding this comment.
Similar here. Let's make actions start with GET_.
There was a problem hiding this comment.
GET_USER_OPEN_PULL_REQUESTS maybe.
| SEARCH_USER_OPEN_PULL_REQUESTS, | ||
| } from './auth.type'; | ||
|
|
||
| const initialState = { |
There was a problem hiding this comment.
You'd better add an initial value here.
| case SEARCH_USER_OPEN_PULL_REQUESTS.PENDING: | ||
| return { | ||
| ...state, | ||
| isPendingSearchUserOpenPullRequests: true, |
There was a problem hiding this comment.
This field can be renamed correspondingly.
| searchUserOpenPullRequests: Function, | ||
| user: Object, | ||
| orgs: Array, | ||
| searchedUserOpenPullRequests: Array, |
There was a problem hiding this comment.
searchUserOpenPullRequests and searchedUserOpenPullRequests are really easy to be mixed.
| noItemsMessage={translate('repository.main.noOpenPullRequestsMessage', locale)} | ||
| > | ||
| {searchedUserOpenPullRequests.map(item => | ||
| <IssueListItem |
There was a problem hiding this comment.
Can you please add the key prop for IssueListItem? Thanks!
alejandronanez
left a comment
There was a problem hiding this comment.
- Please add
keyprop when iterating a list of components.
| > | ||
| {searchedUserOpenPullRequests.map(item => | ||
| <IssueListItem | ||
| type={'git-pull-request'} |
There was a problem hiding this comment.
Add key prop in here please.
Fixed #500
On user profile pages and on own profile page now there can be seen a list with open pull requests.