Commit Graph

50 Commits

Author SHA1 Message Date
Sam 4e2f1811ca a bit hackish, override fa-certificate for default icon (it is set by pg in the column default) 2014-10-07 12:01:06 +11:00
Sam 72a28aeb7c FEATURE: always show highest trust level badge in card
FEATURE: fa-user icon for trust level badges
2014-10-02 16:08:31 +10:00
Sam Saffron 8ba8846589 FIX: Allow Reader badge if you over read a topic 2014-09-16 07:07:47 +10:00
Sam 42104685f7 FIX: badge flood 2014-09-11 13:34:19 +10:00
Sam 43e132d5a6 FEATURE: sharing badges (nice share, good share, great share)
FIX: bad translation
2014-09-11 13:10:37 +10:00
Sam 7f3797b635 FEATURE: Nice Topic, Good Topic and Great Topic badges
Note we will revoke all old badges post badges that went to post #1
and instead get topic badges
2014-09-11 12:36:37 +10:00
riking 808460a28f Fix magic numbers, extra param references 2014-08-31 19:36:31 -07:00
riking 1833b43ae2 FEATURE: Badge query validation, preview results, and EXPLAIN
Upon saving a badge or requesting a badge result preview,
BadgeGranter.contract_checks! will examine the provided badge SQL for
some contractual obligations - namely, the returned columns and use of
trigger parameters.

Saving the badge is wrapped in a transaction to make this easier, by
raising ActiveRecord::Rollback on a detected violation.

On the client, a modal view is added for the badge query sample run
results, named admin-badge-preview.
The preview action is moved up to the route.
The save action, on failure, triggers a 'saveError' action (also in the
route).

The preview action gains a new parameter, 'explain', which will give the
output of an EXPLAIN query for the badge sql, which can be used by forum
admins to estimate the cost of their badge queries.
The preview link is replaced by two links, one which omits (false) and
includes (true) the EXPLAIN query.

The Badge.save() method is amended to propogate errors.

Badge::Trigger gets some utility methods for use in the
BadgeGranter.contract_checks! method.

Additionally, extra checks outside of BadgeGranter.contract_checks! are
added in the preview() method, to cover cases of null granted_at
columns.

An uninitialized variable path is removed in the backfill() method.

TODO - it would be nice to be able to get the actual names of all
columns the provided query returns, so we could give more errors
2014-08-31 11:25:44 -07:00
Sam 87d2be3ecf FIX: ensure triggered badges are never triggered if filter is missing 2014-08-27 18:02:13 +10:00
Sam 414c6d191f FIX: remove nullable dates post upgrade to Rails 4 2014-08-27 15:19:25 +10:00
Sam 953d3f2151 PERF: add optional delta badge filtering
This is tricky and optional, some badges are very expensive to calculate

pass in :backfill , :post_ids and :user_ids to all badge queries so they
can do pre-filtering, if you do it after the sub-query it is too late
2014-08-08 10:02:43 +10:00
Sam b5045a005f PERF: last seen index on users 2014-08-07 13:33:11 +10:00
Sam 0b01310c84 FIX: system badges where created under id 100 2014-08-06 10:51:39 +10:00
Sam 0ccb8e17cb remove invalid join 2014-08-04 16:55:16 +10:00
Sam 03c8f09be8 PERF: finalize porting to new incoming links structure 2014-08-04 16:43:57 +10:00
Sam ebf385aedc FEATURE: allow title overridable 2014-07-30 08:46:59 +10:00
Sam 354d40a6ea FIX: system attribute not set correctly on new badges 2014-07-25 15:22:29 +10:00
Sam ec03d135fa FEATURE: allow advanced badge options in admin screen
clean up serializer, allow simplistic preview
2014-07-24 18:28:23 +10:00
Sam 0f9678fe49 FIX: faster update of all badges
Introduced badge triggers, introduced concept of badge that happens due to a post but has the post hidden

