Skip to content

Commit

Permalink
chaser
Browse files Browse the repository at this point in the history
  • Loading branch information
windoverwater committed Feb 15, 2024
1 parent 797d8c1 commit 79ed059
Show file tree
Hide file tree
Showing 2 changed files with 81 additions and 50 deletions.
55 changes: 17 additions & 38 deletions docs/DesignNotes.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,10 @@
# Initial Design Thoughts Regarding a Client Side UI/UX

## Background

The current design target is to create something in a few weeks for a June 8th live demo. The date and skill level are driving the client UI side design and implementation.

Currently, the current tech choice to achieve this is plain html, css, and javascript leveraging Google's devtools and Microsoft's Visual Studio Code.

See the VoteTracker+ [project page](https://github.com/orgs/TrustTheVote-Project/projects/2/views/1) for status.

## Uber Context

Summary and a duplication from other sources:

The [VTP-dev-end](https://github.com/TrustTheVote-Project/VTP-dev-env) holds/defines the development/run-time environment. Contained within VTP-dev-end as submodules are three repos:
- [VTP-mock-election.US.15](https://github.com/TrustTheVote-Project/VTP-mock-election.US.15) - contains the election configuration and data
- [VTP-web-api](https://github.com/TrustTheVote-Project/VTP-web-api) - contains the FASTapi rest interface
- [VoteTrackerPlus](https://github.com/TrustTheVote-Project/VoteTrackerPlus) - contains the python backend code

This repo, [VTP-web-client](https://github.com/TrustTheVote-Project/VTP-web-client) contains the client frontend/UI/UX

See [DesignNotes.md](https://github.com/TrustTheVote-Project/VTP-web-api/blob/main/docs/DesignNotes.md) in the VTP-web-api repo for details on the rest api.
# VoteTracker+ Client Side UI/UX Design Notes

## User Story 1 - landing page

#### What happens when a client (smart device browser of choice) initially connects to the VTP demo?

Displays a short welcome and help message that briefly explains the standard contest buttons. There is only one active button on the page, __continue__. Activating that continues to step 2.
Displays a short welcome and help message that briefly explains the standard contest buttons. There is only one active button on the page, __CONTINUE__. Activating that continues to step 2.

## User Story 2 - voting

Expand All @@ -46,21 +25,21 @@ If IRV/RCV:

Common buttons/actions/UI:

- there is a __de-select all__ button somewhere in the lower left portion of the page
- there is a __continue__ button somewhere in the lower right portion of the page
- there is a __DE-SELECT ALL__ button somewhere in the lower left portion of the page
- there is a __CONTINUE__ button somewhere in the lower right portion of the page
- if the continue button is activated and there is an undervote situation, a warning window appears that allows the user to go to the next contest or stay with the current contest
- across the top is a horizontal progress bar divided into equal width sections by contest
- each contest is clickable and takes the user to that contest
- if there is an undervote in the current contest, a proceed-able warning window appears
- in the completion bar, completed contests are solid bright green, undervote contests are solid somewhat dimm yellow, and no-vote or undervote contests that are to the left of any green or yellow contest are red outlined boxes.
- immediately below the progress bar in the left corner is a __previous contest__ button
- immediately below the progress bar in the right corner is a __next contest__ button
- when the last contest in focus, the upper right button says __checkout__
- when the __checkout__ box is clicked, all the contests are displayed with only two buttons: __go-back__ and __this-is-my-vote__
- __go-back__ goes to the previous page with the checkout box in the upper right
- __this-is-my-vote__ submits the ballot
- immediately below the progress bar in the left corner is a __PREVIOUS CONTEST__ button
- immediately below the progress bar in the right corner is a __NEXT CONTEST__ button
- when the last contest in focus, the upper right button says __CHECKOUT__
- when the __CHECKOUT__ box is clicked, all the contests are displayed with only two buttons: __GO BACK__ and __THIS IS MY VOTE__
- __GO BACK__ goes to the previous page with the checkout box in the upper right
- __THIS IS MY VOTE__ submits the ballot

Note that the backend python server side will re-validate the incoming ballot CVR. The __this-is-my-vote__ entrypoint can return various errors to the user:
Note that the backend python server side will re-validate the incoming ballot CVR. The __THIS IS MY VOTE__ entrypoint can return various errors to the user:

- a non compliant contest selection was found
- there was a problem on the server side
Expand All @@ -70,8 +49,8 @@ If there is no error, the endpoint returns:
- the voter's ballot check as if it were paper (no links) but with the QR code being a valid link (into the voter's backend server's still active git workspace)
- the voter's row offset into the ballot check is temporarily displayed
- in addition there is, for demo purposes only, two additional buttons on this page
- a __verify-ballot-receipt__ button
- a __tally-contests__ button
- a __VERIFY BALLOT RECEIPT__ button
- a __TALLY CONTESTS__ button

## User Story 3 - inspecting the ballot check/QR code

Expand All @@ -83,14 +62,14 @@ Displays the git repo copy of the contents of the ballot check. All the digests

#### What happens when the user wants to verify their ballot check?

The user clicks the __verify ballot receipt__ (end of User Story 1) and a new page displays the 'console log' output of that function with digests hyperlinked. The output page contains a few by default blank fields that the user can optionally fill in. One of them is a row offset.
The user clicks the __VERIFY BALLOT RECEIPT__ (end of User Story 1) and a new page displays the 'console log' output of that function with digests hyperlinked. The output page contains a few by default blank fields that the user can optionally fill in. One of them is a row offset.

The page contains a __re-verify__ button that re-verifies the receipt honoring the new values in the various fields.
The page contains a __RE-VERIFY__ button that re-verifies the receipt honoring the new values in the various fields.

## User Story 5 - tallying the election

#### What happens when the user wants to tally the election?

The user clicks the __tally contests__ button (end of User Story 1) and a new page displays the 'console log' output of that function with digests hyperlinked. The output page contains a few by default blank fields that the user can optionally fill in. One of them is a row offset.
The user clicks the __TALLY CONTESTS__ button (end of User Story 1) and a new page displays the 'console log' output of that function with digests hyperlinked. The output page contains a few by default blank fields that the user can optionally fill in. One of them is a row offset.

The page contains a __re-tally contests__ button that re-tallies the election honoring the new values in the various fields.
The page contains a __RE-TALLY CONTESTS__ button that re-tallies the election honoring the new values in the various fields.
76 changes: 64 additions & 12 deletions docs/ProjectPlan.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,74 @@
## Project Plan
# VoteTracker+ Client Side UI/UX Project Plan

The basic idea is to stub out static versions of the various pages and write the javascript to support not. Then incrementally add support for a deeper and deeper integration with the web-api. The web-api hopefully will not need major changes.
#### 1. Background

1. Create just the controls and UI without dealing with any JSON data - just get the UI controls going
The current design target is to create a usable client/voter frontend in a few weeks for a June 8th live demo. The date and available skill level are driving the client UI side design and implementation.

2. Add JSON decoding support and integrate with static JSON data. This includes reading and sending JSON.
The current tech choice to achieve this is a plain html, css, and javascript implementation. The current development environment is Google's devtools, Microsoft's Visual Studio Code, and emacs :-).

3. Start plugging in the web-api and to start using actual live JSON data from the web-api
See the VoteTracker+ [project page](https://github.com/orgs/TrustTheVote-Project/projects/2/views/1) for status.

4. Start debugging live tests
#### 2. Overall VTP Git Repo Context

#### Tiemline
Summary of the VTP git repo's:

Working backwards, need to complete all four of the above by end of may. Completion means that the live demo is running without significant issues on a stand along router. Working backwards:
The [VTP-dev-end](https://github.com/TrustTheVote-Project/VTP-dev-env) holds/defines the development/run-time environment. Contained within VTP-dev-end as submodules are three repos:
- [VTP-mock-election.US.15](https://github.com/TrustTheVote-Project/VTP-mock-election.US.15) - contains the election configuration and data
- [VTP-web-api](https://github.com/TrustTheVote-Project/VTP-web-api) - contains the FASTapi rest interface
- [VoteTrackerPlus](https://github.com/TrustTheVote-Project/VoteTrackerPlus) - contains the python backend code

- Completion of #1: 02/21 (1 week)
- Completion of #2: 03/21 (4 weeks)
- Completion of #3: 04/17 (4 weeks)
- Completion of #4: 05/01 (2 weeks)
This repo, [VTP-web-client](https://github.com/TrustTheVote-Project/VTP-web-client) contains the client frontend a.k.a. the voter's /UI/UX

See [DesignNotes.md](DesignNotes.md) in this repo for details on the end user (voter) user stories

#### 3. Basic Project Plan

The basic project plan is to stub out static versions of the various pages and write the javascript to support that. Then incrementally add support for deeper integrations with the restful web-api. The web-api hopefully will not require major work at this point.

The four major milestones are:

1. Create just the controls and UI without dealing with any JSON data - just get the basic html/css/JS UI controls for the five web pages (see below) working.

2. Add JSON decoding support and integrate with static JSON data. This includes reading and sending (static) JSON to a stubbed out backend.

3. Plug in the web-api and use actual live JSON data from the web-api

4. Full end-to-end testing of the demo

#### 4. Timeline

To achieve the demo all four of the above major milestones need to be completed by end of may. Project completion means that the live demo is running without significant issues on a standalong router disconnected from any WAN. Thus:

- Completion of milestone 1: 02/21 (1 week)
- Completion of milestone 2: 03/21 (4 weeks)
- Completion of milestone 3: 04/17 (4 weeks)
- Completion of milestone 4: 05/01 (2 weeks)

which leaves 3 weeks of buffer

#### 5. File layout (this git repo <-> end user web server)

Given the decomposition into [5 user stories](./DesingNotes.md), out-of-the-gate associate different html pages with each user story.

1. index.html
- the landing page
- one js button that jumps to the (next) voting.html page
2. voting.html
- handles a single contest
- provides navigation to previous, next, other contests (same page), and to the checkout.html page
- provides progress status
3. checkout.html
- allows the voter to double check their ballot prior to casting
- does not support editing the ballot
- provides three options: spoil ballot (exit), edit ballot (back to voting.html), and submit/cast ballot
4. ballot check displaying
- either create the JS to retrieve the data from the web-api (new endpoint), creating an explicit ballot-check.html
- or standup a http server running somewhere that is pointing to the repo of interest for the demo. This would probably require changing the upstream remote git repo URI to the demo LAN local git server, which would be ok as it would completely isolate the demo.
5. verify-ballot-check.html
- handles the output of the ballot check function (basically console log output)
- supplies various end user functions associated with verify their ballot check - a UX TBD
6. tally-election.html
- handles the output of tallying the election (basically console log output)
- initial UX target is to supply a few buttons for enabling switches and converting digests to links (back to the local LAN git server or the upstream remote - see 3 above)

Regarding css and javascript, created as needed in standard locations.

0 comments on commit 79ed059

Please sign in to comment.