Skip to content

Commit

Permalink
Added other participants to the Visualization in UT-HAI codebase.
Browse files Browse the repository at this point in the history
  • Loading branch information
patcon committed Oct 22, 2024
1 parent 765c397 commit ee159a0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/** @type { import('@storybook/react').Preview } */
import "./style.css"
import { getMath, getComments } from "./utils";
import { getMath, getComments, getVotesFamous } from "./utils";

// Needed at the very least for Graph component stories of UT-HAI client-deliberation.
import jquery from 'jquery';
Expand Down Expand Up @@ -35,7 +35,7 @@ global.$.ajax = ajax_responses({
'/api/v3/math/pca2': getMath(),
'/api/v3/comments': [getComments()],
'/api/v3/votes': [],
'/api/v3/votes/famous': [],
'/api/v3/votes/famous': getVotesFamous(),
})

const isGithubBuild = !!process.env["GITHUB_REPOSITORY"]
Expand Down
6 changes: 6 additions & 0 deletions .storybook/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import * as globals from "../codebases/compdem/client-report/src/components/glob
import participationData from './data/3ntrtcehas-participation-init.json'
import commentsData from './data/3ntrtcehas-comments.json'
import reportsData from './data/3ntrtcehas-reports.json'
import votesFamousData from './data/3ntrtcehas-votes-famous.json'

// Simulates response data from /api/v3/math/pca2?conversation_id=3ntrtcehas
export const getMath = () => {
Expand Down Expand Up @@ -35,6 +36,11 @@ export const getReports = () => {
return reportsData
}

// Simulates response data from /api/v3/votes/famous?conversation_id=3ntrtcehas
export const getVotesFamous = () => {
return votesFamousData
}

export const getVoteColors = () => ({
agree: globals.brandColors.agree,
disagree: globals.brandColors.disagree,
Expand Down

0 comments on commit ee159a0

Please sign in to comment.