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

export components for easier development #100

Open
wants to merge 1 commit into
base: edge-civictechto
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions client-participation/vis2/components/curate.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import _ from "lodash";
import React from "react";
import * as globals from "./globals";

class Button extends React.Component {
export class Button extends React.Component {

handleClick() {
this.props.handleCurateButtonClick(this.props.identifier)
Expand All @@ -29,7 +29,7 @@ class Button extends React.Component {
}
}

class Curate extends React.Component {
export class Curate extends React.Component {

constructor(props) {
super(props);
Expand Down
4 changes: 2 additions & 2 deletions client-participation/vis2/components/exploreTid.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import BarChart from "./barChart";
const checkmark = "M1299 813l-422 422q-19 19-45 19t-45-19l-294-294q-19-19-19-45t19-45l102-102q19-19 45-19t45 19l147 147 275-275q19-19 45-19t45 19l102 102q19 19 19 45t-19 45zm141 83q0-148-73-273t-198-198-273-73-273 73-198 198-73 273 73 273 198 198 273 73 273-73 198-198 73-273zm224 0q0 209-103 385.5t-279.5 279.5-385.5 103-385.5-103-279.5-279.5-103-385.5 103-385.5 279.5-279.5 385.5-103 385.5 103 279.5 279.5 103 385.5z";
const ban = "M1440 893q0-161-87-295l-754 753q137 89 297 89 111 0 211.5-43.5t173.5-116.5 116-174.5 43-212.5zm-999 299l755-754q-135-91-300-91-148 0-273 73t-198 199-73 274q0 162 89 299zm1223-299q0 157-61 300t-163.5 246-245 164-298.5 61-298.5-61-245-164-163.5-246-61-300 61-299.5 163.5-245.5 245-164 298.5-61 298.5 61 245 164 163.5 245.5 61 299.5z";

const DataSentence = ({ math, selectedTidCuration, selectedComment, repfulFor, Strings }) => {
export const DataSentence = ({math, selectedTidCuration, selectedComment, repfulFor, Strings}) => {

let markup = null;

Expand Down Expand Up @@ -93,7 +93,7 @@ const DataSentence = ({ math, selectedTidCuration, selectedComment, repfulFor, S
return markup;
}

class ExploreTid extends React.Component {
export class ExploreTid extends React.Component {

handleAgree() {
this.props.onVoteClicked({
Expand Down
4 changes: 2 additions & 2 deletions client-participation/vis2/components/graphComments.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as globals from "./globals";

/* https://bl.ocks.org/mbostock/2206590 */

class GraphComment extends React.Component {
export class GraphComment extends React.Component {
getRectX() {
let x = -7;

Expand Down Expand Up @@ -54,7 +54,7 @@ class GraphComment extends React.Component {
}
}

class GraphComments extends React.Component {
export class GraphComments extends React.Component {

drawComments() {
let shouldShowOnlyOneGroup = _.isNumber(this.props.showOnlyGroup);
Expand Down
4 changes: 2 additions & 2 deletions client-participation/vis2/components/graphParticipants.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import _ from "lodash";
import * as globals from "./globals";
import {VictoryAnimation} from "victory-core";

const Participant = ({ptpt, tweenX, tweenY}) => {
export const Participant = ({ptpt, tweenX, tweenY}) => {
let picSize = ptpt.picture_size;
return (
<g
Expand Down Expand Up @@ -33,7 +33,7 @@ const Participant = ({ptpt, tweenX, tweenY}) => {
);
}

const Bucket = ({pt}) => {
export const Bucket = ({pt}) => {
return <circle
r={0}
fill={/* globals.groupColor(pt.gid)*/ "rgb(180,180,180)"}
Expand Down
4 changes: 2 additions & 2 deletions client-participation/vis2/components/hull.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as globals from "./globals";
import {VictoryAnimation} from "victory-core";
import * as d3 from "../../js/3rdparty/d3.v4.min.js";

class Hull extends React.Component {
export class Hull extends React.Component {
render () {
return (
<g>
Expand All @@ -19,7 +19,7 @@ class Hull extends React.Component {
}
};

class Hulls extends React.Component {
export class Hulls extends React.Component {
render () {
const line = d3.line(); // .curve(d3.curveBasis);
return (
Expand Down
6 changes: 3 additions & 3 deletions client-participation/vis2/components/hullLabels.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const getBackgroundRectWidth = (ptptCount) => {
return width;
}

const Users = ({selectedGroup}) => {
export const Users = ({selectedGroup}) => {
return (
<g width={7} fill={selectedGroup ? "white" : "black"} transform={`translate(0,-9)`}>
<ellipse cx="1.99335548" cy="1.42348754" rx="1.32890365" ry="1.42348754"></ellipse>
Expand All @@ -24,7 +24,7 @@ const Users = ({selectedGroup}) => {
)
}

const Label = ({ptptCount, centroid, gid, selectedGroup, handleClick}) => {
export const Label = ({ptptCount, centroid, gid, selectedGroup, handleClick}) => {
return (
<g
transform={`translate(${centroid.x},${centroid.y})`}
Expand Down Expand Up @@ -63,7 +63,7 @@ const Label = ({ptptCount, centroid, gid, selectedGroup, handleClick}) => {
)
}

const HullLabels = ({groups, centroids, selectedGroup, handleClick}) => {
export const HullLabels = ({groups, centroids, selectedGroup, handleClick}) => {

if (!centroids || !groups) { return null }

Expand Down
4 changes: 2 additions & 2 deletions client-participation/vis2/components/tidCarousel.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from "react";
import * as globals from "./globals";
import _ from "lodash";

class PaginateButton extends React.Component {
export class PaginateButton extends React.Component {

render() {
return (
Expand All @@ -27,7 +27,7 @@ class PaginateButton extends React.Component {
}


class TidCarousel extends React.Component {
export class TidCarousel extends React.Component {

constructor(props) {
super(props);
Expand Down
2 changes: 1 addition & 1 deletion client-participation/vis2/vis2.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import ReactDOM from 'react-dom';



class Root extends React.Component {
export class Root extends React.Component {
render() {

let comments = this.props.comments;
Expand Down
4 changes: 2 additions & 2 deletions client-report/src/components/lists/commentList.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import React from "react";
import _ from "lodash";
import * as globals from "../globals";

const BarChartCompact = ({ comment, voteCounts, nMembers, voteColors }) => {
export const BarChartCompact = ({ comment, voteCounts, nMembers, voteColors }) => {
if (!comment) return null;

let w = 100;
Expand Down Expand Up @@ -77,7 +77,7 @@ const BarChartCompact = ({ comment, voteCounts, nMembers, voteColors }) => {
);
};

const CommentRow = ({ comment, groups, voteColors }) => {
export const CommentRow = ({ comment, groups, voteColors }) => {
if (!comment) {
console.error("WHY IS THERE NO COMMENT 3452354235", comment);
return null;
Expand Down
Loading