From 9e7919028c5b6377163ec1630f05959353eb900d Mon Sep 17 00:00:00 2001
From: Daniel Norman
Date: Thu, 6 Jun 2019 19:21:55 +0200
Subject: [PATCH 1/3] Description takes precedence in voting card
---
apps/voting/app/src/components/VotingCard/VotingCard.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/apps/voting/app/src/components/VotingCard/VotingCard.js b/apps/voting/app/src/components/VotingCard/VotingCard.js
index d44e4b965c..1349b379e9 100644
--- a/apps/voting/app/src/components/VotingCard/VotingCard.js
+++ b/apps/voting/app/src/components/VotingCard/VotingCard.js
@@ -76,7 +76,7 @@ const VotingCard = React.memo(
From cc9631107b7b0cf7f9b2cbfadacb43bf8b0df920 Mon Sep 17 00:00:00 2001
From: Daniel Norman
Date: Thu, 6 Jun 2019 19:33:11 +0200
Subject: [PATCH 2/3] Reorder description and metadata (question)
---
apps/voting/app/src/components/VotePanel.js | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/apps/voting/app/src/components/VotePanel.js b/apps/voting/app/src/components/VotePanel.js
index a9704731ae..61f1102ca0 100644
--- a/apps/voting/app/src/components/VotePanel.js
+++ b/apps/voting/app/src/components/VotePanel.js
@@ -111,6 +111,16 @@ const VotePanelContent = React.memo(
+ {description && (
+
+
+
+
+
+
+
+
+ )}
{metadata && (
@@ -128,16 +138,6 @@ const VotePanelContent = React.memo(
)}
- {description && (
-
-
-
-
-
-
-
-
- )}
From ef39889972b6465b0cf909545259d514fb9f578d Mon Sep 17 00:00:00 2001
From: Daniel Norman
Date: Thu, 6 Jun 2019 19:46:42 +0200
Subject: [PATCH 3/3] Do not nullify metadata
---
apps/voting/app/src/script.js | 2 --
1 file changed, 2 deletions(-)
diff --git a/apps/voting/app/src/script.js b/apps/voting/app/src/script.js
index a16cf127e6..5c8e466f55 100644
--- a/apps/voting/app/src/script.js
+++ b/apps/voting/app/src/script.js
@@ -239,8 +239,6 @@ async function loadVoteDescription(vote) {
} catch (error) {
console.error('Error describing vote script', error)
vote.description = 'Invalid script. The result cannot be executed.'
- // Clear metadata so ensure it's rendered with a description rather than question
- vote.metadata = null
}
return vote