Delta badge grant happens once a minute, backed by redis
2014-07-23 11:46:07 +10:00
Sam 007310c4a2 Wire up triggers 2014-07-23 11:43:17 +10:00
Sam b9a7d945c3 Improve badge grouping UI
Start work on triggers
2014-07-23 11:43:17 +10:00
Sam ed6766ccad FEATURE: push Reader up to 100 2014-07-18 15:57:03 +10:00
Sam 4feedecce4 BUGFIX: orphan badge groupings 2014-07-18 15:55:42 +10:00
Sam c8284170ad FEATURE: badge grouping UI
FIX: not loading more badges on badge show page
2014-07-18 15:46:36 +10:00
Sam bfb37054e8 Badge Grouping work in progress 2014-07-17 16:11:10 +10:00
Sam e8ca1a2469 FEATURE: allow overriding badge names
FEATURE: allow html in badge description
2014-07-17 16:11:09 +10:00
Sam 5ad519e2bc Rename Read Faq, Read Guidelines 2014-07-16 17:55:08 +10:00
Sam 2d0def9940 FIX: First Quote badge bust
Feature: track quoted posts
2014-07-15 17:47:24 +10:00
Sam 4c25fedf70 FEATURE: Reader badge
Read a every post in a topic that if 50 posts or longer
2014-07-15 15:16:41 +10:00
Sam 45ca83328d Annotate 2014-07-15 11:29:44 +10:00
Sam 88469721b9 FEATURE: Allow admins to disable specific badges 2014-07-14 17:40:36 +10:00
Sam c113c36db7 correct badge query 2014-07-11 17:35:34 +10:00
Sam 833c50c460 FEATURE: Read Faq badge 2014-07-11 17:32:29 +10:00
Sam 89fc989adb FEATURE: First Quote badge 2014-07-11 14:17:43 +10:00
Sam 928848c0a8 FEATURE: First Link badge 2014-07-10 12:02:16 +10:00
Sam e32e96dabb FEATURE: new badges
- Pay it forward renamed to first like
- First flag
- First share
2014-07-09 12:17:39 +10:00
Sam 81682b74b7 Feature: Paying it forward badge 2014-07-08 14:26:53 +10:00
Sam 0f25bbeaf7 FEATURE: Editor badge 2014-07-07 17:55:40 +10:00
Sam 9a9ad9bda8 FEATURE: Badge progress
- Refactor model so it stores backfill query
- Implement autobiographer
- Remove sample badge
- Correct featured badges to only include a badge once
2014-07-03 17:29:44 +10:00
Sam bc44bfcdf2 Work in progress backfill for like badges 2014-07-01 22:01:15 +10:00
Vikhyat Korrapati a68b47cb9f Add notification_id column to user_badges. 2014-06-19 16:56:19 +05:30
Vikhyat Korrapati a79bf11edb Admin badge creation bug fixes. 2014-05-27 09:03:55 +05:30
Vikhyat Korrapati d208e4d517 Multiple grant badges. 2014-05-21 12:54:55 +05:30
Sam eff8c22638 There is this thing called SQL and it is about 1000x faster 2014-05-16 10:34:06 +10:00
Vikhyat Korrapati b144b75565 Add automatically assigned trust level badges. 2014-05-14 20:47:21 +05:30
Sam 34d1668f9f FEATURE: backend for inviting a user to a group 2014-05-09 18:22:35 +10:00
Vikhyat Korrapati b4e037dfb2 Allow badges to be marked as "titleable". 2014-04-28 10:30:38 +05:30
Vikhyat Korrapati b1e524e9c3 Specify `dependent: destroy` for UserBadges. 2014-03-24 22:39:58 +05:30
Sam 5c148faeb9 annotations were out of date 2014-03-20 15:35:51 +11:00
Vikhyat Korrapati 9b26c8584e Initial badge system implementation. 2014-03-14 21:49:26 +05:30