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

Add cz-github-issues as an issue source for cz-component-dash in animations-ave.json #77

Merged
merged 12 commits into from
Oct 19, 2016

Conversation

alancutter
Copy link
Collaborator

This change adds a new component dash to animations-ave.json showing web-animations-js polyfill issue statuses.

Preview:
image

This change builds upon #76.
BUG=#72
+@suzyh as author of cz-component-dash.

@suzyh
Copy link
Collaborator

suzyh commented Oct 17, 2016

lgtm

var issueSource = issueSources[this.key];
registerSource(issueSource.tag, issueSource.query, issueList => {
this.set('issueList', issueList);
});
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oops, thought I reverted the updateIssueSource() split in the previous patch.

Copy link
Owner

Choose a reason for hiding this comment

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

this.issueList = issueList :P

@@ -100,7 +100,7 @@
is: "cz-component-dash",

properties: {
users: {
userConfigs: {
Copy link
Collaborator Author

@alancutter alancutter Oct 19, 2016

Choose a reason for hiding this comment

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

I can anticipate disapproval for this rename, it has a weaker line of reasoning than searchQuery.query.

registerSource('cz-config', 'users', users => {
this.set('users', users.map(userData => userData['email']));
registerSource('cz-config', 'users', userConfigs => {
this.set('userConfigs', userConfigs);
Copy link
Owner

Choose a reason for hiding this comment

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

this.userConfigs = userConfigs

var issueSource = issueSources[this.key];
registerSource(issueSource.tag, issueSource.query, issueList => {
this.set('issueList', issueList);
});
Copy link
Owner

Choose a reason for hiding this comment

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

this.issueList = issueList :P

var team = new IssueList();
var others = new IssueList();
var unowned = new IssueList();
if (issueList) {
for (var issue of issueList) {
if (issue.owner == null) {
unowned.push(issue);
} else if (this.users.indexOf(issue.owner) === -1) {
} else if (!usernames.has(issue.owner)) {
Copy link
Owner

Choose a reason for hiding this comment

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

FYI, you can use .includes on a list directly now, so you don't need to Set-ify usernames (I don't think there's any other reason to do that here as it isn't edited anywhere).

return;
}
var usernames = userConfigs.map(userConfig => issueList.getUsername(userConfig));
this.set('usernames', new Set(usernames));
Copy link
Owner

Choose a reason for hiding this comment

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

this.usernames = ...

@alancutter
Copy link
Collaborator Author

Changed usernames to an array, replaced some this.set() calls to assignment.

@alancutter alancutter merged commit a223941 into shans:master Oct 19, 2016
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.

3 participants