From 9ff1feb0359e35669b7384fd7a7b309fa07a68c0 Mon Sep 17 00:00:00 2001 From: Dale John McGrew Date: Thu, 25 Feb 2016 12:18:59 -0800 Subject: [PATCH] Made the entire CandidateItem div a link (per original designs). Changed "support/oppose" language in cases where we are using ratings. Added "source" under Vote Smart ratings. Changed "My Ballot" to "My Voter Guide", and added "demo version" per Jenifer's requests. Added "My Voter Guide" link to left menu. Added indicator in both ItemActionBar's for when the voter supports or opposes something. Did some ES lint clean up. Added _position stylesheet. Added text offering test address. --- src/js/components/Ballot/CandidateItem.jsx | 87 ++++++++++--------- src/js/components/Ballot/PositionItem.jsx | 9 +- src/js/components/Header.jsx | 10 ++- src/js/components/ItemActionBar2.jsx | 12 +-- src/js/components/ItemActionbar.jsx | 4 +- .../components/LanguageSwitchNavigation.jsx | 20 ++--- src/js/components/MoreMenu.jsx | 32 ++----- src/js/routes/Ballot/Candidate.jsx | 18 ---- src/js/routes/Ballot/EmptyBallot.jsx | 16 +++- src/js/routes/Intro/IntroContests.jsx | 2 +- src/js/routes/More/About.jsx | 3 +- src/js/routes/Settings/Location.jsx | 10 ++- src/sass/components/_candidate.scss | 15 +++- src/sass/components/_itemActionbar.scss | 6 ++ src/sass/components/_position.scss | 7 ++ src/sass/main.scss | 1 + 16 files changed, 133 insertions(+), 119 deletions(-) create mode 100644 src/sass/components/_position.scss diff --git a/src/js/components/Ballot/CandidateItem.jsx b/src/js/components/Ballot/CandidateItem.jsx index e311d5da4..9440114ab 100644 --- a/src/js/components/Ballot/CandidateItem.jsx +++ b/src/js/components/Ballot/CandidateItem.jsx @@ -76,49 +76,52 @@ export default class Candidate extends Component { we_vote_id={we_vote_id} is_starred={this.props.is_starred || false } /> -
-
- - {/* adding inline style to img until Rob can style... */} - { - candidate_photo_url ? - - candidate-photo : - - - - } -
-
-

- - { ballot_item_display_name } - -

-
    -
  • - - { this.state.supportCount }  - support - -
  • -
  • - - { this.state.opposeCount }  - oppose - -
  • -
+ + {/* Note: We want a click anywhere in this div to take you to the candidate page */} +
+
+ + {/* adding inline style to img until Rob can style... */} + { + candidate_photo_url ? + + candidate-photo : + + + + } + +
+
+

+ { ballot_item_display_name } (more) +

+ Summary of opinions you follow: +
    +
  • + + { this.state.supportCount }  + positive + , +
  • +
  • + + { this.state.opposeCount }  + negative + +
  • +
+
-
+ ; } diff --git a/src/js/components/Ballot/PositionItem.jsx b/src/js/components/Ballot/PositionItem.jsx index 985c9169b..c7f652d55 100644 --- a/src/js/components/Ballot/PositionItem.jsx +++ b/src/js/components/Ballot/PositionItem.jsx @@ -36,17 +36,17 @@ export default class PositionItem extends Component { if (position.hasOwnProperty("is_oppose") && position.hasOwnProperty("is_support") && position.is_oppose === position.is_support){ console.log("Both positions true:", this.props.position_we_vote_id); - supportText = "Information about"; + supportText = "rates"; } else if (position.is_oppose) { - supportText = "Opposes"; + supportText = "rates"; } else if (position.is_support) { - supportText = "Supports"; + supportText = "rates"; } var dateStr = this.props.last_updated; var dateText = moment(dateStr).startOf("day").fromNow(); - return
+ return
{/* One organization"s Position on this Candidate */}
  • @@ -69,6 +69,7 @@ export default class PositionItem extends Component {
    {position.statement_text} + (source: VoteSmart.org)
    {/* Likes coming in a later version
    diff --git a/src/js/components/Header.jsx b/src/js/components/Header.jsx index 5fff67bb7..facc23eaf 100644 --- a/src/js/components/Header.jsx +++ b/src/js/components/Header.jsx @@ -59,7 +59,8 @@ export default class Header extends Component {

    - My Ballot + My Voter Guide + demo version