Skip to content
This repository has been archived by the owner on Nov 3, 2020. It is now read-only.

New sample ballot and associated tweaks #89

Merged
merged 25 commits into from
Mar 5, 2019
Merged

Conversation

benadida
Copy link
Contributor

started building up the new sample ballot.

@beausmith would love your thoughts on how best to size the SVG for the seal. It appears in two places on the ballot and needs different sizing, so seems like SVGs that have built-in width/height might be tricky, but then again I'm not an SVG expert.

@netlify
Copy link

netlify bot commented Feb 28, 2019

Deploy preview for vw-bmd ready!

Built with commit c27c604

https://deploy-preview-89--vw-bmd.netlify.com

@benadida
Copy link
Contributor Author

with the tests heavily dependent on the simple Mickey Mouse / Minnie Mouse ballot, for now I'm leaving that file in there. It was in public/data/election.json as a duplicate of src/data/election.json, now I've only modified src/data/election.json and left the public/data/election.json file for testing. May want to rename this, but before I go too far, I'll wait for @beausmith's thoughts.

@beausmith
Copy link
Contributor

I think it'd be great to use a less mousey sample.

I just made a bunch of changes to the *election.json files. Let's approve/merge these PRs first… then let’s apply these changes and replace Mickey and Minnie everywhere.

@beausmith
Copy link
Contributor

Re: SVG - they are vectors and scale very well. To make them resizable:

  • remove the width and height attributes .
  • add a viewBox attribute with 0 0 111 222, where 111 is the width and 222 is the height.

@beausmith
Copy link
Contributor

Also, compress every SVG with this: https://jakearchibald.github.io/svgomg/

@beausmith
Copy link
Contributor

Also, SVG images can have "alt" text (or aria-label) which is read by the screen reader… thus we can remove aria-label="State Seal."

@benadida benadida requested a review from beausmith March 1, 2019 06:56
@benadida benadida changed the title WIP: New sample ballot New sample ballot and associated tweaks Mar 1, 2019
src/config/types.ts Outdated Show resolved Hide resolved
src/data/electionSample.json Show resolved Hide resolved
src/data/electionSample.json Show resolved Hide resolved
src/data/electionSample.json Show resolved Hide resolved
src/data/electionSample.json Show resolved Hide resolved
src/App.test.tsx Show resolved Hide resolved
const Q1Candidates = electionSample.contests[0]!.candidates
const Q1Candidate1 = Q1Candidates[0]!.name
const Q1Candidate2 = Q1Candidates[1]!.name
const Q1Candidate3 = Q1Candidates[2]!.name
Copy link
Contributor

@beausmith beausmith Mar 3, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm getting errors and warnings here too:

image

src/App.test.tsx Outdated Show resolved Hide resolved
src/data/electionSample.json Show resolved Hide resolved
src/data/electionSample.json Outdated Show resolved Hide resolved
@benadida
Copy link
Contributor Author

benadida commented Mar 5, 2019

this introduces new work that needs to be done --> #100

@benadida
Copy link
Contributor Author

benadida commented Mar 5, 2019

@beausmith there is one issue I can't quite figure out, which is how to enforce that tests are typescript-checked. Appears to be a limitation with a workaround I can't quite find.

Let me know if you're game to merge this before we figure it out, certainly happy to fix typescripting of tests once we can figure out how to make it part of the build process.

I believe I addressed everything else, without trying to make id and title match. In the end, I went with your earlier suggestion of having a mandatory title for all contests, because it's really needed in the review screen anyways.

@benadida benadida requested a review from beausmith March 5, 2019 07:28
@beausmith
Copy link
Contributor

beausmith commented Mar 5, 2019

I have been aware of tsc, but hadn't used it until now.

If I run tsc in the root project directory of this branch I get the errors output the console.

Please do the following:

  1. Approve either CI checks for Typescript errors. #101, Typescript should return no errors when commiting. #102, or both!
  2. Merge the PR(s) to master.
  3. Rebase this branch on master.
  4. Fix errors.
  5. Request review.

Copy link
Contributor

@beausmith beausmith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@benadida benadida merged commit aed353c into master Mar 5, 2019
@beausmith beausmith deleted the new-sample-ballot branch March 7, 2019 21:17
@beausmith
Copy link
Contributor

Resolves #114

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants