From 7ea8bdd964dff9719ccd899af23e40cfdbcdb117 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dandelion=20Man=C3=A9?=
Date: Mon, 5 Mar 2018 20:09:24 -0800
Subject: [PATCH] Make App.js into skeleton for GraphExplorer (#70)
* Make App.js into skeleton for GraphExplorer
We make a very basic skeleton for the Graph Explorer as a basis
for future development.
This commit also removes the UserExplorer and FileExplorer from
App.js. Since we have changed the underlying data model, we are
unlikely to use the UserExplorer or FileExplorer in anything like
their current state, so they are effectively deprecated. I am deferring
removing them because it is nice to have some examples of working React
code to copy from, before the Graph Explorer is ready.
Test plan: run `yarn start`, and observe that the App displays the
words "Graph Explorer" underneath the "SourceCred Explorer" title bar.
---
src/explorer/App.js | 32 +++++++-------------------------
src/explorer/GraphExplorer.js | 17 +++++++++++++++++
2 files changed, 24 insertions(+), 25 deletions(-)
create mode 100644 src/explorer/GraphExplorer.js
diff --git a/src/explorer/App.js b/src/explorer/App.js
index 5d3aaf6..e06502b 100644
--- a/src/explorer/App.js
+++ b/src/explorer/App.js
@@ -1,19 +1,12 @@
// @flow
import React, {Component} from "react";
-import data from "./data.json";
import "./App.css";
-import {FileExplorer} from "./FileExplorer.js";
-import {UserExplorer} from "./UserExplorer.js";
+import {GraphExplorer} from "./GraphExplorer";
-type AppState = {selectedPath: string, selectedUser: ?string};
-class App extends Component<{}, AppState> {
- constructor() {
- super();
- this.state = {
- selectedPath: "",
- selectedUser: null,
- };
- }
+type Props = {};
+type State = {};
+
+class App extends Component {
render() {
return (
@@ -28,19 +21,8 @@ class App extends Component<{}, AppState> {
>
SourceCred Explorer
- this.setState({selectedPath: x})}
- selectedPath={this.state.selectedPath}
- data={data}
- />
- this.setState({selectedUser: x})}
- data={data}
- />
+
+
);
}
diff --git a/src/explorer/GraphExplorer.js b/src/explorer/GraphExplorer.js
new file mode 100644
index 0000000..39020e5
--- /dev/null
+++ b/src/explorer/GraphExplorer.js
@@ -0,0 +1,17 @@
+// @flow
+// A frontend for visualizing Contribution Graphs
+
+import React, {Component} from "react";
+
+type Props = {};
+type State = {};
+
+export class GraphExplorer extends Component {
+ render() {
+ return (
+
+
Graph Explorer
+
+ );
+ }
+}