diff --git a/.storybook/data/3ntrtcehas-votes-famous.json b/.storybook/data/3ntrtcehas-votes-famous.json new file mode 100644 index 0000000..c20627f --- /dev/null +++ b/.storybook/data/3ntrtcehas-votes-famous.json @@ -0,0 +1,344 @@ +{ + "1": { + "priority": 900, + "twitter": { + "twitter_user_id": "15815532", + "screen_name": "colinmegill", + "name": "Colin Megill", + "followers_count": 3371, + "verified": false, + "location": "San Francisco, CA", + "profile_image_url_https": "https://pol.is/twitter_image?id=15815532" + }, + "facebook": { + "fb_user_id": "10102210338605601", + "fb_name": "Colin Megill", + "fb_link": "https://www.facebook.com/app_scoped_user_id/10102210338605601/", + "location": "Seattle, Washington", + "verified": true, + "fb_picture": "https://graph.facebook.com/v2.2/10102210338605601/picture?width=40&height=40" + }, + "x_profile_image_url": null, + "xid": null, + "x_name": null, + "x_email": null, + "pid": 1, + "votes": "uaaaaadapaddaaaddaddaaaapauuuuuuuuuuuuuuuuuuuuuuuuuuuuuu", + "bid": 101 + }, + "3": { + "priority": 10, + "twitter": { + "twitter_user_id": "324583350", + "screen_name": "ajsmitha7", + "name": "Andrew Smith", + "followers_count": 81, + "verified": false, + "location": "Denver", + "profile_image_url_https": "https://pol.is/twitter_image?id=324583350" + }, + "facebook": { + "fb_user_id": "973399193480", + "fb_name": "Andrew Smith", + "fb_link": "https://www.facebook.com/app_scoped_user_id/YXNpZADpBWEVqMHowSlB0MlV4OE5PZAW53am1TRGk5NlpwSFk2ZAzgtTm5JWE5XNXBqeE52bzJFT05LTnoxQnNWdm1lanhhaElBX0ZAVdE9xR29xZAVdLNWpkLV9idHZAGU1A3aS0tWnBJNElScllz/", + "verified": true, + "fb_picture": "https://graph.facebook.com/v2.2/973399193480/picture?width=40&height=40" + }, + "fb__location": null, + "x_profile_image_url": null, + "xid": null, + "x_name": null, + "x_email": null, + "pid": 3, + "votes": "upaadaddaaaaadadaapdpaaapapaappaaaapaapaaauuppaaaauuuuuu", + "bid": 105 + }, + "4": { + "priority": 900, + "twitter": { + "twitter_user_id": "65701711", + "screen_name": "metasoarous", + "name": "Christopher Small", + "followers_count": 943, + "verified": false, + "location": "Seattle, WA", + "profile_image_url_https": "https://pol.is/twitter_image?id=65701711" + }, + "facebook": { + "fb_user_id": "10205189080112819", + "fb_name": "Christopher Small", + "fb_link": "https://www.facebook.com/app_scoped_user_id/10205189080112819/", + "verified": true, + "fb_picture": "https://graph.facebook.com/v2.2/10205189080112819/picture?width=40&height=40" + }, + "fb__location": null, + "x_profile_image_url": null, + "xid": null, + "x_name": null, + "x_email": null, + "pid": 4, + "votes": "uaaaapdpaaaapaadaaadpapapaaapppapaaaaadaaappuuuuuuuuuuuu", + "bid": 4 + }, + "7": { + "priority": 9, + "tw__twitter_user_id": null, + "tw__screen_name": null, + "tw__name": null, + "tw__followers_count": null, + "tw__verified": null, + "tw__location": null, + "facebook": { + "fb_user_id": "10156035174565616", + "fb_name": "Vanessa Wruble", + "fb_link": "https://www.facebook.com/app_scoped_user_id/10156035174565616/", + "verified": true, + "fb_picture": "https://graph.facebook.com/v2.2/10156035174565616/picture?width=40&height=40" + }, + "fb__location": null, + "x_profile_image_url": null, + "xid": null, + "x_name": null, + "x_email": null, + "pid": 7, + "votes": "uaaaapaaaaaaaaaaaaadaapapaaaapaaaaauuuuuuuuuuuuuuuuuuuuu", + "bid": 7 + }, + "14": { + "priority": 9, + "tw__twitter_user_id": null, + "tw__screen_name": null, + "tw__name": null, + "tw__followers_count": null, + "tw__verified": null, + "tw__location": null, + "facebook": { + "fb_user_id": "10155994745224257", + "fb_name": "Mark Langgin", + "fb_link": "https://www.facebook.com/app_scoped_user_id/10155994745224257/", + "verified": true, + "fb_picture": "https://graph.facebook.com/v2.2/10155994745224257/picture?width=40&height=40" + }, + "fb__location": null, + "x_profile_image_url": null, + "xid": null, + "x_name": null, + "x_email": null, + "pid": 14, + "votes": "uapaapdapapapaauuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu", + "bid": 97 + }, + "24": { + "priority": 10, + "twitter": { + "twitter_user_id": "33623404", + "screen_name": "jae4Revolution", + "name": "🌹🇵🇸", + "followers_count": 3157, + "verified": false, + "location": "Earth", + "profile_image_url_https": "https://pol.is/twitter_image?id=33623404" + }, + "fb__fb_user_id": null, + "fb__fb_name": null, + "fb__fb_link": null, + "fb__fb_public_profile": null, + "fb__location": null, + "x_profile_image_url": null, + "xid": null, + "x_name": null, + "x_email": null, + "pid": 24, + "votes": "uuuuuuuuuuuuuuduauuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu", + "bid": 139 + }, + "83": { + "priority": 9, + "tw__twitter_user_id": null, + "tw__screen_name": null, + "tw__name": null, + "tw__followers_count": null, + "tw__verified": null, + "tw__location": null, + "facebook": { + "fb_user_id": "10210812891260183", + "fb_name": "Spencer Bowley", + "fb_link": "https://www.facebook.com/app_scoped_user_id/10210812891260183/", + "verified": true, + "fb_picture": "https://graph.facebook.com/v2.2/10210812891260183/picture?width=40&height=40" + }, + "fb__location": null, + "x_profile_image_url": null, + "xid": null, + "x_name": null, + "x_email": null, + "pid": 83, + "votes": "uappppppaappppadapppppppppapappaaapuuuuuuuuuuuuuuuuuuuuu", + "bid": 29 + }, + "92": { + "priority": 9, + "tw__twitter_user_id": null, + "tw__screen_name": null, + "tw__name": null, + "tw__followers_count": null, + "tw__verified": null, + "tw__location": null, + "facebook": { + "fb_user_id": "336752560157692", + "fb_name": "Emily Morgan", + "fb_link": "https://www.facebook.com/app_scoped_user_id/336752560157692/", + "verified": true, + "fb_picture": "https://graph.facebook.com/v2.2/336752560157692/picture?width=40&height=40" + }, + "fb__location": null, + "x_profile_image_url": null, + "xid": null, + "x_name": null, + "x_email": null, + "pid": 92, + "votes": "uapappppuuaauuuduupuuauupduauuduudauuupuuuuuuuuuuuuuuuuu", + "bid": 137 + }, + "180": { + "priority": 10, + "twitter": { + "twitter_user_id": "3936560895", + "screen_name": "theo_bass", + "name": "Theo Bass", + "followers_count": 1297, + "verified": false, + "location": "", + "profile_image_url_https": "https://pol.is/twitter_image?id=3936560895" + }, + "fb__fb_user_id": null, + "fb__fb_name": null, + "fb__fb_link": null, + "fb__fb_public_profile": null, + "fb__location": null, + "x_profile_image_url": null, + "xid": null, + "x_name": null, + "x_email": null, + "pid": 180, + "votes": "uaapdpdapaapdpddaapdaaaauapaapdapaapaapaapuudpaappuuuuuu", + "bid": 36 + }, + "206": { + "priority": 10, + "twitter": { + "twitter_user_id": "771309474", + "screen_name": "andypaice", + "name": "Andy Paice", + "followers_count": 1066, + "verified": false, + "location": "London, England", + "profile_image_url_https": "https://pol.is/twitter_image?id=771309474" + }, + "fb__fb_user_id": null, + "fb__fb_name": null, + "fb__fb_link": null, + "fb__fb_public_profile": null, + "fb__location": null, + "x_profile_image_url": null, + "xid": null, + "x_name": null, + "x_email": null, + "pid": 206, + "votes": "uuaududupaadupuuauuuuuuauduuuuuauuuuaduudauupuaduuuuuuuu", + "bid": 64 + }, + "222": { + "priority": 10, + "twitter": { + "twitter_user_id": "221427169", + "screen_name": "ubuntourist", + "name": "The Ubuntourist", + "followers_count": 653, + "verified": false, + "location": "Brain-Washington, DC", + "profile_image_url_https": "https://pol.is/twitter_image?id=221427169" + }, + "fb__fb_user_id": null, + "fb__fb_name": null, + "fb__fb_link": null, + "fb__fb_public_profile": null, + "fb__location": null, + "x_profile_image_url": null, + "xid": null, + "x_name": null, + "x_email": null, + "pid": 222, + "votes": "uddddadpaapaaaddpaddaaaauaaaapaapaaaaapaaauuapaaadauuuuu", + "bid": 115 + }, + "228": { + "priority": 10, + "twitter": { + "twitter_user_id": "14120802", + "screen_name": "bentut", + "name": "bentut", + "followers_count": 587, + "verified": false, + "location": "Honolulu, HI", + "profile_image_url_https": "https://pol.is/twitter_image?id=14120802" + }, + "fb__fb_user_id": null, + "fb__fb_name": null, + "fb__fb_link": null, + "fb__fb_public_profile": null, + "fb__location": null, + "x_profile_image_url": null, + "xid": null, + "x_name": null, + "x_email": null, + "pid": 228, + "votes": "uuuuppduuauuuudduuauuuupuuuuuuuuuuuuuauuuuuuuuupuupuuupu", + "bid": 132 + }, + "230": { + "priority": 10, + "twitter": { + "twitter_user_id": "86818693", + "screen_name": "doub1ejack", + "name": "Micah Mutrux", + "followers_count": 69, + "verified": false, + "location": "Huntington, vt", + "profile_image_url_https": "https://pol.is/twitter_image?id=86818693" + }, + "fb__fb_user_id": null, + "fb__fb_name": null, + "fb__fb_link": null, + "fb__fb_public_profile": null, + "fb__location": null, + "x_profile_image_url": null, + "xid": null, + "x_name": null, + "x_email": null, + "pid": 230, + "votes": "uaaaapdaaaaaaaddaaadaapaudaaddaaapapaapppauupppaaadupupp", + "bid": 1 + }, + "266": { + "priority": 1000, + "tw__twitter_user_id": null, + "tw__screen_name": null, + "tw__name": null, + "tw__followers_count": null, + "tw__verified": null, + "tw__location": null, + "fb__fb_user_id": null, + "fb__fb_name": null, + "fb__fb_link": null, + "fb__fb_public_profile": null, + "fb__location": null, + "x_profile_image_url": null, + "xid": null, + "x_name": null, + "x_email": null, + "pid": 266, + "isSelf": true, + "votes": "uuuuuuuuuuuuuuuuuuuuuuuduuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu" + } +} diff --git a/.storybook/preview.js b/.storybook/preview.js index 65cc6b2..869436b 100644 --- a/.storybook/preview.js +++ b/.storybook/preview.js @@ -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'; @@ -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"] diff --git a/.storybook/utils.js b/.storybook/utils.js index 5857408..91bf0f8 100644 --- a/.storybook/utils.js +++ b/.storybook/utils.js @@ -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 = () => { @@ -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,