Giter VIP home page Giter VIP logo

democracy.io's People

Contributors

b-carter avatar chrisantaki avatar eff-test avatar emma-sg avatar hainish avatar hp4k1h5 avatar jkup avatar mfb avatar randylubin avatar sdn90 avatar sinak avatar tariqajyusuf avatar tas50 avatar vbrown608 avatar volker-e avatar wioux 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

democracy.io's Issues

add piwik tracking code

We'd like to add piwik tracking code to the page templates.

We don't necessarily want this tracking code to show up on every installed instance, so it might make sense to put this snippet in a local config file? But, if it's in every instance, it's not the end of the world.

<div id="anon-stats">
  <noscript>
    <img src="https://anon-stats.eff.org/piwik.php?idsite=21&amp;rec=1" style="border:0" alt="" />
  </noscript>
  <script>
    document.getElementById('anon-stats').innerHTML = '<img src="https://anon-stats.eff.org/piwik.php?idsite=21&amp;rec=1&amp;urlref='+encodeURIComponent(document.referrer)+'&amp;action_name='+encodeURIComponent(document.title)+'" style="border:0" alt="" />';
  </script>
</div>

Problem with angular-inview

We're using angular-inview to autoplay the video when users scroll down, and also (hopefully) to animate the icons in the "read more" section of the home page. ng-inview is suppose to support the $event and $inviewpart in its directive, but neither of those variables seem to be getting passed correctly to the controller.

So, for example this line:

<img class="img-responsive" src="/static/{CONFIG.VERSION}/img/icon-plane.svg" in-view="animate($event,$inview,$inviewpart)" >

Should be triggering a console.log here:

  $scope.animate = function(a,b,c){
    console.log(a,b,c);
  };

But a and c are both always undefined.

The same is happening with the video slightly higher up the page, where this line should be passing variables in address-form.js.

  $scope.autoplayVideo = function(event, inview, inviewpart) {
    console.log(event,inview,inviewpart);
    ...

I thought it might be because we weirdly have the same controller twice on the same view (once from the route, but then again because video.dust is included in index.dust, but I tried removing video.dust and had the same problem.

So basically I'm stumped. @l12s, @randylubin -- if one of you could take a look at it, I'd really appreciate it.

Meta issue: Accessibility audit

At some point we should check that the site is compatible with various assistive technologies and other accessibility standards. (EFF has at least one volunteer who has helped us out with accessibility testing, who might have time to look at this site)

no error message on invalid address; also: accept "invalid" addresses

if you submit an invalid address, the form just sits there. We should notify the user if the address is invalid.

Note: SmartyStreets can work with at least some invalid addresses via the X-Include-Invalid: true header. Not sure if d.io uses this header? In my testing, I think it's a good idea.

E.g. https://smartystreets.com/demo?street=3596%20Foothill%20Rd&city=Santa%20Barbara&state=CA&zipcode=undefined

See also https://github.com/EFForg/actioncenter-dontuseforissues/issues/414

Add a note about gendered titles

Members of Congress require you to submit a gendered title. EFF believes the options provided are limiting and we are looking into alternatives.

3.7 MB minified javascript dio.min.js

The site has a 3.7 MB minified javascript. This is big enough that could cause a problem if the site went viral. Also of course has performance implications for page load time.

Sending a message returned me to the form.

I tried to send a short (one or two line) message to Congress (California Senators and Barbara Lee, specifically) and it returned me to the form rather than showing me a success message. It worked after I added another paragraph of text.

Cache-Control max-age=0

Assets are being served with Cache-Control:public, max-age=0 header, which means they won't be cached by browsers, or a reverse proxy we'd like to add to the stack.

(I usually prefer that the app maintain the logic of how long various URLs can be cached, rather than putting all that logic in the config for our load balancer or CDN to rewrite the headers, because URLs change, caching logic changes, etc.)

Running gulp serve sometimes throws an EADDRESSINUSE err

Server listening on http://localhost:3000
events.js:85
throw er; // Unhandled 'error' event
^
Error: listen EADDRINUSE
at exports._errnoException (util.js:746:11)
at Server._listen2 (net.js:1156:14)
at listen (net.js:1182:10)
at Server.listen (net.js:1267:5)
at module.exports.plugin (/Users/leah/git/democracy.io/node_modules/browser-sync/lib/server/index.js:24:25)
at Object.module.exports.startServer as fn
at /Users/leah/git/democracy.io/node_modules/browser-sync/lib/browser-sync.js:149:14
at iterate (/Users/leah/git/democracy.io/node_modules/browser-sync/node_modules/async-each-series/index.js:8:5)
at /Users/leah/git/democracy.io/node_modules/browser-sync/node_modules/async-each-series/index.js:16:16
at executeTask (/Users/leah/git/democracy.io/node_modules/browser-sync/lib/browser-sync.js:170:13)

Requires that you run node server before running gulp serve again

Add CC-BY to the footer

I have a question on this: if the site's source code is AGPL, shouldn't the license we show on the site also be AGPL? Or does CC-BY refer to the logo and other assets?

Server sometimes gets stuck in restart loop

Sometimes this happens when you're first starting the app, and a killall node fixes it. Other times it starts happening while the app is running.

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: listen EADDRINUSE
    at errnoException (net.js:904:11)
    at Server._listen2 (net.js:1042:14)
    at listen (net.js:1064:10)
    at Server.listen (net.js:1138:5)
    at EventEmitter.listen (/Users/sina/Git/democracy.io/node_modules/express/lib/application.js:617:24)
    at Object.<anonymous> (/Users/sina/Git/democracy.io/server.js:8:18)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
Program node /Users/sina/Git/democracy.io/server.js exited with code 8

html5Mode = true ?

Do we want to set:

$locationProvider.html5Mode(true);

for our angular app? This'd help for future SEO stuff, particularly if we decide to add pages for each rep.

Does subscribing to EFF lists work?

When I checked the box to subscribe to EFF updates, I couldn't find myself as a new subscriber on the lists. Maybe I just need to wait, if this is running as a separate task to subscribe users sometime after they submit the form?

gulp.run() has been deprecated

When deploying, we get the error message:

gulp.run() has been deprecated. Use task dependencies or gulp.watch task triggering instead.

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.