sinak / democracy.io Goto Github PK
View Code? Open in Web Editor NEWdemocracy.io
License: GNU Affero General Public License v3.0
democracy.io
License: GNU Affero General Public License v3.0
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&rec=1" style="border:0" alt="" />
</noscript>
<script>
document.getElementById('anon-stats').innerHTML = '<img src="https://anon-stats.eff.org/piwik.php?idsite=21&rec=1&urlref='+encodeURIComponent(document.referrer)+'&action_name='+encodeURIComponent(document.title)+'" style="border:0" alt="" />';
</script>
</div>
@l12s I think one of your updates to the build process might have broken this.
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.
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)
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.
See also https://github.com/EFForg/actioncenter-dontuseforissues/issues/414
I'd love to fix this, but it seems like quite a big lift.
Members of Congress require you to submit a gendered title. EFF believes the options provided are limiting and we are looking into alternatives.
Note that MoC ask for these topics when you submit a message to them.
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.
Can we change the cfduid cookie lifetime from a year to session? EFF privacy policy is explicit about only setting non-session cookies if the user is logged in or clicks "remember me"
Instead it would ideally pre-populate with address values.
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.
Page load results in 404 for these URLs:
https://democracy.io/static/fonts/OpenSans-SemiBold.woff
https://democracy.io/static/fonts/OpenSans-SemiBold.ttf
Possibly angular model isn't updating in time?
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.)
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
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?
Instead it would ideally pre-populate with address values.
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
Look up on Phantom DC and make sure both CAPTCHA and non-CAPTCHA messages are making it through.
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.
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?
Maybe explain what's happening on the server side.
Might be due to Smarty Streets not resolving their addresses?
For SEO purposes, it makes sense to have a better page title and possibly some more content on the site.
Possibly next to the main message field.
A small (but vocal :) percentage of EFF fans use noscript or other browser plugins that require the user to manually enable javascript when they visit a site.
For some reason SVG animations show up as tiny dots in production, but not in development.
I noticed that https://democracy.io/ has set-cookie headers, so this means it won't be cached by Varnish.
I was thinking it would be ideal to not set cookies until a user starts interacting with the site, if that's possible? This would allow us to serve a cached version of the page to everyone when they first hit the site.
According to adi, clicking the logo from the "thanks" page redirects you to the homepage, but nothing loads.
Both in the top half of the page and in the "about" section.
The checks in the progress bar don't slide up in Safari.
For example Safari/Firefox both have this problem.
When deploying, we get the error message:
gulp.run() has been deprecated. Use task dependencies or gulp.watch task triggering instead.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.