diff --git a/src/analysis/fallbackDeclaration.js b/src/analysis/fallbackDeclaration.js
index bea55ac..717960e 100644
--- a/src/analysis/fallbackDeclaration.js
+++ b/src/analysis/fallbackDeclaration.js
@@ -23,6 +23,8 @@ export const fallbackEdgeType: EdgeType = Object.freeze({
defaultForwardWeight: 1,
defaultBackwardWeight: 1,
prefix: EdgeAddress.empty,
+ description:
+ "The fallback EdgeType for edges which don't have any other type",
});
export const fallbackDeclaration: PluginDeclaration = Object.freeze({
diff --git a/src/analysis/types.js b/src/analysis/types.js
index 82ed4bd..3e95978 100644
--- a/src/analysis/types.js
+++ b/src/analysis/types.js
@@ -96,4 +96,7 @@ export type EdgeType = {|
// of this EdgeType. A given edge `e` is a member of the type `t` if
// `EdgeAddress.hasPrefix(e.address, t.prefix) == true`
+prefix: EdgeAddressT,
+ // The `description` property should be a human-readable string that makes
+ // it clear to a user what each EdgeType does
+ +description: string,
|};
diff --git a/src/explorer/pagerankTable/Aggregation.test.js b/src/explorer/pagerankTable/Aggregation.test.js
index 7aa97ef..0cfaca3 100644
--- a/src/explorer/pagerankTable/Aggregation.test.js
+++ b/src/explorer/pagerankTable/Aggregation.test.js
@@ -157,6 +157,7 @@ describe("explorer/pagerankTable/Aggregation", () => {
defaultForwardWeight: 1,
defaultBackwardWeight: 1,
prefix: EdgeAddress.fromParts(["look", "like"]),
+ description: "TODO: Add a description for this EdgeType",
};
function aggView(aggregation: FlatAggregation) {
const el = shallow();
diff --git a/src/explorer/pagerankTable/aggregate.test.js b/src/explorer/pagerankTable/aggregate.test.js
index f15f198..c14f3e6 100644
--- a/src/explorer/pagerankTable/aggregate.test.js
+++ b/src/explorer/pagerankTable/aggregate.test.js
@@ -66,6 +66,7 @@ describe("explorer/pagerankTable/aggregate", () => {
defaultForwardWeight: 1,
defaultBackwardWeight: 1,
prefix: EdgeAddress.fromParts(["foo"]),
+ description: "TODO: Add a description for this EdgeType",
},
bar: {
forwardName: "bars",
@@ -73,6 +74,7 @@ describe("explorer/pagerankTable/aggregate", () => {
defaultForwardWeight: 1,
defaultBackwardWeight: 1,
prefix: EdgeAddress.fromParts(["bar"]),
+ description: "TODO: Add a description for this EdgeType",
},
empty: {
forwardName: "empty",
@@ -80,6 +82,7 @@ describe("explorer/pagerankTable/aggregate", () => {
defaultForwardWeight: 1,
defaultBackwardWeight: 1,
prefix: EdgeAddress.empty,
+ description: "TODO: Add a description for this EdgeType",
},
};
const edgeTypesArray = [edgeTypes.foo, edgeTypes.bar];
diff --git a/src/explorer/weights/EdgeTypeConfig.js b/src/explorer/weights/EdgeTypeConfig.js
index 1490afb..c2d36b4 100644
--- a/src/explorer/weights/EdgeTypeConfig.js
+++ b/src/explorer/weights/EdgeTypeConfig.js
@@ -15,6 +15,7 @@ export class EdgeTypeConfig extends React.Component<{
{
this.props.onChange({
...this.props.weightedType,
@@ -25,6 +26,7 @@ export class EdgeTypeConfig extends React.Component<{
{
this.props.onChange({
...this.props.weightedType,
@@ -57,6 +59,7 @@ export class EdgeWeightSlider extends React.Component {
);
diff --git a/src/explorer/weights/EdgeTypeConfig.test.js b/src/explorer/weights/EdgeTypeConfig.test.js
index f9e5401..210f45d 100644
--- a/src/explorer/weights/EdgeTypeConfig.test.js
+++ b/src/explorer/weights/EdgeTypeConfig.test.js
@@ -54,7 +54,12 @@ describe("explorer/weights/EdgeTypeConfig", () => {
function example() {
const onChange = jest.fn();
const element = shallow(
-
+
);
const weightSlider = element.find(WeightSlider);
return {element, onChange, weightSlider};
diff --git a/src/explorer/weights/NodeTypeConfig.js b/src/explorer/weights/NodeTypeConfig.js
index 4ebba5c..3571799 100644
--- a/src/explorer/weights/NodeTypeConfig.js
+++ b/src/explorer/weights/NodeTypeConfig.js
@@ -13,6 +13,7 @@ export class NodeTypeConfig extends React.Component<{
{
this.props.onChange({
...this.props.weightedType,
diff --git a/src/explorer/weights/WeightSlider.js b/src/explorer/weights/WeightSlider.js
index 289cb18..b631024 100644
--- a/src/explorer/weights/WeightSlider.js
+++ b/src/explorer/weights/WeightSlider.js
@@ -6,11 +6,12 @@ export type Props = {|
+weight: number,
+name: React$Node,
+onChange: (number) => void,
+ +description: string,
|};
export class WeightSlider extends React.Component {
render() {
return (
-