Skip to content

Conversation

@rebornix
Copy link
Member

@rebornix rebornix commented Jan 21, 2019

Add more timeline event info

Merge Event
image

Review Event Author Association
image

Linkify
image

image

@rebornix rebornix changed the title add review and approval info add review, approval info and linkify Jan 21, 2019
@kieferrm kieferrm mentioned this pull request Jan 21, 2019
20 tasks
createdAt: graphQLPullRequest.createdAt,
updatedAt: graphQLPullRequest.updatedAt,
head: {
label: graphQLPullRequest.headRef.name,
Copy link
Contributor

Choose a reason for hiding this comment

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

is it possible for headRef or baseRef to be undefined, if they've been deleted?

Copy link
Member Author

Choose a reason for hiding this comment

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

It can be null based on the schema, I'd love to use the generated typings with strict null checks ;)

};
}

export function parseGraphQLTimelineEvents(events: any[]): TimelineEvent[] {
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be good to replace this any with the types from graphql.ts

userLogin.textContent = this._review.user.login;

const authorAssociation: HTMLSpanElement = document.createElement('span');
authorAssociation.textContent = `(${this._review.authorAssociation.toLocaleLowerCase()})`;
Copy link
Contributor

Choose a reason for hiding this comment

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

authorAssociation seems to be undefined when using the REST API. Also, when the authorAssociation is none, I think we shouldn't render it

}

export function convertRESTTimelineEvents(events: any[]): TimelineEvent[] {
export function convertRESTTimelineEvents(events: any[]): Common.TimelineEvent[] {
Copy link
Contributor

Choose a reason for hiding this comment

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

if possible let's also replace any with a real type here, avatar_url isn't being converted to avatarUrl

@Tyriar
Copy link
Member

Tyriar commented Feb 6, 2019

Do you get the HTML directly from GitHub or do some conversions? Microsoft/vscode#xyz should also work

@rebornix
Copy link
Member Author

rebornix commented Feb 7, 2019

@Tyriar we didn't do anything more if it's from github.com

@RMacfarlane RMacfarlane deleted the rebornix/more-timelineevents-rendering branch February 16, 2019 00:25
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.

4 participants