Commit Graph

60 Commits

Author SHA1 Message Date
Neil Williams
5c2679fbf6 static: Use rCSSMin to minify CSS files during static file compilation.
This shows a 10% reduction in size of the compressed results on the
current reddit.css stylesheet.
2012-09-25 13:01:37 -07:00
Keith Mitchell
01146c301e Remove unused r2.po and friends from repo
Note that pylons.wsgiapp uses pylons.i18n's get_lang()
and friends, instead of our modified versions in
r2.lib.translation. This means that setting 'lang' in the
conf causes it to try and 'help' us by looking up PO files
in r2/i18n. Changing the ini files to use 'site_lang' as the
key gets around that.
2012-08-14 12:19:20 -07:00
Max Goodman
768663b032 Abort Makefile if Makefile.py fails. 2012-08-08 13:47:03 -07:00
Max Goodman
bcbba69a7e Simplify handling/mangling of should_compile special case.
or: How I Learned to Stop Worrying and Love the Mangling.
2012-07-19 16:25:55 -07:00
Keith Mitchell
07af98ff4f Make each of the JS files individually responsible
Make will still only build once
2012-07-19 16:25:55 -07:00
Max Goodman
05afaf6580 Fix jQuery gzipping in the Makefile. 2012-07-18 14:48:07 -04:00
Neil Williams
94945f7341 Overhaul traffic pages (and update a few self-serve pages).
* Upgrade flot and include the new timeseries flot plugin.
  (flot/flot@ca050b26c2)

* All times mentioned by traffic are now in UTC, not "local."

* Traffic data is generated as actual tables and JavaScript
  generates the Flot charts from the tables for accessibility.

* Many pieces of traffic data that were only accessible from the
  old traffic app are now moved into the reddit app.

* Traffic backend lag time is indicated on the graphs for clarity.

* Use excanvas with Flot instead of Google Charts for old-IE fallback.
2012-07-12 14:56:27 -07:00
Neil Williams
914b949286 Update / add license headers.
I'm actually quite excited to do this.
2012-06-19 14:02:42 -07:00
Max Goodman
8b4f584f76 Move plugin Makefile extensions to Makefile.plugin include. 2012-06-12 15:36:31 -07:00
Max Goodman
cdd8177622 Speed up Makefile by combining python portions. 2012-06-12 15:36:31 -07:00
Max Goodman
c20ca4e5d5 Remove mangled js output symlinks.
Fixes issue with JS files / names falling out of sync.
2012-06-12 15:36:31 -07:00
Max Goodman
ea9d33177c Clean up plugin static buildstamps when make cleaning static. 2012-06-12 15:36:31 -07:00
Max Goodman
f48eb3bf31 Locate, build, and merge plugin statics in the Makefile. 2012-06-12 15:36:30 -07:00
Max Goodman
fbece1d183 Tweak js module buildstamp names so they sort together. 2012-06-12 15:36:30 -07:00
Max Goodman
619bcdc4a2 Compile static files in build/public/static. 2012-06-12 15:36:30 -07:00
Max Goodman
47e559495b Cleanup mangled files completely.
Static file mangling now renames files to their mangled form and
symlinks the original name. This cleanup rule deleted only the mangled
names, leaving broken symlinks. The quick'n'dirty solution is to clear
out all of the mangled and unmangled filenames so we don't leave things
in an inconsistent state.
2012-06-12 15:36:30 -07:00
Keith Mitchell
abe385cc74 Add note to top of generated ini files 2012-03-29 11:36:53 -07:00
Keith Mitchell
5f0c23a75e Makefile was looking for I18N_PATH in removed module 2012-01-05 16:50:24 -08:00
Neil Williams
98d8268d08 Make sure to remove static file symlinks before overwriting.
Fixes issue with RTL stylesheet not being rebuilt properly.
2011-12-09 12:02:14 -08:00
Neil Williams
7ac293d3d6 Makefile: Fix .update -> .ini rule. 2011-12-01 14:36:43 -08:00
Neil Williams
1ca4d56b98 Use .gzip as extension for pre-gzipped files.
Some versions of Safari are stupid about files with
.gz suffix.
2011-11-29 14:56:33 -08:00
Neil Williams
ffb62ff076 Rewrite makefile to better track dependencies. 2011-11-29 14:56:33 -08:00
Neil Williams
2b61f9f236 Add static() equivalent on client-side.
and make sure the code uses it.
2011-11-14 20:45:34 -08:00
Neil Williams
0a5e08b005 Rewrite spriter to lay out sprites more intelligently.
Currently results in a ~10% decrease in sprite file size.

