Skip to content

Commit 64472dd

Browse files
author
Pieter Hooimeijer
committed
Adding Ponder-related files.
Summary: Ponder is similar in spirit to the Wiki tool, but uses a Q&A format and up/downvotes to signal user sentiment. Popular questions are moved to the top of the feed on a 5-minute cycle based on age (younger is better) and vote count (higher is better). Pre-apologies for noob diff. Test Plan: - `./bin/phd list` Should include `PonderHeatDaemon`; phd launch it if necessary. - Navigate to /ponder/ ; observe sanity when adding questions, voting on them, and adding answers. - Confirm that questions and answers are linkable using Q5 / Q5#A5 formatted object links. - Confirm that searching for Ponder Questions works using built-in search. Feedback on code / schema / whatever organization very welcome. Reviewers: nh, vrana, epriestley Reviewed By: epriestley CC: gmarcotte, aran, Korvin, starruler Differential Revision: https://secure.phabricator.com/D3136
1 parent 9030fe8 commit 64472dd

File tree

50 files changed

+3204
-51
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+3204
-51
lines changed

resources/sql/patches/ponder.sql

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
CREATE TABLE `{$NAMESPACE}_ponder`.`ponder_question` (
2+
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
3+
`title` varchar(255) NOT NULL,
4+
`phid` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
5+
`voteCount` int(10) NOT NULL,
6+
`authorPHID` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
7+
`content` longtext CHARACTER SET utf8 NOT NULL,
8+
`dateCreated` int(10) unsigned NOT NULL,
9+
`dateModified` int(10) unsigned NOT NULL,
10+
`contentSource` varchar(255) DEFAULT NULL,
11+
`heat` float NOT NULL,
12+
`answerCount` int(10) unsigned NOT NULL,
13+
PRIMARY KEY (`id`),
14+
UNIQUE KEY `phid` (`phid`),
15+
KEY `authorPHID` (`authorPHID`),
16+
KEY `heat` (`heat`)
17+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
18+
19+
CREATE TABLE `{$NAMESPACE}_ponder`.`ponder_answer` (
20+
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
21+
`questionID` int(10) unsigned NOT NULL,
22+
`phid` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
23+
`voteCount` int(10) NOT NULL,
24+
`authorPHID` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
25+
`content` longtext CHARACTER SET utf8 NOT NULL,
26+
`dateCreated` int(10) unsigned NOT NULL,
27+
`dateModified` int(10) unsigned NOT NULL,
28+
`contentSource` varchar(255) DEFAULT NULL,
29+
PRIMARY KEY (`id`),
30+
UNIQUE KEY `phid` (`phid`),
31+
KEY `questionID` (`questionID`),
32+
KEY `authorPHID` (`authorPHID`)
33+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
34+
35+
CREATE TABLE `{$NAMESPACE}_ponder`.`edge` (
36+
`src` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
37+
`type` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
38+
`dst` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
39+
`dateCreated` int(10) unsigned NOT NULL,
40+
`seq` int(10) unsigned NOT NULL,
41+
`dataID` int(10) unsigned DEFAULT NULL,
42+
PRIMARY KEY (`src`,`type`,`dst`),
43+
KEY `src` (`src`,`type`,`dateCreated`,`seq`)
44+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
45+
46+
CREATE TABLE `{$NAMESPACE}_ponder`.`edgedata` (
47+
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
48+
`data` longtext CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
49+
PRIMARY KEY (`id`)
50+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

src/__celerity_resource_map__.php

Lines changed: 133 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -63,17 +63,38 @@
6363
'disk' => '/rsrc/image/app/app_phriction.png',
6464
'type' => 'png',
6565
),
66+
'/rsrc/image/app/app_ponder.png' =>
67+
array(
68+
'hash' => '9893ca3674af96884d3564ecbe101280',
69+
'uri' => '/res/9893ca36/rsrc/image/app/app_ponder.png',
70+
'disk' => '/rsrc/image/app/app_ponder.png',
71+
'type' => 'png',
72+
),
6673
'/rsrc/image/app/app_settings.png' =>
6774
array(
6875
'hash' => '095fa0e61ec11d3f7e543ba48f5a5adb',
6976
'uri' => '/res/095fa0e6/rsrc/image/app/app_settings.png',
7077
'disk' => '/rsrc/image/app/app_settings.png',
7178
'type' => 'png',
7279
),
80+
'/rsrc/image/application/ponder/downvote.png' =>
81+
array(
82+
'hash' => '46c5644a0fccb9e237a3363e07f50487',
83+
'uri' => '/res/46c5644a/rsrc/image/application/ponder/downvote.png',
84+
'disk' => '/rsrc/image/application/ponder/downvote.png',
85+
'type' => 'png',
86+
),
87+
'/rsrc/image/application/ponder/upvote.png' =>
88+
array(
89+
'hash' => 'edd58ed3a09f3017c78601b1a5d0e7a7',
90+
'uri' => '/res/edd58ed3/rsrc/image/application/ponder/upvote.png',
91+
'disk' => '/rsrc/image/application/ponder/upvote.png',
92+
'type' => 'png',
93+
),
7394
'/rsrc/image/apps.png' =>
7495
array(
75-
'hash' => 'f7cb4abeb73245fea4098a02fd784653',
76-
'uri' => '/res/f7cb4abe/rsrc/image/apps.png',
96+
'hash' => '134f6ac3d63e24070bf7a11b294ca72c',
97+
'uri' => '/res/134f6ac3/rsrc/image/apps.png',
7798
'disk' => '/rsrc/image/apps.png',
7899
'type' => 'png',
79100
),
@@ -1608,6 +1629,32 @@
16081629
),
16091630
'disk' => '/rsrc/js/application/phriction/phriction-document-preview.js',
16101631
),
1632+
'javelin-behavior-ponder-feedback-preview' =>
1633+
array(
1634+
'uri' => '/res/2e802dd9/rsrc/js/application/ponder/behavior-comment-preview.js',
1635+
'type' => 'js',
1636+
'requires' =>
1637+
array(
1638+
0 => 'javelin-behavior',
1639+
1 => 'javelin-dom',
1640+
2 => 'javelin-util',
1641+
3 => 'phabricator-shaped-request',
1642+
),
1643+
'disk' => '/rsrc/js/application/ponder/behavior-comment-preview.js',
1644+
),
1645+
'javelin-behavior-ponder-votebox' =>
1646+
array(
1647+
'uri' => '/res/6517d3f5/rsrc/js/application/ponder/behavior-votebox.js',
1648+
'type' => 'js',
1649+
'requires' =>
1650+
array(
1651+
0 => 'javelin-behavior',
1652+
1 => 'javelin-dom',
1653+
2 => 'javelin-util',
1654+
3 => 'phabricator-shaped-request',
1655+
),
1656+
'disk' => '/rsrc/js/application/ponder/behavior-votebox.js',
1657+
),
16111658
'javelin-behavior-project-create' =>
16121659
array(
16131660
'uri' => '/res/e91f3f8f/rsrc/js/application/projects/behavior-project-create.js',
@@ -1635,7 +1682,7 @@
16351682
),
16361683
'javelin-behavior-repository-crossreference' =>
16371684
array(
1638-
'uri' => '/res/e0d58d3b/rsrc/js/application/repository/repository-crossreference.js',
1685+
'uri' => '/res/12700384/rsrc/js/application/repository/repository-crossreference.js',
16391686
'type' => 'js',
16401687
'requires' =>
16411688
array(
@@ -2200,7 +2247,7 @@
22002247
),
22012248
'phabricator-app-buttons-css' =>
22022249
array(
2203-
'uri' => '/res/1e153463/rsrc/css/application/directory/phabricator-app-buttons.css',
2250+
'uri' => '/res/2d5d414c/rsrc/css/application/directory/phabricator-app-buttons.css',
22042251
'type' => 'css',
22052252
'requires' =>
22062253
array(
@@ -2730,6 +2777,42 @@
27302777
),
27312778
'disk' => '/rsrc/css/application/phriction/phriction-document-css.css',
27322779
),
2780+
'ponder-core-view-css' =>
2781+
array(
2782+
'uri' => '/res/4a6e2fc7/rsrc/css/application/ponder/core.css',
2783+
'type' => 'css',
2784+
'requires' =>
2785+
array(
2786+
),
2787+
'disk' => '/rsrc/css/application/ponder/core.css',
2788+
),
2789+
'ponder-feed-view-css' =>
2790+
array(
2791+
'uri' => '/res/df22bd20/rsrc/css/application/ponder/feed.css',
2792+
'type' => 'css',
2793+
'requires' =>
2794+
array(
2795+
),
2796+
'disk' => '/rsrc/css/application/ponder/feed.css',
2797+
),
2798+
'ponder-post-css' =>
2799+
array(
2800+
'uri' => '/res/32c960df/rsrc/css/application/ponder/post.css',
2801+
'type' => 'css',
2802+
'requires' =>
2803+
array(
2804+
),
2805+
'disk' => '/rsrc/css/application/ponder/post.css',
2806+
),
2807+
'ponder-vote-css' =>
2808+
array(
2809+
'uri' => '/res/923bcf97/rsrc/css/application/ponder/vote.css',
2810+
'type' => 'css',
2811+
'requires' =>
2812+
array(
2813+
),
2814+
'disk' => '/rsrc/css/application/ponder/vote.css',
2815+
),
27332816
'raphael-core' =>
27342817
array(
27352818
'uri' => '/res/3f48575a/rsrc/js/raphael/raphael.js',
@@ -2777,7 +2860,7 @@
27772860
),
27782861
'syntax-highlighting-css' =>
27792862
array(
2780-
'uri' => '/res/5669beb6/rsrc/css/core/syntax.css',
2863+
'uri' => '/res/cb3b9dc0/rsrc/css/core/syntax.css',
27812864
'type' => 'css',
27822865
'requires' =>
27832866
array(
@@ -2787,7 +2870,7 @@
27872870
), array(
27882871
'packages' =>
27892872
array(
2790-
'8b65e80d' =>
2873+
'04e1ab3e' =>
27912874
array(
27922875
'name' => 'core.pkg.css',
27932876
'symbols' =>
@@ -2816,7 +2899,7 @@
28162899
21 => 'phabricator-flag-css',
28172900
22 => 'aphront-error-view-css',
28182901
),
2819-
'uri' => '/res/pkg/8b65e80d/core.pkg.css',
2902+
'uri' => '/res/pkg/04e1ab3e/core.pkg.css',
28202903
'type' => 'css',
28212904
),
28222905
'971b021e' =>
@@ -2867,7 +2950,7 @@
28672950
'uri' => '/res/pkg/96bc37d6/differential.pkg.css',
28682951
'type' => 'css',
28692952
),
2870-
'ace0431a' =>
2953+
93479628 =>
28712954
array(
28722955
'name' => 'differential.pkg.js',
28732956
'symbols' =>
@@ -2891,7 +2974,7 @@
28912974
16 => 'javelin-behavior-differential-dropdown-menus',
28922975
17 => 'javelin-behavior-buoyant',
28932976
),
2894-
'uri' => '/res/pkg/ace0431a/differential.pkg.js',
2977+
'uri' => '/res/pkg/93479628/differential.pkg.js',
28952978
'type' => 'js',
28962979
),
28972980
'c8ce2d88' =>
@@ -2983,23 +3066,23 @@
29833066
'reverse' =>
29843067
array(
29853068
'aphront-attached-file-view-css' => '7839ae2d',
2986-
'aphront-crumbs-view-css' => '8b65e80d',
2987-
'aphront-dialog-view-css' => '8b65e80d',
2988-
'aphront-error-view-css' => '8b65e80d',
2989-
'aphront-form-view-css' => '8b65e80d',
3069+
'aphront-crumbs-view-css' => '04e1ab3e',
3070+
'aphront-dialog-view-css' => '04e1ab3e',
3071+
'aphront-error-view-css' => '04e1ab3e',
3072+
'aphront-form-view-css' => '04e1ab3e',
29903073
'aphront-headsup-action-list-view-css' => '96bc37d6',
2991-
'aphront-headsup-view-css' => '8b65e80d',
2992-
'aphront-list-filter-view-css' => '8b65e80d',
2993-
'aphront-pager-view-css' => '8b65e80d',
2994-
'aphront-panel-view-css' => '8b65e80d',
2995-
'aphront-side-nav-view-css' => '8b65e80d',
2996-
'aphront-table-view-css' => '8b65e80d',
2997-
'aphront-tokenizer-control-css' => '8b65e80d',
2998-
'aphront-tooltip-css' => '8b65e80d',
2999-
'aphront-typeahead-control-css' => '8b65e80d',
3074+
'aphront-headsup-view-css' => '04e1ab3e',
3075+
'aphront-list-filter-view-css' => '04e1ab3e',
3076+
'aphront-pager-view-css' => '04e1ab3e',
3077+
'aphront-panel-view-css' => '04e1ab3e',
3078+
'aphront-side-nav-view-css' => '04e1ab3e',
3079+
'aphront-table-view-css' => '04e1ab3e',
3080+
'aphront-tokenizer-control-css' => '04e1ab3e',
3081+
'aphront-tooltip-css' => '04e1ab3e',
3082+
'aphront-typeahead-control-css' => '04e1ab3e',
30003083
'differential-changeset-view-css' => '96bc37d6',
30013084
'differential-core-view-css' => '96bc37d6',
3002-
'differential-inline-comment-editor' => 'ace0431a',
3085+
'differential-inline-comment-editor' => '93479628',
30033086
'differential-local-commits-view-css' => '96bc37d6',
30043087
'differential-results-table-css' => '96bc37d6',
30053088
'differential-revision-add-comment-css' => '96bc37d6',
@@ -3012,21 +3095,21 @@
30123095
'inline-comment-summary-css' => '96bc37d6',
30133096
'javelin-behavior' => '6fb20113',
30143097
'javelin-behavior-aphront-basic-tokenizer' => '97f65640',
3015-
'javelin-behavior-aphront-drag-and-drop' => 'ace0431a',
3016-
'javelin-behavior-aphront-drag-and-drop-textarea' => 'ace0431a',
3098+
'javelin-behavior-aphront-drag-and-drop' => '93479628',
3099+
'javelin-behavior-aphront-drag-and-drop-textarea' => '93479628',
30173100
'javelin-behavior-aphront-form-disable-on-submit' => '971b021e',
30183101
'javelin-behavior-audit-preview' => '5e68be89',
3019-
'javelin-behavior-buoyant' => 'ace0431a',
3020-
'javelin-behavior-differential-accept-with-errors' => 'ace0431a',
3021-
'javelin-behavior-differential-add-reviewers-and-ccs' => 'ace0431a',
3022-
'javelin-behavior-differential-comment-jump' => 'ace0431a',
3023-
'javelin-behavior-differential-diff-radios' => 'ace0431a',
3024-
'javelin-behavior-differential-dropdown-menus' => 'ace0431a',
3025-
'javelin-behavior-differential-edit-inline-comments' => 'ace0431a',
3026-
'javelin-behavior-differential-feedback-preview' => 'ace0431a',
3027-
'javelin-behavior-differential-keyboard-navigation' => 'ace0431a',
3028-
'javelin-behavior-differential-populate' => 'ace0431a',
3029-
'javelin-behavior-differential-show-more' => 'ace0431a',
3102+
'javelin-behavior-buoyant' => '93479628',
3103+
'javelin-behavior-differential-accept-with-errors' => '93479628',
3104+
'javelin-behavior-differential-add-reviewers-and-ccs' => '93479628',
3105+
'javelin-behavior-differential-comment-jump' => '93479628',
3106+
'javelin-behavior-differential-diff-radios' => '93479628',
3107+
'javelin-behavior-differential-dropdown-menus' => '93479628',
3108+
'javelin-behavior-differential-edit-inline-comments' => '93479628',
3109+
'javelin-behavior-differential-feedback-preview' => '93479628',
3110+
'javelin-behavior-differential-keyboard-navigation' => '93479628',
3111+
'javelin-behavior-differential-populate' => '93479628',
3112+
'javelin-behavior-differential-show-more' => '93479628',
30303113
'javelin-behavior-diffusion-commit-graph' => '5e68be89',
30313114
'javelin-behavior-diffusion-pull-lastmodified' => '5e68be89',
30323115
'javelin-behavior-maniphest-batch-selector' => '7707de41',
@@ -3036,12 +3119,12 @@
30363119
'javelin-behavior-maniphest-transaction-preview' => '7707de41',
30373120
'javelin-behavior-phabricator-autofocus' => '971b021e',
30383121
'javelin-behavior-phabricator-keyboard-shortcuts' => '971b021e',
3039-
'javelin-behavior-phabricator-object-selector' => 'ace0431a',
3122+
'javelin-behavior-phabricator-object-selector' => '93479628',
30403123
'javelin-behavior-phabricator-oncopy' => '971b021e',
30413124
'javelin-behavior-phabricator-tooltips' => '971b021e',
30423125
'javelin-behavior-phabricator-watch-anchor' => '971b021e',
30433126
'javelin-behavior-refresh-csrf' => '971b021e',
3044-
'javelin-behavior-repository-crossreference' => 'ace0431a',
3127+
'javelin-behavior-repository-crossreference' => '93479628',
30453128
'javelin-behavior-workflow' => '971b021e',
30463129
'javelin-dom' => '6fb20113',
30473130
'javelin-event' => '6fb20113',
@@ -3062,27 +3145,27 @@
30623145
'javelin-workflow' => '971b021e',
30633146
'maniphest-task-summary-css' => '7839ae2d',
30643147
'maniphest-transaction-detail-css' => '7839ae2d',
3065-
'phabricator-app-buttons-css' => '8b65e80d',
3148+
'phabricator-app-buttons-css' => '04e1ab3e',
30663149
'phabricator-content-source-view-css' => '96bc37d6',
3067-
'phabricator-core-buttons-css' => '8b65e80d',
3068-
'phabricator-core-css' => '8b65e80d',
3069-
'phabricator-directory-css' => '8b65e80d',
3070-
'phabricator-drag-and-drop-file-upload' => 'ace0431a',
3150+
'phabricator-core-buttons-css' => '04e1ab3e',
3151+
'phabricator-core-css' => '04e1ab3e',
3152+
'phabricator-directory-css' => '04e1ab3e',
3153+
'phabricator-drag-and-drop-file-upload' => '93479628',
30713154
'phabricator-dropdown-menu' => '971b021e',
3072-
'phabricator-flag-css' => '8b65e80d',
3073-
'phabricator-jump-nav' => '8b65e80d',
3155+
'phabricator-flag-css' => '04e1ab3e',
3156+
'phabricator-jump-nav' => '04e1ab3e',
30743157
'phabricator-keyboard-shortcut' => '971b021e',
30753158
'phabricator-keyboard-shortcut-manager' => '971b021e',
30763159
'phabricator-menu-item' => '971b021e',
30773160
'phabricator-object-selector-css' => '96bc37d6',
30783161
'phabricator-paste-file-upload' => '971b021e',
30793162
'phabricator-prefab' => '971b021e',
30803163
'phabricator-project-tag-css' => '7839ae2d',
3081-
'phabricator-remarkup-css' => '8b65e80d',
3082-
'phabricator-shaped-request' => 'ace0431a',
3083-
'phabricator-standard-page-view' => '8b65e80d',
3164+
'phabricator-remarkup-css' => '04e1ab3e',
3165+
'phabricator-shaped-request' => '93479628',
3166+
'phabricator-standard-page-view' => '04e1ab3e',
30843167
'phabricator-tooltip' => '971b021e',
3085-
'phabricator-transaction-view-css' => '8b65e80d',
3086-
'syntax-highlighting-css' => '8b65e80d',
3168+
'phabricator-transaction-view-css' => '04e1ab3e',
3169+
'syntax-highlighting-css' => '04e1ab3e',
30873170
),
30883171
));

0 commit comments

Comments
 (0)