mikesea / donors_select Goto Github PK
View Code? Open in Web Editor NEWReimagining the DonorsChoose project discovery experience.
Reimagining the DonorsChoose project discovery experience.
this isn't really related to a Project, so it should probably be extracted into it's own module.
def self.build_uri(params=nil)
if params
BASE_URI + "&" + params.join("&")
else
BASE_URI
end
end
The singleton class is opened up to expose the redis method, however you also define other singleton methods outside of the opening.
class << self
attr_writer :redis
def redis
@redis ||= $redis
end
end
def self.find_by(params)
uri = build_uri(params)
if projects = redis.get(uri)
JSON.parse projects
end
end
API_KEY = 'DONORSCHOOSE'
BASE_URI = "http://api.donorschoose.org/common/json_feed.html?max=20&APIKey=#{API_KEY}"
class << self
attr_writer :redis
def redis
@redis ||= $redis
end
end
It's not incredibly clear that this is a button until you mouse over it. The styling is really nice but ironically it is very similar to the "Top of Window" styling you see in the OS X Finder, and because of this I think we tend to read it as just a nice border on the top of the image. Maybe there could be a way to style this so it's a little more prominent.
cookies.signed[:token]
(in ProjectsController#index
) should be factored out; perhaps into a session_token
method.
One slightly disorienting component of the UI is keeping track of what filters are currently active. Only the most recent button pressed stays in the "depressed" state, so it might be nice to have some "breadcrumb" feature that would list all the things you're currently filtering on.
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.