This required some tweaks to the way some sprites were clipped
since there's no longer a huge amount of padding around them,
these changes incidentally fix the issues with other sprites
showing up where they shouldn't when text ran too long etc.
2011-11-14 20:45:06 -08:00
Neil Williams
ba8e1da19f Remove a bunch of unused stuff.
* spreadshirt support which was discontinued in 1684da9 (Jun 2010)
* old socialite page css
* image preload markup
* lipstick.com, frame.css, and wired comments css
* "reddit is down" page
2011-11-14 20:44:40 -08:00
Neil Williams
4d2c3c2835 Generate gzipped versions of JS/CSS static files.
Also, flip the symlinking so that unmangled points to the latest
mangled file.
2011-11-14 20:44:31 -08:00
Neil Williams
8e0e90d76f Use default python in Makefile. 2011-11-14 20:44:19 -08:00
Keith Mitchell
2a63d862f4 Make r2.pot generation work again
Also, blame a random admin on failure
2011-11-10 11:48:43 -08:00
Max Goodman
b847757069 Use cross domain https for slightly safer login.
Login UI code has been simplified and moved into the client side. CORS
is used for the cross-domain POST if available, otherwise an iframe and
cookie polling technique is used. Start fleshing out the new JS tree. :)
2011-10-07 14:51:25 -07:00
Max Goodman
205cfb5967 Add general jQuery cookie library and replace jquery.json. 2011-10-07 14:51:25 -07:00
Max Goodman
bf1ff113a7 Move external JS libs to their own directory. 2011-10-07 14:51:25 -07:00
Neil Williams
581cb4eac5 Make clean_static remove reddit.js and mobile.js. 2011-10-06 08:12:34 -07:00
Neil Williams
e754d7f93a Clean up the Cython build process. 2011-08-24 18:02:08 -07:00
Keith Mitchell
0709a0a0af Outbound click tracking
Clicks on listing links to be tracked via google-analytics
End users may disable google analytics to opt-out of tracking
2011-08-17 15:44:22 -07:00
Logan Hanks
19d09b37d6 Add flair.js module. 2011-07-28 11:21:47 -07:00
Max Goodman
e7ad7232ad Clean up css sprite building in the Makefile. 2011-07-22 11:42:04 -07:00
Max Goodman
ef5e77a289 Add sprite for compact.css to the make process. 2011-07-22 11:41:35 -07:00
Max Goodman
628f92af9d Prevent static file name linking from operating on symlinks. 2011-06-21 14:55:30 -07:00
Max Goodman
0d9877f56b Clean up any old .md5 files in make clean_names. 2011-06-20 12:12:23 -07:00
Max Goodman
21e447a520 Break name file cleaning off into its own make target. 2011-06-20 12:12:23 -07:00
Max Goodman
5e03b19ce8 Don't remove inis in make clean_static 2011-06-20 12:12:23 -07:00
Max Goodman
beb970fd56 Switch to symlinks for unique static filenames.
Disable static hash middleware, since it is no longer necessary.
2011-06-20 12:12:23 -07:00
Max Goodman
1733261a52 Add unique hashed filename json mapping file for serving static files.
When make is run, unique filenames are generated for JavaScript and CSS
files in /public/static/. Filenames are generated by appending a 64 bit
truncated SHA1 hash in websafe base64 format before the extension. The
filename mapping is stored in /public/static/names.json. Unique
filenames are now inserted by the static() template helper. Hashed
filenames can be served by Pylons, and hashed names are checked against
the names.json mapping when requested.
2011-06-20 12:12:23 -07:00
Max Goodman
555b5c17e8 Use python2.6 in the Makefile. 2011-06-20 12:12:23 -07:00
Max Goodman
542e22ffa8 New JS compilation, localization, and module system.
Add Google Closure Compiler to contribs for JS compilation.
2011-06-20 12:12:23 -07:00
Max Goodman
2d6e16014f Point buttons to compressed assets. Clean up headers. 2011-05-27 16:01:13 -07:00
Max Goodman
c5fd5ecd55 Remove reddit.css and sprite.png upon make clean. 2011-05-17 15:17:44 -07:00
Max Goodman
618b9e8d1d Upgrade to jQuery 1.6.1 loaded from the Google CDN. 2011-05-17 15:17:44 -07:00
Neil Williams
68a06c568b April 2011 Merge
* Show "this post is archived" message for things we won't allow votes on.
* Don't mark messages read when pulled via RSS
* Make compact (smartphone) interface respect user's toolbar
* preferences.
* Make mobile interface more friendly for kindles.
* Fix bug that caused comment tree corruption.
* Use cachebuster on traffic pixel for more accurate tracking.
* Make apps restart themselves after a configurable number of requests.
* Move to pycassa 1.0.8.
* Fix bug in calculations for "best" sort.
* Fixes for Firefox Mobile
* Add a global flag to disable editing of the wiki.
* Move the child-comment collapse button to the left.
* Updated list of disallows in robots.txt to save needless hits from
  crawlers.
