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

CircleIndicatorView -- dependencies, related, dependents #10

Closed
2 tasks done
jbenet opened this issue Nov 19, 2016 · 3 comments
Closed
2 tasks done

CircleIndicatorView -- dependencies, related, dependents #10

jbenet opened this issue Nov 19, 2016 · 3 comments

Comments

@jbenet
Copy link
Owner

jbenet commented Nov 19, 2016

A DepIndicator is a circle with a count in the center. The count depends on a function, and so does the color.

  • prop determines number
  • prop determines color

functions for "dependencies" indicator

function dependenciesNumber(item) {
  // blockers = dependencies - (dependencies that are done)
  if (item.links.blockers.length > 0) {
    return item.links.blockers.length
  }
  return dep.links.dependencies.length
}

function dependenciesColor(item) {
  if (item.links.blockers.length > 0) {
    return green
  }
  return red
}

functions for "related" indicator

var relatedNumber = (item) -> item.links.related
var relatedColor = (item) -> gray

functions for "dependents" indicator

var dependentsNumber = (item) -> item.links.dependents
var dependentsColor = (item) -> (item.done ? green : red)

The circle indicators here:


depends on #11

@jbenet jbenet changed the title DepIndicator DepIndicator views Nov 19, 2016
@jbenet jbenet changed the title DepIndicator views CircleIndicatorView -- dependencies, related, dependents Nov 19, 2016
@jbenet jbenet mentioned this issue Nov 19, 2016
9 tasks
@jbenet
Copy link
Owner Author

jbenet commented Nov 20, 2016

Progress:

2016-11-20 at 4 14 am

wking added a commit to wking/depviz that referenced this issue Nov 20, 2016
The old logic was from [1]:

  var dependentsColor = (item) -> (item.done ? green : red)

But the screenshot in depviz.mocks.011.jpg shows grey dependents
indicators for jbenet#1 and jbenet#7 (neither of which have dependencies).

[1]: jbenet#10
wking added a commit to wking/depviz that referenced this issue Nov 20, 2016
The old logic was from [1]:

  var dependentsColor = (item) -> (item.done ? green : red)

But the screenshot in depviz.mocks.011.jpg shows grey dependents
indicators for jbenet#1 and jbenet#7 (neither of which have dependencies).

[1]: jbenet#10
wking added a commit to wking/depviz that referenced this issue Nov 24, 2016
The old logic was from [1]:

  var dependentsColor = (item) -> (item.done ? green : red)

But the screenshot in depviz.mocks.011.jpg shows grey dependents
indicators for jbenet#1 and jbenet#7 (neither of which have dependencies).

[1]: jbenet#10
@wking
Copy link
Collaborator

wking commented Nov 26, 2016

Will be fixed by #11. Can we either add a depends on #11 or merge #11 and close this?

@jbenet jbenet closed this as completed Nov 28, 2016
@jbenet
Copy link
Owner Author

jbenet commented Nov 28, 2016

Added depends on #11, merged #11, and closed #10.

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

No branches or pull requests

2 participants