From 503407731382c8756f63e4ab8722535efea797f6 Mon Sep 17 00:00:00 2001 From: Bennie Rosas Date: Fri, 12 May 2023 14:49:06 -0700 Subject: [PATCH 1/7] incorporate changes from https://github.com/chena11356/polis/tree/implement-comment-prioritization-checkbox credit to https://github.com/chena11356 addresses https://github.com/compdemocracy/polis/issues/217 --- .../conversation-admin/conversation-config.js | 4 ++++ client-participation/js/main.js | 2 ++ client-participation/js/strings/en_us.js | 14 ++++++++++++++ .../icon_fa_question_circle.handlebars | 10 ++++++++++ .../js/templates/vote-view.handlebars | 16 +++++++++++++++- client-participation/js/views/vote-view.js | 19 ++++++++++--------- server/app.ts | 1 + .../000007_add_comment_priority.sql | 7 +++++++ server/src/d.ts | 1 + server/src/db/sql.ts | 3 ++- server/src/server.ts | 2 ++ 11 files changed, 68 insertions(+), 11 deletions(-) create mode 100644 client-participation/js/templates/icon_fa_question_circle.handlebars create mode 100644 server/postgres/migrations/000007_add_comment_priority.sql diff --git a/client-admin/src/components/conversation-admin/conversation-config.js b/client-admin/src/components/conversation-admin/conversation-config.js index 86191259a..58bc95540 100644 --- a/client-admin/src/components/conversation-admin/conversation-config.js +++ b/client-admin/src/components/conversation-admin/conversation-config.js @@ -144,6 +144,10 @@ class ConversationConfig extends React.Component { Customize the user interface + + [EXPERIMENTAL FEATURE] Participants can see the "This comment is important" checkbox + + Participants can see the visualization diff --git a/client-participation/js/main.js b/client-participation/js/main.js index ad47f2d77..3f1264bab 100644 --- a/client-participation/js/main.js +++ b/client-participation/js/main.js @@ -48,6 +48,7 @@ var IconFaAngleRight = require("./templates/icon_fa_angle_right.handlebars"); var IconFaAsterisk = require("./templates/icon_fa_asterisk.handlebars"); var IconFaBan = require("./templates/icon_fa_ban.handlebars"); var IconFaCircleCheckPartial = require("./templates/icon_fa_check_circle.handlebars"); +var IconFaCircleQuestion = require("./templates/icon_fa_question_circle.handlebars"); var iconFaFacebookSquare16 = require("./templates/icon_fa_facebook_square_16.handlebars"); var iconFaFacebookSquare25 = require("./templates/icon_fa_facebook_square_25.handlebars"); var IconFaLightBulb = require("./templates/icon_fa_lightbulb_o.handlebars"); @@ -320,6 +321,7 @@ Handlebars.registerPartial("linkTos", LinkTosPartial); Handlebars.registerPartial("linkPrivacy", LinkPrivacyPartial); Handlebars.registerPartial("linkAddPolis", LinkAddPolisPartial); Handlebars.registerPartial("iconFaCircleCheck", IconFaCircleCheckPartial); +Handlebars.registerPartial("iconFaCircleQuestion", IconFaCircleQuestion); Handlebars.registerPartial("iconFaBan", IconFaBan); Handlebars.registerPartial("iconFaLightBulb", IconFaLightBulb); Handlebars.registerPartial("iconFaAsterisk", IconFaAsterisk); diff --git a/client-participation/js/strings/en_us.js b/client-participation/js/strings/en_us.js index b8fcfc372..e04ee0316 100644 --- a/client-participation/js/strings/en_us.js +++ b/client-participation/js/strings/en_us.js @@ -12,6 +12,20 @@ s.pass = "Pass / Unsure"; s.writePrompt = "Share your perspective..."; s.anonPerson = "Anonymous"; +s.importantCheckbox = "Important/Significant"; +s.importantCheckboxDesc = + "Check this box if you believe this statement is especially important to you or is highly relevant to the conversation, irrespective of your vote. It will give this statement higher priority compared to your other votes in the conversation analysis." + s.howImportantPrompt = "How important is this statement?"; +s.howImportantLow = "Low"; +s.howImportantMedium = "Medium"; +s.howImportantHigh = "High"; + +s.modSpam = "Spam"; +s.modOffTopic = "Off Topic"; +s.modImportant = "Important"; +s.modSubmitInitialState = "Skip (none of the above), next statement"; +s.modSubmit = "Done, next statement"; + s.x_wrote = "wrote:"; s.x_tweeted = "tweeted:"; s.comments_remaining = "{{num_comments}} remaining"; diff --git a/client-participation/js/templates/icon_fa_question_circle.handlebars b/client-participation/js/templates/icon_fa_question_circle.handlebars new file mode 100644 index 000000000..a0fea6be1 --- /dev/null +++ b/client-participation/js/templates/icon_fa_question_circle.handlebars @@ -0,0 +1,10 @@ +{{! Copyright (C) 2012-present, The Authors. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License, version 3, as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . }} + + \ No newline at end of file diff --git a/client-participation/js/templates/vote-view.handlebars b/client-participation/js/templates/vote-view.handlebars index e032bd36d..f8c21feb6 100644 --- a/client-participation/js/templates/vote-view.handlebars +++ b/client-participation/js/templates/vote-view.handlebars @@ -295,9 +295,23 @@
+
{{/if}} diff --git a/client-participation/js/views/vote-view.js b/client-participation/js/views/vote-view.js index 89e691833..8ada3d9ac 100644 --- a/client-participation/js/views/vote-view.js +++ b/client-participation/js/views/vote-view.js @@ -111,6 +111,7 @@ module.exports = Handlebones.ModelView.extend({ } } + ctx.showImportantCheckbox = preload.conversation.priority_type; // TODO: set up feature flagging ctx.social = socialCtx; ctx.noModSet = !ctx.spamOn && !ctx.otOn && !ctx.importantOn; ctx.canSubscribe = !!preload.firstPtpt || this.votesByMe.size() > 0; @@ -486,13 +487,13 @@ module.exports = Handlebones.ModelView.extend({ }); return false; }; - this.getWeight = function() { - if ($("#weight_low").prop("checked")) { - return -1; - } else if ($("#weight_high").prop("checked")) { - return 1; + + // note: instead of -1/1/0, weight is now the boolean high_priority + this.highPriority = function () { + if ($("#weight_high").prop("checked")) { + return true; } - return 0; + return false; }; this.participantAgreed = function(e) { this.mostRecentVoteType = "agree"; @@ -504,7 +505,7 @@ module.exports = Handlebones.ModelView.extend({ this.wipVote = { vote: -1, conversation_id: conversation_id, - weight: this.getWeight(), + high_priority: this.highPriority(), tid: tid }; serverClient.addToVotesByMe(this.wipVote); @@ -519,7 +520,7 @@ module.exports = Handlebones.ModelView.extend({ this.wipVote = { vote: 1, conversation_id: conversation_id, - weight: this.getWeight(), + high_priority: this.highPriority(), tid: tid }; serverClient.addToVotesByMe(this.wipVote); @@ -534,7 +535,7 @@ module.exports = Handlebones.ModelView.extend({ this.wipVote = { vote: 0, conversation_id: conversation_id, - weight: this.getWeight(), + high_priority: this.highPriority(), // TODO: specify in help text that this is for "important but unsure" tid: tid }; serverClient.addToVotesByMe(this.wipVote); diff --git a/server/app.ts b/server/app.ts index f5d388334..a8e7bee89 100644 --- a/server/app.ts +++ b/server/app.ts @@ -1004,6 +1004,7 @@ helpersInitialized.then( want("strict_moderation", getBool, assignToP), want("topic", getOptionalStringLimitLength(1000), assignToP), want("description", getOptionalStringLimitLength(50000), assignToP), + want("priority_type", getBool, assignToP), want("vis_type", getInt, assignToP), want("help_type", getInt, assignToP), want("write_type", getInt, assignToP), diff --git a/server/postgres/migrations/000007_add_comment_priority.sql b/server/postgres/migrations/000007_add_comment_priority.sql new file mode 100644 index 000000000..9d26c2370 --- /dev/null +++ b/server/postgres/migrations/000007_add_comment_priority.sql @@ -0,0 +1,7 @@ +ALTER TABLE conversations + ADD priority_type BOOLEAN NOT NULL + DEFAULT (false); + +ALTER TABLE votes + ADD high_priority BOOLEAN NOT NULL + DEFAULT (false); \ No newline at end of file diff --git a/server/src/d.ts b/server/src/d.ts index 4e3288b22..593a190ed 100644 --- a/server/src/d.ts +++ b/server/src/d.ts @@ -140,6 +140,7 @@ export type ConversationType = { help_bgcolor?: any; style_btn?: any; write_type?: any; + priority_type?: any; owner_sees_participation_stats?: any; link_url?: any; course_invite?: any; diff --git a/server/src/db/sql.ts b/server/src/db/sql.ts index 597d46e4b..25b4e7d9d 100644 --- a/server/src/db/sql.ts +++ b/server/src/db/sql.ts @@ -28,6 +28,7 @@ const sql_conversations: any = sql.define({ "parent_url", "vis_type", "write_type", + "priority_type", "help_type", "socialbtn_type", "subscribe_type", @@ -75,7 +76,7 @@ const sql_comments = sql.define({ const sql_votes_latest_unique: any = sql.define({ name: "votes_latest_unique", - columns: ["zid", "tid", "pid", "modified", "vote"], + columns: ["zid", "tid", "pid", "modified", "vote", "weight"], }); const sql_participant_metadata_answers: any = sql.define({ diff --git a/server/src/server.ts b/server/src/server.ts index b811fb8b6..7edeee77a 100644 --- a/server/src/server.ts +++ b/server/src/server.ts @@ -8008,6 +8008,7 @@ Email verified! You can close this tab or hit the back button. help_bgcolor: string; style_btn: any; write_type: any; + priority_type: any; owner_sees_participation_stats: any; launch_presentation_return_url_hex: any; link_url: any; @@ -12421,6 +12422,7 @@ Thanks for using Polis! parent_url: conv.parent_url, vis_type: conv.vis_type, write_type: conv.write_type, + priority_type: conv.priority_type, help_type: conv.help_type, socialbtn_type: conv.socialbtn_type, bgcolor: conv.bgcolor, From 4643893f0b4ef66d6505099fd504e55a02f9af86 Mon Sep 17 00:00:00 2001 From: Bennie Rosas Date: Fri, 12 May 2023 17:40:43 -0700 Subject: [PATCH 2/7] include high_priority in vote posts to server --- client-participation/js/models/vote.js | 3 +- client-participation/js/stores/polis.js | 12 ++++---- client-participation/js/views/vote-view.js | 14 ++++----- server/app.ts | 2 +- server/src/d.ts | 1 + server/src/db/sql.ts | 2 +- server/src/server.ts | 33 ++++++++++++++++------ 7 files changed, 42 insertions(+), 25 deletions(-) diff --git a/client-participation/js/models/vote.js b/client-participation/js/models/vote.js index 3b04fa835..5060301e0 100644 --- a/client-participation/js/models/vote.js +++ b/client-participation/js/models/vote.js @@ -11,6 +11,7 @@ module.exports = Model.extend({ pid: undefined, // PPPParticipant id -- this is a unique id every participant has in every convo that starts at 0 conversation_id: undefined, // converSation id votes: undefined, // agree = -1, pass = 0, disagree = 1 - participantStarred: false + participantStarred: false, + high_priority: false, } }); diff --git a/client-participation/js/stores/polis.js b/client-participation/js/stores/polis.js index ad1e6e108..cc3a19b6c 100644 --- a/client-participation/js/stores/polis.js +++ b/client-participation/js/stores/polis.js @@ -349,10 +349,10 @@ module.exports = function(params) { } } - function disagree(commentId, starred, weight) { + function disagree(commentId, starred, high_priority) { clearComment(commentId, "push"); var o = { - weight: weight, + high_priority: high_priority, vote: polisTypes.reactions.push, tid: commentId }; @@ -415,10 +415,10 @@ module.exports = function(params) { return promise; } - function agree(commentId, starred, weight) { + function agree(commentId, starred, high_priority) { clearComment(commentId); var o = { - weight: weight, + high_priority: high_priority, vote: polisTypes.reactions.pull, tid: commentId }; @@ -428,10 +428,10 @@ module.exports = function(params) { return react(o); } - function pass(tid, starred, weight) { + function pass(tid, starred, high_priority) { clearComment(tid); var o = { - weight: weight, + high_priority: high_priority, vote: polisTypes.reactions.pass, tid: tid }; diff --git a/client-participation/js/views/vote-view.js b/client-participation/js/views/vote-view.js index 8ada3d9ac..34f783235 100644 --- a/client-participation/js/views/vote-view.js +++ b/client-participation/js/views/vote-view.js @@ -510,7 +510,7 @@ module.exports = Handlebones.ModelView.extend({ }; serverClient.addToVotesByMe(this.wipVote); this.onButtonClicked(); - serverClient.agree(tid, starred, this.wipVote.weight) + serverClient.agree(tid, starred, this.wipVote.high_priority) .then(onVote.bind(this), onFail.bind(this)); }; this.participantDisagreed = function() { @@ -525,7 +525,7 @@ module.exports = Handlebones.ModelView.extend({ }; serverClient.addToVotesByMe(this.wipVote); this.onButtonClicked(); - serverClient.disagree(tid, starred, this.wipVote.weight) + serverClient.disagree(tid, starred, this.wipVote.high_priority) .then(onVote.bind(this), onFail.bind(this)); }; this.participantPassed = function() { @@ -540,7 +540,7 @@ module.exports = Handlebones.ModelView.extend({ }; serverClient.addToVotesByMe(this.wipVote); this.onButtonClicked(); - serverClient.pass(tid, starred, this.wipVote.weight) + serverClient.pass(tid, starred, this.wipVote.high_priority) .then(onVote.bind(this), onFail.bind(this)); }; @@ -580,7 +580,7 @@ module.exports = Handlebones.ModelView.extend({ return; } var starred = this.model.get("starred"); - var weight = 0; + var high_priority = this.wipVote.high_priority; var tid = this.wipVote.tid; @@ -592,13 +592,13 @@ module.exports = Handlebones.ModelView.extend({ } if (this.wipVote.vote === -1) { - serverClient.agree(tid, starred, weight) + serverClient.agree(tid, starred, high_priority) .then(reloadPage, onFailAfterAuth); } else if (this.wipVote.vote === 0) { - serverClient.pass(tid, starred, weight) + serverClient.pass(tid, starred, high_priority) .then(reloadPage, onFailAfterAuth); } else if (this.wipVote.vote === 1) { - serverClient.disagree(tid, starred, weight) + serverClient.disagree(tid, starred, high_priority) .then(reloadPage, onFailAfterAuth); } else { alert(3); diff --git a/server/app.ts b/server/app.ts index a8e7bee89..a592ff292 100644 --- a/server/app.ts +++ b/server/app.ts @@ -847,7 +847,7 @@ helpersInitialized.then( ), need("vote", getIntInRange(-1, 1), assignToP), want("starred", getBool, assignToP), - want("weight", getNumberInRange(-1, 1), assignToP, 0), + want("high_priority", getBool, assignToP, false), resolve_pidThing("pid", assignToP, "post:votes"), want("xid", getStringLimitLength(1, 999), assignToP), want("lang", getStringLimitLength(1, 10), assignToP), // language of the next comment to be returned diff --git a/server/src/d.ts b/server/src/d.ts index 593a190ed..a0c9b43a2 100644 --- a/server/src/d.ts +++ b/server/src/d.ts @@ -209,4 +209,5 @@ export type Vote = { weight: any; starred: any; parent_url: any; + high_priority: any; }; diff --git a/server/src/db/sql.ts b/server/src/db/sql.ts index 25b4e7d9d..a65a80728 100644 --- a/server/src/db/sql.ts +++ b/server/src/db/sql.ts @@ -76,7 +76,7 @@ const sql_comments = sql.define({ const sql_votes_latest_unique: any = sql.define({ name: "votes_latest_unique", - columns: ["zid", "tid", "pid", "modified", "vote", "weight"], + columns: ["zid", "tid", "pid", "modified", "vote", "weight", "high_priority"], }); const sql_participant_metadata_answers: any = sql.define({ diff --git a/server/src/server.ts b/server/src/server.ts index 7edeee77a..42ef497af 100644 --- a/server/src/server.ts +++ b/server/src/server.ts @@ -606,7 +606,8 @@ function initializePolisHelpers() { conv?: { zid: any }, tid?: any, voteType?: any, - weight?: number + weight?: number, + high_priority?: boolean, ) { let zid = conv?.zid; weight = weight || 0; @@ -616,8 +617,8 @@ function initializePolisHelpers() { reject: (arg0: string) => void ) { let query = - "INSERT INTO votes (pid, zid, tid, vote, weight_x_32767, created) VALUES ($1, $2, $3, $4, $5, default) RETURNING *;"; - let params = [pid, zid, tid, voteType, weight_x_32767]; + "INSERT INTO votes (pid, zid, tid, vote, weight_x_32767, high_priority, created) VALUES ($1, $2, $3, $4, $5, $6, default) RETURNING *;"; + let params = [pid, zid, tid, voteType, weight_x_32767, high_priority]; pgQuery(query, params, function (err: any, result: { rows: any[] }) { if (err) { if (isDuplicateKey(err)) { @@ -646,7 +647,8 @@ function initializePolisHelpers() { tid?: any, xid?: any, voteType?: any, - weight?: number + weight?: number, + high_priority?: boolean, ) { return ( pgQueryP_readOnly("select * from conversations where zid = ($1);", [zid]) @@ -677,7 +679,15 @@ function initializePolisHelpers() { return conv; }) .then(function (conv: any) { - return doVotesPost(uid, pid, conv, tid, voteType, weight); + return doVotesPost( + uid, + pid, + conv, + tid, + voteType, + weight, + high_priority, + ); }) ); } @@ -6807,7 +6817,8 @@ Email verified! You can close this tab or hit the back button. tid, xid!, vote, - 0 + 0, + false ); if (voteResult?.vote?.created) { createdTime = voteResult.vote.created; @@ -7396,7 +7407,8 @@ Email verified! You can close this tab or hit the back button. req.p.tid, req.p.xid, req.p.vote, - req.p.weight + req.p.weight, + req.p.high_priority, ); }) .then(function (o: { vote: any }) { @@ -8008,7 +8020,7 @@ Email verified! You can close this tab or hit the back button. help_bgcolor: string; style_btn: any; write_type: any; - priority_type: any; + importance_enabled: any; owner_sees_participation_stats: any; launch_presentation_return_url_hex: any; link_url: any; @@ -8100,6 +8112,9 @@ Email verified! You can close this tab or hit the back button. if (!_.isUndefined(req.p.write_type)) { fields.write_type = req.p.write_type; } + if (!_.isUndefined(req.p.importance_enabled)) { + fields.importance_enabled = req.p.importance_enabled; + } ifDefinedSet("auth_opt_allow_3rdparty", req.p, fields); if (!_.isUndefined(req.p.owner_sees_participation_stats)) { @@ -12422,7 +12437,7 @@ Thanks for using Polis! parent_url: conv.parent_url, vis_type: conv.vis_type, write_type: conv.write_type, - priority_type: conv.priority_type, + importance_enabled: conv.importance_enabled, help_type: conv.help_type, socialbtn_type: conv.socialbtn_type, bgcolor: conv.bgcolor, From ddafa3a7192e23f1c5bc1aaaaa9da0fad9f9f760 Mon Sep 17 00:00:00 2001 From: Bennie Rosas Date: Mon, 12 Jun 2023 17:34:47 -0500 Subject: [PATCH 3/7] rename "priority_type" to "importance_enabled" --- .../components/conversation-admin/conversation-config.js | 2 +- client-participation/js/views/vote-view.js | 2 +- server/app.ts | 2 +- .../postgres/migrations/000007_add_comment_priority.sql | 8 ++++---- server/src/d.ts | 2 +- server/src/db/sql.ts | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/client-admin/src/components/conversation-admin/conversation-config.js b/client-admin/src/components/conversation-admin/conversation-config.js index 58bc95540..87890e6e4 100644 --- a/client-admin/src/components/conversation-admin/conversation-config.js +++ b/client-admin/src/components/conversation-admin/conversation-config.js @@ -144,7 +144,7 @@ class ConversationConfig extends React.Component { Customize the user interface - + [EXPERIMENTAL FEATURE] Participants can see the "This comment is important" checkbox diff --git a/client-participation/js/views/vote-view.js b/client-participation/js/views/vote-view.js index 34f783235..bb943d2d1 100644 --- a/client-participation/js/views/vote-view.js +++ b/client-participation/js/views/vote-view.js @@ -111,7 +111,7 @@ module.exports = Handlebones.ModelView.extend({ } } - ctx.showImportantCheckbox = preload.conversation.priority_type; // TODO: set up feature flagging + ctx.showImportantCheckbox = preload.conversation.importance_enabled; ctx.social = socialCtx; ctx.noModSet = !ctx.spamOn && !ctx.otOn && !ctx.importantOn; ctx.canSubscribe = !!preload.firstPtpt || this.votesByMe.size() > 0; diff --git a/server/app.ts b/server/app.ts index a592ff292..f58a68c21 100644 --- a/server/app.ts +++ b/server/app.ts @@ -1004,7 +1004,7 @@ helpersInitialized.then( want("strict_moderation", getBool, assignToP), want("topic", getOptionalStringLimitLength(1000), assignToP), want("description", getOptionalStringLimitLength(50000), assignToP), - want("priority_type", getBool, assignToP), + want("importance_enabled", getBool, assignToP), want("vis_type", getInt, assignToP), want("help_type", getInt, assignToP), want("write_type", getInt, assignToP), diff --git a/server/postgres/migrations/000007_add_comment_priority.sql b/server/postgres/migrations/000007_add_comment_priority.sql index 9d26c2370..1973bf3a6 100644 --- a/server/postgres/migrations/000007_add_comment_priority.sql +++ b/server/postgres/migrations/000007_add_comment_priority.sql @@ -1,7 +1,7 @@ ALTER TABLE conversations - ADD priority_type BOOLEAN NOT NULL + ADD importance_enabled BOOLEAN NOT NULL DEFAULT (false); -ALTER TABLE votes - ADD high_priority BOOLEAN NOT NULL - DEFAULT (false); \ No newline at end of file +ALTER TABLE votes + ADD high_priority BOOLEAN NOT NULL + DEFAULT (false); diff --git a/server/src/d.ts b/server/src/d.ts index a0c9b43a2..91f52cd09 100644 --- a/server/src/d.ts +++ b/server/src/d.ts @@ -140,7 +140,7 @@ export type ConversationType = { help_bgcolor?: any; style_btn?: any; write_type?: any; - priority_type?: any; + importance_enabled?: any; owner_sees_participation_stats?: any; link_url?: any; course_invite?: any; diff --git a/server/src/db/sql.ts b/server/src/db/sql.ts index a65a80728..618f290e5 100644 --- a/server/src/db/sql.ts +++ b/server/src/db/sql.ts @@ -28,7 +28,7 @@ const sql_conversations: any = sql.define({ "parent_url", "vis_type", "write_type", - "priority_type", + "importance_enabled", "help_type", "socialbtn_type", "subscribe_type", From 29f2ed950eb74ce4c5fe3143524e93ef33e24ae8 Mon Sep 17 00:00:00 2001 From: Bennie Rosas Date: Mon, 12 Jun 2023 17:48:02 -0500 Subject: [PATCH 4/7] use actual quotes since HTML escapes are not being respected --- .../src/components/conversation-admin/conversation-config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client-admin/src/components/conversation-admin/conversation-config.js b/client-admin/src/components/conversation-admin/conversation-config.js index 87890e6e4..0a4f8d27a 100644 --- a/client-admin/src/components/conversation-admin/conversation-config.js +++ b/client-admin/src/components/conversation-admin/conversation-config.js @@ -145,7 +145,7 @@ class ConversationConfig extends React.Component { - [EXPERIMENTAL FEATURE] Participants can see the "This comment is important" checkbox + [EXPERIMENTAL FEATURE] Participants can see the "This comment is important" checkbox From f35670c264b7e932a240e446d22407c82afcdb19 Mon Sep 17 00:00:00 2001 From: Hadjar Homaei Date: Thu, 29 Jun 2023 18:04:51 -0700 Subject: [PATCH 5/7] Editing the importance/significance label and help text, moving it up above the vote buttons --- .../js/templates/vote-view.handlebars | 47 ++++++++++--------- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/client-participation/js/templates/vote-view.handlebars b/client-participation/js/templates/vote-view.handlebars index f8c21feb6..c9d8d5572 100644 --- a/client-participation/js/templates/vote-view.handlebars +++ b/client-participation/js/templates/vote-view.handlebars @@ -237,6 +237,29 @@ {{else}} {{!-- !shouldMod --}} + {{#if showImportantCheckbox}} +
+ + +
+ {{/if}}
- - -
- {{/if}} + {{/if}} {{!-- /shouldMod --}} From be512e54a7cc6ddf3f702dfe650785edcd113f80 Mon Sep 17 00:00:00 2001 From: Bennie Rosas Date: Fri, 15 Nov 2024 03:20:55 -0600 Subject: [PATCH 6/7] lint fix --- .../src/components/conversation-admin/conversation-config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client-admin/src/components/conversation-admin/conversation-config.js b/client-admin/src/components/conversation-admin/conversation-config.js index 0a4f8d27a..c894989ec 100644 --- a/client-admin/src/components/conversation-admin/conversation-config.js +++ b/client-admin/src/components/conversation-admin/conversation-config.js @@ -145,7 +145,7 @@ class ConversationConfig extends React.Component { - [EXPERIMENTAL FEATURE] Participants can see the "This comment is important" checkbox + [EXPERIMENTAL FEATURE] Participants can see the "This comment is important" checkbox From 0052ef32d82c0455ce3b7daf79fd3981aa82c1a4 Mon Sep 17 00:00:00 2001 From: Bennie Rosas Date: Wed, 4 Dec 2024 05:11:03 -0600 Subject: [PATCH 7/7] update migration filename --- server/README.md | 3 +++ ...dd_comment_priority.sql => 000008_add_comment_priority.sql} | 0 2 files changed, 3 insertions(+) rename server/postgres/migrations/{000007_add_comment_priority.sql => 000008_add_comment_priority.sql} (100%) diff --git a/server/README.md b/server/README.md index 3a24eabd5..50624425a 100644 --- a/server/README.md +++ b/server/README.md @@ -65,6 +65,9 @@ flavors of node. \i postgres/migrations/000003_add_origin_permanent_cookie_columns.sql \i postgres/migrations/000004_drop_waitinglist_table.sql \i postgres/migrations/000005_drop_slack_stripe_canvas.sql + \i postgres/migrations/000006_update_votes_rule.sql + \i postgres/migrations/000007_drop_geolocation_fields.sql + \i postgres/migrations/000008_add_comment_priority.sql ``` You can also separately run `psql -d polis -f postgres/migrations/000000_initial.sql` and diff --git a/server/postgres/migrations/000007_add_comment_priority.sql b/server/postgres/migrations/000008_add_comment_priority.sql similarity index 100% rename from server/postgres/migrations/000007_add_comment_priority.sql rename to server/postgres/migrations/000008_add_comment_priority.sql