Skip to content

Commit

Permalink
being participantsGraph
Browse files Browse the repository at this point in the history
  • Loading branch information
tevko committed Dec 13, 2024
1 parent 85f1c01 commit 152e042
Show file tree
Hide file tree
Showing 10 changed files with 7 additions and 69 deletions.
1 change: 0 additions & 1 deletion client-report/src/components/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import net from "../util/net";

import $ from "jquery";

import Narrative from "./narrative";
import ConsensusNarrative from "./lists/consensusNarrative.jsx";
import RawDataExport from "./RawDataExport";

Expand Down
2 changes: 1 addition & 1 deletion client-report/src/components/lists/consensusNarrative.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useState } from "react";
import * as globals from "../globals.js";
import Narrative from "../narrative/index.js";
import Narrative from "../narrative/index.jsx";
import CommentList from "./commentList.jsx";
const ConsensusNarrative = ({
math,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import { render, screen, waitFor } from '@testing-library/react';
import '@testing-library/jest-dom';
import ConsensusNarrative from './consensusNarrative';
import * as globals from '../globals.js';
import Narrative from '../narrative/index.js';
import Narrative from '../narrative/index.jsx';
import CommentList from './commentList.jsx';

jest.mock('../narrative/index.js', () => {
jest.mock('../narrative/index.jsx', () => {
return ({ sectionData, model }) => (
<div data-testid="mock-narrative">
Narrative Component - Model: {model} - Data: {JSON.stringify(sectionData)}
Expand Down
2 changes: 1 addition & 1 deletion client-report/src/components/lists/uncertainty.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import React from "react";
import CommentList from "./commentList.jsx";
import * as globals from "../globals.js";
// import style from "../../util/style";
import Narrative from "../narrative/index.js";
import Narrative from "../narrative/index.jsx";

const Uncertainty = ({
conversation,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import React from "react";
import CommentList from "./commentList.jsx";
import * as globals from "../globals.js";
import Narrative from "../narrative/index.js";
import Narrative from "../narrative/index.jsx";

const UncertaintyNarrative = ({
conversation,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import { render, screen } from '@testing-library/react';
import UncertaintyNarrative from './uncertaintyNarrative';
import * as globals from '../globals.js'; // Mock globals if necessary
jest.mock('../narrative/index.js', () => ({ model }) => <div data-testid={`mock-narrative-${model}`} /> ); // Mock Narrative
jest.mock('../narrative/index.jsx', () => ({ model }) => <div data-testid={`mock-narrative-${model}`} /> ); // Mock Narrative
jest.mock('./commentList.jsx', () => () => <div data-testid="mock-comment-list" />);
import '@testing-library/jest-dom';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,6 @@
import * as globals from "../globals";
import React from "react";

// const getBackgroundRectWidth = (ptptCount) => {
// let width = 46; /* smallest number */
// if (ptptCount >= 100 && ptptCount < 1000) {
// width = 52;
// } else if (ptptCount > 1000) {
// width = 59;
// }
// return width;
// }

const Users = ({selectedGroup}) => {
return (
<g width={7} fill={selectedGroup ? "white" : "black"} transform={`translate(0,-9)`}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ import graphUtil from "../../util/graphUtil";
import Axes from "../graphAxes";
import * as d3contour from "d3-contour";
import * as d3chromatic from "d3-scale-chromatic";
// import GroupLabels from "./groupLabels";
import Comments from "../commentsGraph/comments.jsx";
import Hull from "./hull";
import Hull from "./hull.jsx";
import CommentList from "../lists/commentList.jsx";

const pointsPerSquarePixelMax = 0.0017; /* choose dynamically ? */
Expand Down Expand Up @@ -48,21 +47,6 @@ const Participants = ({ points, math }) => {
</text>
</g>
);
// return (<text
// key={i}
// transform={
// `translate(
// ${pt.x},
// ${pt.y}
// )`
// }
// style={{
// fill: "rgba(0,0,0,.5)",
// fontSize: 12,
// }}
// >
// {globals.groupSymbols[pt.gid]}
// </text>)
})}
</g>
);
Expand Down Expand Up @@ -144,25 +128,6 @@ class ParticipantsGraph extends React.Component {
</p>
</div>
<div>
{
// <button
// style={{
// color: this.state.showContour ? "white" : "black",
// border: this.state.showContour ? "1px solid #03A9F4" : "1px solid black",
// cursor: "pointer",
// borderRadius: 3,
// background: this.state.showContour ? "#03A9F4" : "none",
// padding: 4,
// marginRight: 20
// }}
// onClick={() => { this.setState({
// showContour: !this.state.showContour,
// consensusDivisionColorScale: false
// })
// }}>
// Density
// </button>
}
<button
style={{
color: this.state.showAxes ? "white" : "black",
Expand Down Expand Up @@ -197,22 +162,6 @@ class ParticipantsGraph extends React.Component {
>
Radial axes
</button>
{/* <button
style={{
color: this.state.consensusDivisionColorScale ? "white" : "black",
border: this.state.consensusDivisionColorScale ? "1px solid #03A9F4" : "1px solid black",
cursor: "pointer",
borderRadius: 3,
background: this.state.consensusDivisionColorScale ? "#03A9F4" : "none",
padding: 4,
marginRight: 20
}}
onClick={() => { this.setState({
consensusDivisionColorScale: !this.state.consensusDivisionColorScale,
showContour: false
}) }}>
Consensus / Divisive color scale
</button>*/}
<button
style={{
color: this.state.showComments ? "white" : "black",
Expand Down

0 comments on commit 152e042

Please sign in to comment.