* Fix vote_q by splitting it into vote_link_q and vote_comment_q.
* Fix bug where /reddits crashes due to 'promos' subreddit.
2011-04-18 16:30:48 -07:00
KeyserSosa
9a4271f641 Upgrade Instructions
====
   * Uninstall the python Cassandra package that we previously depended on (it has a namespace conflict with the new package we depend on).  To find it:

     $ python -c "import cassandra; print cassandra.__file__"

    and rm -r the .egg directory after "site-packages/"

   * This version relies on cython, so if "make" fails, you may have to install cython via your distro's package manager.

     $ cd reddit/r2
     $ python setup.py develop # possibly with "sudo" depending on your install
     $ make

   * Cassandra is now required for the caching layer.  An example storage-conf.xml can be found in reddit/srv/cassandra.  Make sure that the additional <Keyspace> items are included in your conf file.

   * remove the query_queue_reader services if they are running.  add new gen_time_listings.sh instead.  Suggested cron:

    0    */2 *   *   *   $SCRIPTS/gen_time_listings.sh year '("month","year")'
    */5  *   *   *   *   $SCRIPTS/gen_time_listings.sh week '("day","week")'
    *    *   *   *   *   $SCRIPTS/gen_time_listings.sh hour '("hour",)'

   where $SCRIPTS is the location of this script directory

Features and Bugfixes
====
 * Mobile reddit:
   * templates are in r2/templates of the form *.compact
   * css is r2/public/static/css/compact.css
     * beginning of a sass-based (http://sass-lang.com/) compact.scss
   * reachable via .compact extension or from the "i" subdomain.
 * Cassandra is now *required*, and votes are currently written out to both cassandra and postgres (part of an eventual migration).
 * attempt to make the db connection code a little smarter.
   * A dropped DB connection will mark the connection dead and randomly attempt to reconnect.
   * A dropped db connection on start will permanently mark the connection as dead.
 * Calculate the time-filtered top/controversy listings using mapreduce instead of prec_links (new cron job in reddit/scripts)
 * allow default user/pass for database to be specified with '*' to fallback on db_user and db_pass in the INI file
 * Search feedback buttons
 * make deleted comments not show up in your inbox.
 * move last_visited into cassandra
 * Swallow rare, race-conditiony POST_save/hide/subscribe problems
 * Apparently we haven't been breaking properly for the past few weeks.
2010-06-16 17:01:50 -07:00