From d742d65344fcf20e713d8260d9fe08db858cda09 Mon Sep 17 00:00:00 2001 From: Nico Hauser Date: Wed, 1 Feb 2023 21:36:43 +0100 Subject: [PATCH 1/3] Make election notice less attention grabbing --- .../components/ElectionVersionNotice.tsx | 25 ++++------ .../ViewSingleElection.test.tsx.snap | 50 +++++++------------ 2 files changed, 27 insertions(+), 48 deletions(-) diff --git a/fe1-web/src/features/evoting/components/ElectionVersionNotice.tsx b/fe1-web/src/features/evoting/components/ElectionVersionNotice.tsx index dbd7ef2843..412cc6572d 100644 --- a/fe1-web/src/features/evoting/components/ElectionVersionNotice.tsx +++ b/fe1-web/src/features/evoting/components/ElectionVersionNotice.tsx @@ -12,11 +12,12 @@ const styles = StyleSheet.create({ info: { padding: Spacing.x1, marginBottom: Spacing.x1, - borderRadius: Border.radius, flexDirection: 'row', alignItems: 'center', - backgroundColor: Color.info, + borderColor: Color.primary, + borderWidth: 1, + borderRadius: Border.radius, } as ViewStyle, infoText: { flex: 1, @@ -29,28 +30,20 @@ const ElectionVersionNotice = ({ election }: IPropTypes) => { case ElectionVersion.OPEN_BALLOT: return ( - + - - {STRINGS.general_notice} - - - {STRINGS.election_warning_open_ballot} - + {STRINGS.general_notice} + {STRINGS.election_warning_open_ballot} ); case ElectionVersion.SECRET_BALLOT: return ( - + - - {STRINGS.general_notice} - - - {STRINGS.election_info_secret_ballot} - + {STRINGS.general_notice} + {STRINGS.election_info_secret_ballot} ); diff --git a/fe1-web/src/features/evoting/screens/__tests__/__snapshots__/ViewSingleElection.test.tsx.snap b/fe1-web/src/features/evoting/screens/__tests__/__snapshots__/ViewSingleElection.test.tsx.snap index 08c49aa7ff..a7f0fe65d6 100644 --- a/fe1-web/src/features/evoting/screens/__tests__/__snapshots__/ViewSingleElection.test.tsx.snap +++ b/fe1-web/src/features/evoting/screens/__tests__/__snapshots__/ViewSingleElection.test.tsx.snap @@ -3591,8 +3591,9 @@ exports[`ViewSingleElection renders correctly non organizers opened election 1`] style={ Object { "alignItems": "center", - "backgroundColor": "#3498db", + "borderColor": "#000", "borderRadius": 8, + "borderWidth": 1, "flexDirection": "row", "marginBottom": 16, "padding": 16, @@ -3600,7 +3601,7 @@ exports[`ViewSingleElection renders correctly non organizers opened election 1`] } > - {"name":"ios-information-circle-outline","size":50,"color":"#fff"} + {"name":"ios-information-circle-outline","size":50,"color":"#000"} @@ -3632,17 +3630,12 @@ exports[`ViewSingleElection renders correctly non organizers opened election 1`] This is an open ballot election, your cast votes will be visible to all members of the LAO. @@ -10417,8 +10410,9 @@ exports[`ViewSingleElection renders correctly organizers opened election 1`] = ` style={ Object { "alignItems": "center", - "backgroundColor": "#3498db", + "borderColor": "#000", "borderRadius": 8, + "borderWidth": 1, "flexDirection": "row", "marginBottom": 16, "padding": 16, @@ -10426,7 +10420,7 @@ exports[`ViewSingleElection renders correctly organizers opened election 1`] = ` } > - {"name":"ios-information-circle-outline","size":50,"color":"#fff"} + {"name":"ios-information-circle-outline","size":50,"color":"#000"} @@ -10458,17 +10449,12 @@ exports[`ViewSingleElection renders correctly organizers opened election 1`] = ` This is an open ballot election, your cast votes will be visible to all members of the LAO. From b5fe0b6a7da51a9ec5663c76cfdd80dd0e4accb8 Mon Sep 17 00:00:00 2001 From: Nico Hauser Date: Fri, 10 Feb 2023 11:37:53 +0100 Subject: [PATCH 2/3] Add background to election notice and remove border --- .../src/features/evoting/components/ElectionVersionNotice.tsx | 3 +-- .../__tests__/__snapshots__/ViewSingleElection.test.tsx.snap | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/fe1-web/src/features/evoting/components/ElectionVersionNotice.tsx b/fe1-web/src/features/evoting/components/ElectionVersionNotice.tsx index 412cc6572d..d8c2cfe887 100644 --- a/fe1-web/src/features/evoting/components/ElectionVersionNotice.tsx +++ b/fe1-web/src/features/evoting/components/ElectionVersionNotice.tsx @@ -15,8 +15,7 @@ const styles = StyleSheet.create({ flexDirection: 'row', alignItems: 'center', - borderColor: Color.primary, - borderWidth: 1, + backgroundColor: Color.contrast, borderRadius: Border.radius, } as ViewStyle, infoText: { diff --git a/fe1-web/src/features/evoting/screens/__tests__/__snapshots__/ViewSingleElection.test.tsx.snap b/fe1-web/src/features/evoting/screens/__tests__/__snapshots__/ViewSingleElection.test.tsx.snap index a7f0fe65d6..1442e1872c 100644 --- a/fe1-web/src/features/evoting/screens/__tests__/__snapshots__/ViewSingleElection.test.tsx.snap +++ b/fe1-web/src/features/evoting/screens/__tests__/__snapshots__/ViewSingleElection.test.tsx.snap @@ -3591,6 +3591,7 @@ exports[`ViewSingleElection renders correctly non organizers opened election 1`] style={ Object { "alignItems": "center", + "backgroundColor": "#fff", "borderColor": "#000", "borderRadius": 8, "borderWidth": 1, @@ -10410,6 +10411,7 @@ exports[`ViewSingleElection renders correctly organizers opened election 1`] = ` style={ Object { "alignItems": "center", + "backgroundColor": "#fff", "borderColor": "#000", "borderRadius": 8, "borderWidth": 1, From c124fc3ae188d87180cd9d3d470c11fb0f89eb60 Mon Sep 17 00:00:00 2001 From: Nico Hauser Date: Thu, 16 Feb 2023 09:19:17 +0100 Subject: [PATCH 3/3] Update ViewSingleElection.test.tsx.snap --- .../__tests__/__snapshots__/ViewSingleElection.test.tsx.snap | 4 ---- 1 file changed, 4 deletions(-) diff --git a/fe1-web/src/features/evoting/screens/__tests__/__snapshots__/ViewSingleElection.test.tsx.snap b/fe1-web/src/features/evoting/screens/__tests__/__snapshots__/ViewSingleElection.test.tsx.snap index 1442e1872c..f9304bdce8 100644 --- a/fe1-web/src/features/evoting/screens/__tests__/__snapshots__/ViewSingleElection.test.tsx.snap +++ b/fe1-web/src/features/evoting/screens/__tests__/__snapshots__/ViewSingleElection.test.tsx.snap @@ -3592,9 +3592,7 @@ exports[`ViewSingleElection renders correctly non organizers opened election 1`] Object { "alignItems": "center", "backgroundColor": "#fff", - "borderColor": "#000", "borderRadius": 8, - "borderWidth": 1, "flexDirection": "row", "marginBottom": 16, "padding": 16, @@ -10412,9 +10410,7 @@ exports[`ViewSingleElection renders correctly organizers opened election 1`] = ` Object { "alignItems": "center", "backgroundColor": "#fff", - "borderColor": "#000", "borderRadius": 8, - "borderWidth": 1, "flexDirection": "row", "marginBottom": 16, "padding": 16,