Coder Social home page Coder Social logo

mariechatfield / call-my-congress Goto Github PK

View Code? Open in Web Editor NEW
184.0 184.0 14.0 1.64 MB

DEPRECATED. Simple app that displays contact information for US Congress representatives by district.

Home Page: http://www.callmycongress.com/

License: MIT License

HTML 100.00%
congress ember express javascript politics

call-my-congress's People

Contributors

cosst avatar ember-tomster avatar greenkeeper[bot] avatar mariechatfield avatar stardust66 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

call-my-congress's Issues

Add a loading spinner on the search page

Currently, there is no loading feedback on the home (search) page. Most requests don't take too long, but a user has slow or spotty internet connection, they may not know if the request has actually gone through.

Error message on zip 30328

I entered my zip, 30328, on the input screen and received the message “Please provide valid zip code”. 30328 is a valid zip code covering a portion of north Atlanta and Sandy Springs, GA.

An in-range update of request is breaking the build 🚨

☝️ Greenkeeper’s updated Terms of Service will come into effect on April 6th, 2018.

Version 2.84.0 of request was just published.

Branch Build failing 🚨
Dependency request
Current Version 2.83.0
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

request is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push The Travis CI build failed Details

Commits

The new version differs by 6 commits.

  • d77c839 Update changelog
  • 4b46a13 2.84.0
  • 0b807c6 Merge pull request #2793 from dvishniakov/2792-oauth_body_hash
  • cfd2307 Update hawk to 7.0.7 (#2880)
  • efeaf00 Fixed calculation of oauth_body_hash, issue #2792
  • 253c5e5 2.83.1

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Version 10 of node.js has been released

Version 10 of Node.js (code name Dubnium) has been released! 🎊

To see what happens to your code in Node.js 10, Greenkeeper has created a branch with the following changes:

  • Added the new Node.js version to your .travis.yml
  • The new Node.js version is in-range for the engines in 1 of your package.json files, so that was left alone

If you’re interested in upgrading this repo to Node.js 10, you can open a PR with these changes. Please note that this issue is just intended as a friendly reminder and the PR as a possible starting point for getting your code running on Node.js 10.

More information on this issue

Greenkeeper has checked the engines key in any package.json file, the .nvmrc file, and the .travis.yml file, if present.

  • engines was only updated if it defined a single version, not a range.
  • .nvmrc was updated to Node.js 10
  • .travis.yml was only changed if there was a root-level node_js that didn’t already include Node.js 10, such as node or lts/*. In this case, the new version was appended to the list. We didn’t touch job or matrix configurations because these tend to be quite specific and complex, and it’s difficult to infer what the intentions were.

For many simpler .travis.yml configurations, this PR should suffice as-is, but depending on what you’re doing it may require additional work or may not be applicable at all. We’re also aware that you may have good reasons to not update to Node.js 10, which is why this was sent as an issue and not a pull request. Feel free to delete it without comment, I’m a humble robot and won’t feel rejected 🤖


FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of ember-resolver is breaking the build 🚨

☝️ Greenkeeper’s updated Terms of Service will come into effect on April 6th, 2018.

Version 4.5.3 of ember-resolver was just published.

Branch Build failing 🚨
Dependency ember-resolver
Current Version 4.5.2
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

ember-resolver is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push The Travis CI build failed Details

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Bug: Generic error message when wrong zip code is provided

Incorrect addresses are expected to display the error message Could not find valid address. Please double check the street address and zip code.

When searching by zip code alone, the generic Something went wrong. message is displayed for invalid zip codes.

Request Response Body
https://www.callmycongress.com/api/district-from-address?zip=12345 {"translationKey":"UNKNOWN"}
https://www.callmycongress.com/api/district-from-address?zip=12345&street=123%20Main {"translationKey":"INVALID_ADDRESS"}

Both requests should respond with {"translationKey":"INVALID_ADDRESS"}

Improve screen reader accessibility when changing UI

I tested CallMyCongress.com on Safari with VoiceOver, and for the most part everything seemed clearly labelled and decent to navigate.

However, there were two pain points I'd like to address:

  • When you search for a valid address, the error message shows up above the form. There's no alert via the screen reader that new information has appeared, and it's not intuitive to look above your current focus.
  • When the route transitions to a new view (i.e. going from search to district view, or back, or displaying multiple possible districts) there's not good feedback that the view has changed. Going from search to district does change the focus to the starting h1 element, but there's no context.

I think these are both related to the nature of single page apps, but I'm sure I can do something to improve accessibility here.

Possible resources to consider:

DC Addresses Not Accepted

I received the following "Provided URL does not map to a valid state and district number." when I looked up my (non-voting) representative from the District of Columbia. Please ensure that all Americans are able to use this to find their representatives, voting or not.

Return to home page by clicking the header

Allow users to return to the home page (search view) by clicking anywhere on the header bar.

Currently, the only way to get to the home page from a district page is to click the Search Again button, but on smaller devices this button may be pushed down out of view.

An in-range update of sinon is breaking the build 🚨

Version 4.1.6 of sinon was just published.

Branch Build failing 🚨
Dependency sinon
Current Version 4.1.5
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

sinon is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

Commits

The new version differs by 10 commits.

  • 68c37ed Update docs/changelog.md and set new release id in docs/_config.yml
  • cd8ae51 Add release documentation for v4.1.6
  • 29e80be 4.1.6
  • a5c59a5 Update History.md and AUTHORS for new release
  • 0ae60b6 Merge pull request #1653 from mroderick/upgrade-dependencies
  • dcd4191 Upgrade browserify to latest
  • a316f02 Upgrade markdownlint-cli to latest
  • 78ebdb3 Upgrade lint-staged to latest
  • fcf967b Upgrade dependency supports-color
  • 7c3cb4f Enable StaleBot with default configuration (#1649)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Browser Back doesn't work when searching by zipcode

To reproduce:

  • Search for a zipcode that falls within multiple congressional districts (one is 49410)
  • Click one of the suggested congressional districts
  • Use the web browser's Back button

Expected: To be back on the screen I just came from with the list of possible congressional districts.

Actual: I'm back on the home screen with both fields empty and no information about my previous search results.

screenshot

Does not handle states with a single at-large district

Unfortunately, as you can see from the screenshot below, when I tried the website with just the zip code, “something went wrong.” When I typed in the address as well as the zip code, I received a message that says “Provided URL does not map to a valid state and district number.”
I used my home address, so I know it’s correct.

screenshot_error

From a first look at the issue, it seems that the server response is returning a properly formatted response that has no districts:

{"districts":[]}

In addition to fixing whatever the underlying problem is, I'll also need to provide better error handling for this sort of bug in the future.

montana zip not working

I tried looking up rep on https://www.callmycongress.com/ using my zip code - 59937, and several other Montana zip codes including the state captial, Helena (59601) and received the following message...

District number provided does not exist in your state.

I tried it for a Washington state zip and it did work...

https://www.callmycongress.com/WA-2

I am not familiar with the code that callmycongress uses, but did a little looking and found that one of the sites listed at the bottom of the page is whoismyrepresentative.com. I tried the montana zips using the PHP syntax from following page and got no results... http://www.whoismyrepresentative.com/api
Using the zip code lookup on the following page was successful: http://whoismyrepresentative.com/
It returned the following web page: http://whoismyrepresentative.com/search/zip/59937 with the correct reps.

Not sure if any of this is relevant or helpful. Just thought I would let you know that the site is not fully functional.

Feature Request: Provide mailing addresses for representatives

Feature request:

One thing I was hoping to find on it though, would be the addresses of different Congress People's offices, both in DC and in their own districts.

The phone lines have been pretty jammed for most Congressional offices since the election (a great thing!). So having that physical address helps to send a letter that is harder to ignore than an email and gets tracked in the office.

I also love supporting the post office!

In the theme of keeping things simple, I'm not sure adding extra information to each row in the districts page is the right direction. A few possible solutions:

  • Link out to each representative's full profile on GovTrack.us, or their website
  • Create a new view for each representative, with more detailed information. Could use same GovTrack.us API currently being used, even use the same ID. i.e. /person/:id. For Sen. Barbara Boxer: https://www.govtrack.us/api/v2/role?id=3853

Nodemon in restart loop

Hi there! I just forked your repo and ran locally yesterday. I ran into issues with starting the backend before the frontend - nodemon just ends up in this restart loop then errors out. Starting the frontend before backend is fine, tho Nodemon seems to restart more with changes than it should. It looks like adding ignore flags on line 16 of the package.json start script helps this

    "backend": "PORT=3000 nodemon backend/app/server.js --ignore tmp/ --ignore app/",

Let me know if you see this on your end too - I'm happy to put in a PR.

Add representative websites

Request via email:

Is it possible to add the legislator's email address and official webpage to the search results?

Unfortunately, GovTrack.us's API does not expose email addresses for representatives. However, it does provide websites. That information should already be passed from the server, so a small change in the client is the only thing needed to display this additional information.

Reference:
Role API
Person API

Long Run: Replace GovTrack.us API usage before it is deprecated

At some point in the future, GovTrack.us will deprecate its APIs (possibly summer 2017).

ProPublica offers an API that can look up current members by state or district. However, at this time that API does not expose phone numbers (but it does offer Twitter handles).

whoismyrepresentative.com exposes phone numbers via its API, and is currently used by call-my-congress to look up districts by zip code alone. However, the API does not have an option to search by district, and it is unclear who owns the site or how to get updates on API changes. May also want to consider replacing current dependence on this site for the zip code to district lookup.

Both the House and Senate expose contact information of members by XML, and both do include DC phone numbers. However, it doesn't look like there's a way to get a subset of the list by district or state.

Possible option: every new election, spend some time mapping data provided by the House and Senate into some database (maybe Firebase?). Would be more time overhead and more prone to error. But that might also be an option to help provide local office numbers (#3) if I can't find an API that provides them.

There are no immediate plans to deprecate GovTrack.us' API, but this is something to consider and keep in mind. Please add any thoughts or suggestions for other APIs here if you know of any!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.