Code Monkey home page Code Monkey logo

representable / representable Goto Github PK

View Code? Open in Web Editor NEW
15.0 4.0 6.0 418.37 MB

We’re creating maps of communities to fight for fair representation. Add your community to the map today and make your voice heard.

Home Page: https://representable.org

License: GNU General Public License v3.0

Python 30.16% JavaScript 28.03% HTML 36.76% CSS 4.45% Shell 0.37% PowerShell 0.14% Xonsh 0.09% Procfile 0.01%
mapbox django geodjango heroku postgres javascript react

representable's Introduction

Representable

Representable is creating maps of communities to fight for equal and impartial representation. The core web app is written in Django with Javascript/HTML/CSS frontend and Postgres/PostGIS backend. Our mapping & visualization app, currently in beta, is written in React & built using createreactapp and Material UI.

code style: prettier License: MIT

Documentation

Check out our Docs site for a guide to installing Representable and contributing to various parts of the site. If you find any issues, we would love to know! Please open an issue request for any incomplete documentation.

General Issue Reporting

For bug reports and general feature requests, please open a Github issue. We welcome all feedback and suggestions!

Reporting Security Issues

We take security very seriously at Representable.org. Please send an email to [email protected] with any security issues and we'll open a private issue request with your concerns. We aim to respond to all security issues in a timely manner.

Active Contributors

Our core team of engineers is currently 6 members strong, though we've been supported by many others along the way. See more about our team and how we work at representable.org/about

  • Somya Arora
  • Kyle Barnes
  • Chukwuagoziem Uzoegwu
  • Jason Yuan
  • Anna Eaton
  • Izzy Zaller

Founders

Representable began as a final project for Princeton University course Advanced Programming Techniques, taught by Brian Kernighan. The original project team is:

  • Theodor Marcu
  • Lauren Johnston
  • Preeti Iyer
  • Somya Arora
  • Kyle Barnes

License

Representable is under the GPL-3.0 License.

representable's People

Contributors

aceaton avatar amilich avatar arorasomya avatar chuk116 avatar chuk413 avatar dependabot[bot] avatar etedward avatar indraneel avatar izaller avatar jasony123123 avatar jessiejofielding avatar k-y-le avatar lauren-johnston avatar natastro avatar nshapiro23 avatar okusio avatar psiyer7 avatar theodormarcu avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

representable's Issues

Email verification doesn't work on local dev environment

Describe the bug
Email verification was in settings/base.py and so locally I wasn't able to sign in due to email verification issues.

To Reproduce
Steps to reproduce the behavior:

  1. Login locally or try to create an account
  2. See error

Screenshots

Screen Shot 2020-05-20 at 1 11 07 PM

Video Guides

  • w/ updated interfaces
  • video version of User Flows
  1. entire flow --> longer sequences as promo
  2. specific feature flows for embedding in help pages, etc

Need a security issue tracker

We need a way for people to privately report potential vulnerabilities and track them. This could be in a form or similar.

Better Form Validation

The form validation system is janky. If the user makes a mistake with the form, there are some bits of inconsistent behavior:

  • If they forgets to fill a field, that field will be validated by the browser and it will force to user to take a look (desirable).
  • If the user makes a mistake with the map, a custom message will appear (desirable), but if they try to submit it, all sections collapse (undesirable).

Describe the solution you'd like
Form validation should be redone from the ground-up, according to the new form. This includes showing a list of errors at the beginning of the page (on page refresh), expanding sections with errors, describing errors, etc.

First, we should have some custom validation for these things on form submit. This is client-side validation, done through a JS listener. Additionally, we should also ensure that any validation that should happen in forms.py happens there. Currently, the only possible validation is for kinks in the polygon, which works great. Howver, we may want to add more descriptive messages for map errors, address fields, etc.

Front Page CSS Issues

Describe the bug
Numerous errors appear on the front page because of missing CSS. Introduced by PR #108

To Reproduce
Steps to reproduce the behavior:
Go to the front page and check console.

Expected behavior
No errors should be triggered.

Improve organization/partner flow

  • Add another section on the front-page below state-selector for organizations.
    “Are you the leader of the organization?”

  • Add different coloring/signaling to showcase that it’s different from the user flow so normal users don’t get confused.

  • Clarify that you’re only doing this if your organization is not here.

  • Clarify that this is only for organization leaders.

Unclear error when invalid phone number

Describe the bug
If you enter in an invalid phone number on the new entry page, there is no error message and it's unclear where the error occurs (goes back to search part of page)

To Reproduce
Steps to reproduce the behavior:

  1. Draw entry map
  2. Include an invalid phone number (+61 on my australian number did it for me)
  3. Press submit entry

Expected behavior
Highlight the phone number part of the form

Too big of a polygon (memory issue) and reloading of page with polygon drawn past the blurring

Describe the bug
Refresh issues with the entry page, blurring, prefilling out text and map from before - need to look more into this.

To Reproduce
Steps to reproduce the behavior:
create a really big polygon
submit
the page will likely reload because the polygon is bigger than the limit in terms of storing the boundary in db?
the page reloads with everything blurred and the polygon already drawn on the map

