diff --git a/doc/specification/userspec.md b/doc/specification/userspec.md index efa9f59..60a83e0 100644 --- a/doc/specification/userspec.md +++ b/doc/specification/userspec.md @@ -75,18 +75,26 @@ Note that: The map view shows a map of the streets immediately around their current location, overlaid, on dwellings where canvas has already been done, with icons indicating the voting preference expressed, and with the dwellings where canvassing is still required marked with an icon indicating this: -![Map View](https://raw.githubusercontent.com/simon-brooke/youyesyet/master/dummies/mapview_800.png) +![Map View](https://raw.githubusercontent.com/simon-brooke/youyesyet/master/dummies/mapview.png) Selecting a building on the map leads to -1. On buildings with multiple flats, a schematic view of the flats in the building (I haven't yet really got a good idea how to do this; it may be just a list). Selecting a flat from this view leads to the *Electors View*; +1. On buildings with multiple flats, the *Building View*; 2. On buildings with only one dwelling, the *Electors View*. +## Building View + +A list of dwellings in a building. + +![Building View](https://raw.githubusercontent.com/simon-brooke/youyesyet/master/dummies/building.png) + +Selecting a flat from this view leads to the *Electors View*. + ## Electors View The *Electors View* shows a schematic of the registered electors in a dwelling: -![Electors View](https://raw.githubusercontent.com/simon-brooke/youyesyet/master/dummies/occupants_800.png) +![Electors View](https://raw.githubusercontent.com/simon-brooke/youyesyet/master/dummies/occupants.png) One figure is shown for each elector, labelled with their name. In the dummy pages I've shown gendered stick figures, because I believe that in many casesthis will help the canvasser identify the person who has answered the door; but this may be seen as excluding electors with non-binary gender, and, in any case, I believe we don't actually get gender data (other than salutation) in the electoral roll data. So this may have to be reconsidered. @@ -112,9 +120,18 @@ The *Issues View* is a simple list of issues: | Other | +------------------------------------------------+ +![Issues View](https://raw.githubusercontent.com/simon-brooke/youyesyet/master/dummies/issues.png) + + This list will not be hard-coded but will be dynamic; thus, if we find an issue we didn't predict is regularly coming up on the doorstep an *Administrator* can add it to the list. -Selecting the back button from the *Issues View* returns to the *Electors View*. Selecting any option from the Issues view leads to a single page giving top level points the canvasser can make to the elector on the doorstep, and a link to a *Followup Request* form. There is also a 'back' button allowing the user to return to the *Issues View* +Selecting the back button from the *Issues View* returns to the *Electors View*. Selecting any option from the Issues view leads to the *Issue View*. + +## Issue View + +A single page giving top level points the canvasser can make to the elector on the doorstep, regarding the selected issue; and a link to a *Followup Request* form. There is also a 'back' button allowing the user to return to the *Issues View*. + +![Issue View](https://raw.githubusercontent.com/simon-brooke/youyesyet/master/dummies/issue.png) ## Followup Request form @@ -132,6 +149,8 @@ The *Followup Request* form is a simple form which allows the canvasser to recor | | +------------------------------------------------+ +![Followup Request Form](https://raw.githubusercontent.com/simon-brooke/youyesyet/master/dummies/followup.png) + ## How Street Canvassers will use the system Street Canvassers will typically use the system by diff --git a/dummies/building.png b/dummies/building.png new file mode 100644 index 0000000..ff8fbc3 Binary files /dev/null and b/dummies/building.png differ diff --git a/dummies/building.xcf b/dummies/building.xcf new file mode 100644 index 0000000..4c494bb Binary files /dev/null and b/dummies/building.xcf differ diff --git a/dummies/followup.png b/dummies/followup.png new file mode 100644 index 0000000..768a3d0 Binary files /dev/null and b/dummies/followup.png differ diff --git a/dummies/followup.xcf b/dummies/followup.xcf new file mode 100644 index 0000000..36db36e Binary files /dev/null and b/dummies/followup.xcf differ diff --git a/dummies/issue.png b/dummies/issue.png new file mode 100644 index 0000000..7591d5e Binary files /dev/null and b/dummies/issue.png differ diff --git a/dummies/issue.xcf b/dummies/issue.xcf new file mode 100644 index 0000000..0498dd5 Binary files /dev/null and b/dummies/issue.xcf differ diff --git a/dummies/issues.png b/dummies/issues.png new file mode 100644 index 0000000..1249700 Binary files /dev/null and b/dummies/issues.png differ diff --git a/dummies/issues.xcf b/dummies/issues.xcf new file mode 100644 index 0000000..e6ae96f Binary files /dev/null and b/dummies/issues.xcf differ diff --git a/dummies/mapview.png b/dummies/mapview.png index 1fe15e1..95c419b 100644 Binary files a/dummies/mapview.png and b/dummies/mapview.png differ diff --git a/dummies/mapview.xcf b/dummies/mapview.xcf index cf643e1..1604bec 100644 Binary files a/dummies/mapview.xcf and b/dummies/mapview.xcf differ diff --git a/dummies/occupants.png b/dummies/occupants.png index e1a29ca..78ada06 100644 Binary files a/dummies/occupants.png and b/dummies/occupants.png differ diff --git a/dummies/occupants.xcf b/dummies/occupants.xcf index c584d9a..cdf7b64 100644 Binary files a/dummies/occupants.xcf and b/dummies/occupants.xcf differ diff --git a/project.clj b/project.clj index e248722..0675c14 100644 --- a/project.clj +++ b/project.clj @@ -96,13 +96,10 @@ :closure-warnings {:externs-validation :off :non-standard-jsdoc :off} :externs ["react/externs/react.js"]}}}} - - :aot :all :uberjar-name "youyesyet.jar" :source-paths ["env/prod/clj"] :resource-paths ["env/prod/resources"]} - :dev [:project/dev :profiles/dev] :test [:project/dev :project/test :profiles/test] @@ -133,9 +130,6 @@ :source-map true :optimizations :none :pretty-print true}}}} - - - :doo {:build "test"} :source-paths ["env/dev/clj"] :resource-paths ["env/dev/resources"] diff --git a/resources/public/css/yyy-common.css b/resources/public/css/yyy-common.css index 074e9bd..04fb6a9 100644 --- a/resources/public/css/yyy-common.css +++ b/resources/public/css/yyy-common.css @@ -390,6 +390,10 @@ th { padding-bottom: 2em; } + #issue-text { + font-size: 200%; + } + #main-container { width: 100%; margin: 0; diff --git a/src/cljs/youyesyet/canvasser_app/state.cljs b/src/cljs/youyesyet/canvasser_app/state.cljs index 241752e..d62be6b 100644 --- a/src/cljs/youyesyet/canvasser_app/state.cljs +++ b/src/cljs/youyesyet/canvasser_app/state.cljs @@ -41,18 +41,18 @@ {:id 4 :name "Andy Anderson" :intention :yes}]}]} ;;; a list of the addresses in the current location at which there ;;; are electors registered. - :addresses [{:id 1 :address "13 Imaginary Terrace, IM1 3TE" :latitude 55.8253043 :longitude -4.2570944 + :addresses [{:id 1 :address "13 Imaginary Terrace, IM1 3TE" :latitude 55.8253043 :longitude -4.2569057 :dwellings [{:id 1 :electors [{:id 1 :name "Alan Anderson" :gender :male :intention :no} {:id 2 :name "Ann Anderson" :gender :female} {:id 3 :name "Alex Anderson" :gender :fluid :intention :yes} {:id 4 :name "Andy Anderson" :intention :yes}]}]} - {:id 2 :address "15 Imaginary Terrace, IM1 3TE" :latitude 55.8252354 :longitude -4.2572778 + {:id 2 :address "15 Imaginary Terrace, IM1 3TE" :latitude 55.8252354 :longitude -4.2569077 :dwellings [{:id 2 :electors [{:id 1 :name "Beryl Brown" :gender :female} {:id 2 :name "Betty Black" :gender :female}]}]} - {:id 3 :address "17 Imaginary Terrace, IM1 3TE" :latitude 55.825166 :longitude -4.257026 + {:id 3 :address "17 Imaginary Terrace, IM1 3TE" :latitude 55.825166 :longitude -4.256926 :dwellings [{:id 3 :sub-address "Flat 1" :electors [{:id 1 :name "Catriona Crathie" :gender :female :intention :yes} {:id 2 :name "Colin Caruthers" :gender :male :intention :yes} diff --git a/src/cljs/youyesyet/canvasser_app/views/followup.cljs b/src/cljs/youyesyet/canvasser_app/views/followup.cljs index b81ff58..385ffe4 100644 --- a/src/cljs/youyesyet/canvasser_app/views/followup.cljs +++ b/src/cljs/youyesyet/canvasser_app/views/followup.cljs @@ -41,11 +41,11 @@ (let [issue @(subscribe [:issue]) issues @(subscribe [:issues]) elector @(subscribe [:elector]) - address @(subscribe [:address])] + dwelling @(subscribe [:dwelling])] (js/console.log (str "Issue is " issue "; elector is " elector)) (cond - (nil? address) - (ui/error-panel "No address selected") + (nil? dwelling) + (ui/error-panel "No dwelling selected") (nil? issues) (ui/error-panel "No issues loaded") true @@ -59,7 +59,7 @@ :on-change #(dispatch [:set-elector (.-value (.-target %))])} (map #(let [] - [:option {:value (:id %) :key (:id %)} (:name %)]) (:electors address))]] + [:option {:value (:id %) :key (:id %)} (:name %)]) (:electors dwelling))]] [:p.widget [:label {:for "issue"} "Issue"] ;; #(reset! val (-> % .-target .-value))