jbenet / depviz

dependency visualizer for the web
https://jbenet.github.io/depviz
MIT License
49 stars 10 forks source link

CircleIndicatorView -- dependencies, related, dependents #10

Closed jbenet closed 7 years ago

jbenet commented 7 years ago

A DepIndicator is a circle with a count in the center. The count depends on a function, and so does the 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 commented 7 years ago

Progress:

2016-11-20 at 4 14 am

wking commented 7 years ago

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

jbenet commented 7 years ago

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