Expected behavior
it shouldn't reload bc of memory issues - maybe need to increase db limit per entry
if reloading happens because of other errors, then the blurring needs to be removed

Additional context
Add any other context about the problem here.

Entry Page: Free Draw Tool (Not Polygons)

A few users mentioned that they want a tool like the one that can be used on Zillow. This would make it easier to draw borders around natural structures (e.g. lakes/parks/etc)
Screen Shot 2020-05-06 at 18 43 20

Update Front End For Entry Page

Is your feature request related to a problem? Please describe.
Users are confused about filling the form and the form state. This is particularly important for adding new fields.

Describe the solution you'd like
The form should contain collapsible sections a la Typeform that guide the user. The form should still be easy to look at with all sections open.

Additional context
Discussions with partners. Mentioned in Roadmap for MI2.

Add the ability for an individual to share their map submission

Right now we can link to an individual submission (/submission?map_id=...)

An individual submitter should be able to download their entire submission (map area + survey responses) in a format that they can freely share, such as a PDF. The point is to allow people to download/export their human-readable responses.

This is not in reference to bulk access or app-to-app access, which is covered in #52

Entry Page on Failed Submit Does Not Highlight Census Blocks

Describe the bug
If the form submission fails for any reason, the map does not highlight the right census blocks.

To Reproduce
Steps to reproduce the behavior:

  1. Fill entry form.
  2. Write text for phone number (example).
  3. Submit.
  4. Check map. Map will only show user poly, but not census blocks.

Expected behavior
Map should show both user poly and census blocks.

Screenshots
Screen Shot 2020-05-21 at 23 15 52

"Contribute" and "partner with us" buttons difficult to navigate

Feedback: "Contribute" sounds like we are asking them to donate. "Partner with us" unclear that it is for orgs. Potential response: make one "get started" button -> triage people from there to a new page. Main user flows: 1) draw community 2) create organization and maybe 3) create campaign to collect submissions. Need to discuss best way to triage people by state as well.

export entries

Received feedback on 5/6/20 that exporting to shapefiles/geojson is crucial.

Map highlight on public map page disappears after hover

Describe the bug
On the map page, hovering over a community makes the community outline temporarily bolder and then removes the outline when the user stops hovering. (This is a very small bug but I just wanted to document it while I remembered!)

To Reproduce
Steps to reproduce the behavior:

  1. Go to public map page "/map"
  2. however a community
  3. see how outline disappeared

Expected behavior
Outline remains after hover. Seems like the review page works this way and the outline remains.

Screenshots
Screen Shot 2020-05-10 at 10 30 16 PM

My Entries Page Deletion Form Is Not Working Well

When I took out Andrew's stuff in issue #69, I left the entry deletion form as it was. Unfortunately, it seems that the way the post request works is not well thought out and you need to press twice to make it work.

Searching for location on entry page should automatically go to next step

Describe the bug
When searching for a starting location on the entry page, there isn't any signifier that the search went through without pressing next.

To Reproduce
Steps to reproduce the behavior:

  1. Search for community (press enter)
  2. nothing happens lol

Expected behavior
automatically go to map page

Testing CI does not work with Geo library requirements

Because the requirements.txt contains Geo libraries that need to be installed separately via brew etc., testing fails when done via Github CI. I tried to create requirements_test.txt to get around this but ultimately this is only a temporary fix to get around the problem.

Add additional community identifying questions

Is your feature request related to a problem? Please describe.
Users need to be able to add more specific information about their community's interests.

Describe the solution you'd like
I think this request can be split into two parts:
A) they want some kind of community-identifying questions before asking for a map entry
B) they want their specific questions to be those community identifying questions
At minimum, I think they make a good point about part (A) — it might help people to think about their community first in order to think about the geography of that community. Part (B) might have some value too but I think we can figure that out later
-- @indraneel

Describe alternatives you've considered
Discussed using tags, other issue categories. Ultimately, it seems like free form text is the best way to gather COI submissions.

Additional context
81345458-859e8f80-9086-11ea-8fb0-5fc722daf58f

image

census blocks not loading on review page

Describe the bug
census blocks only load for michigan, pennsylvania, virginia, and new jersey on review page

To Reproduce
Steps to reproduce the behavior:

  1. Go to representable.org/review
  2. zoom out

Expected behavior
Census blocks + legislative lines off by default, toggle on shows for all states
(future: state by state map views? which would toggle census blocks based on the state)

Add modified campaign model to dashboard

Is your feature request related to a problem? Please describe.
There's currently no way to specify a data collection period for an organization.

Describe the solution you'd like
We would like to be able to set the scope of data collection and create a custom entry page link for it. Furthermore, we would like to simplify the campaign model to a very basic feature subset for now:

  • id: uuid for campaigns
  • name: name of the campaign
  • state: the state of the campaign
  • description: description of the campaign
  • organization: organization hosting the campaign
  • is_active: is the campaign active
    Additional context
    See campaign spec doc.

Polygon area too big

Describe the bug
Too big of an area for polygon for upper michigan parts - maybe make the area particular to a state?

To Reproduce
Steps to reproduce the behavior:
make a really big polygon

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.