@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Update Herald edit/transcripts to modern UI

Summary: Walks through various object, rule, create forms and transcripts in Herald. Slightly nicer looking.

Test Plan: Make rules, see rules, edit rules, see transcripts.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15559

authored by

Chad Little and committed by
chad
c40f6e63 a22d37f4

+59 -31
+3 -3
resources/celerity/map.php
··· 7 7 */ 8 8 return array( 9 9 'names' => array( 10 - 'core.pkg.css' => '26886078', 10 + 'core.pkg.css' => '2d0339fc', 11 11 'core.pkg.js' => 'e5484f37', 12 12 'darkconsole.pkg.js' => 'e7393ebb', 13 13 'differential.pkg.css' => '7ba78475', ··· 133 133 'rsrc/css/phui/phui-document.css' => '9c71d2bf', 134 134 'rsrc/css/phui/phui-feed-story.css' => '04aec08f', 135 135 'rsrc/css/phui/phui-fontkit.css' => '9cda225e', 136 - 'rsrc/css/phui/phui-form-view.css' => '4a1a0f5e', 136 + 'rsrc/css/phui/phui-form-view.css' => '6a51768e', 137 137 'rsrc/css/phui/phui-form.css' => 'aac1d51d', 138 138 'rsrc/css/phui/phui-head-thing.css' => 'fd311e5f', 139 139 'rsrc/css/phui/phui-header-view.css' => '230254d3', ··· 821 821 'phui-font-icon-base-css' => '6449bce8', 822 822 'phui-fontkit-css' => '9cda225e', 823 823 'phui-form-css' => 'aac1d51d', 824 - 'phui-form-view-css' => '4a1a0f5e', 824 + 'phui-form-view-css' => '6a51768e', 825 825 'phui-head-thing-view-css' => 'fd311e5f', 826 826 'phui-header-view-css' => '230254d3', 827 827 'phui-hovercard' => '1bd28176',
+16 -13
src/applications/herald/controller/HeraldNewController.php
··· 114 114 115 115 $cancel_text = null; 116 116 $cancel_uri = $this->getApplicationURI(); 117 + $title = pht('Create Herald Rule'); 117 118 break; 118 119 case 1: 119 120 $rule_types = $this->renderRuleTypeControl( ··· 123 124 $form 124 125 ->addHiddenInput('content_type', $content_type) 125 126 ->addHiddenInput('step', 2) 126 - ->appendChild( 127 - id(new AphrontFormStaticControl()) 128 - ->setLabel(pht('Rule for')) 129 - ->setValue( 130 - phutil_tag( 131 - 'strong', 132 - array(), 133 - idx($content_type_map, $content_type)))) 134 127 ->appendChild($rule_types); 135 128 136 129 $cancel_text = pht('Back'); ··· 141 134 'step' => 0, 142 135 )); 143 136 $cancel_uri = $this->getApplicationURI($cancel_uri); 137 + $title = pht('Create Herald Rule: %s', 138 + idx($content_type_map, $content_type)); 144 139 break; 145 140 case 2: 146 141 $adapter = HeraldAdapter::getAdapterForContentType($content_type); ··· 187 182 'step' => 1, 188 183 )); 189 184 $cancel_uri = $this->getApplicationURI($cancel_uri); 185 + $title = pht('Create Herald Rule: %s', 186 + idx($content_type_map, $content_type)); 190 187 break; 191 188 } 192 - 193 189 194 190 $form 195 191 ->appendChild( ··· 199 195 200 196 $form_box = id(new PHUIObjectBoxView()) 201 197 ->setFormErrors($errors) 202 - ->setHeaderText(pht('Create Herald Rule')) 198 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 203 199 ->setForm($form); 204 200 205 201 $crumbs = $this 206 202 ->buildApplicationCrumbs() 207 - ->addTextCrumb(pht('Create Rule')); 203 + ->addTextCrumb(pht('Create Rule')) 204 + ->setBorder(true); 208 205 209 - $title = pht('Create Herald Rule'); 206 + $header = id(new PHUIHeaderView()) 207 + ->setHeader($title) 208 + ->setHeaderIcon('fa-plus-square'); 209 + 210 + $view = id(new PHUITwoColumnView()) 211 + ->setHeader($header) 212 + ->setFooter($form_box); 210 213 211 214 return $this->newPage() 212 215 ->setTitle($title) 213 216 ->setCrumbs($crumbs) 214 217 ->appendChild( 215 218 array( 216 - $form_box, 219 + $view, 217 220 )); 218 221 } 219 222
+14 -6
src/applications/herald/controller/HeraldRuleController.php
··· 235 235 $this->setupEditorBehavior($rule, $handles, $adapter); 236 236 237 237 $title = $rule->getID() 238 - ? pht('Edit Herald Rule') 239 - : pht('Create Herald Rule'); 238 + ? pht('Edit Herald Rule: %s', $rule->getName()) 239 + : pht('Create Herald Rule: %s', idx($content_type_map, $content_type)); 240 + 241 + $icon = $rule->getID() ? 'fa-pencil' : 'fa-plus-square'; 240 242 241 243 $form_box = id(new PHUIObjectBoxView()) 242 - ->setHeaderText($title) 243 244 ->setFormErrors($errors) 244 245 ->setForm($form); 245 246 246 247 $crumbs = $this 247 248 ->buildApplicationCrumbs() 248 - ->addTextCrumb($title); 249 + ->addTextCrumb($title) 250 + ->setBorder(true); 249 251 250 - $title = pht('Edit Rule'); 252 + $header = id(new PHUIHeaderView()) 253 + ->setHeader($title) 254 + ->setHeaderIcon('fa-plus-square'); 255 + 256 + $view = id(new PHUITwoColumnView()) 257 + ->setHeader($header) 258 + ->setFooter($form_box); 251 259 252 260 return $this->newPage() 253 261 ->setTitle($title) 254 262 ->setCrumbs($crumbs) 255 263 ->appendChild( 256 264 array( 257 - $form_box, 265 + $view, 258 266 )); 259 267 } 260 268
+11 -3
src/applications/herald/controller/HeraldTestConsoleController.php
··· 98 98 ->setValue(pht('Test Rules'))); 99 99 100 100 $box = id(new PHUIObjectBoxView()) 101 - ->setHeaderText(pht('Herald Test Console')) 102 101 ->setFormErrors($errors) 103 102 ->setForm($form); 104 103 105 104 $crumbs = id($this->buildApplicationCrumbs()) 106 - ->addTextCrumb(pht('Test Console')); 105 + ->addTextCrumb(pht('Test Console')) 106 + ->setBorder(true); 107 107 108 108 $title = pht('Test Console'); 109 109 110 + $header = id(new PHUIHeaderView()) 111 + ->setHeader($title) 112 + ->setHeaderIcon('fa-desktop'); 113 + 114 + $view = id(new PHUITwoColumnView()) 115 + ->setHeader($header) 116 + ->setFooter($box); 117 + 110 118 return $this->newPage() 111 119 ->setTitle($title) 112 120 ->setCrumbs($crumbs) 113 121 ->appendChild( 114 122 array( 115 - $box, 123 + $view, 116 124 )); 117 125 118 126 }
+14 -4
src/applications/herald/controller/HeraldTranscriptController.php
··· 79 79 ->addTextCrumb( 80 80 pht('Transcripts'), 81 81 $this->getApplicationURI('/transcript/')) 82 - ->addTextCrumb($xscript->getID()); 82 + ->addTextCrumb($xscript->getID()) 83 + ->setBorder(true); 84 + 85 + $title = pht('Transcript: %s', $xscript->getID()); 86 + 87 + $header = id(new PHUIHeaderView()) 88 + ->setHeader($title) 89 + ->setHeaderIcon('fa-file'); 83 90 84 - $title = pht('Transcript'); 91 + $view = id(new PHUITwoColumnView()) 92 + ->setHeader($header) 93 + ->setFooter($content); 85 94 86 95 return $this->newPage() 87 96 ->setTitle($title) 88 97 ->setCrumbs($crumbs) 89 98 ->appendChild( 90 99 array( 91 - $content, 100 + $view, 92 101 )); 93 102 } 94 103 ··· 232 241 $action_map = mgroup($action_map, 'getRuleID'); 233 242 234 243 $rule_list = id(new PHUIObjectItemListView()) 235 - ->setNoDataString(pht('No Herald rules applied to this object.')); 244 + ->setNoDataString(pht('No Herald rules applied to this object.')) 245 + ->setFlush(true); 236 246 237 247 $rule_xscripts = $xscript->getRuleTranscripts(); 238 248 $rule_xscripts = msort($rule_xscripts, 'getRuleID');
+1 -2
webroot/rsrc/css/phui/phui-form-view.css
··· 263 263 } 264 264 265 265 .phui-form-inset { 266 - margin: 4px 0 8px; 266 + margin: 12px 0; 267 267 padding: 8px; 268 268 background: #f7f9fd; 269 269 border: 1px solid {$lightblueborder}; 270 - border-bottom: 1px solid {$blueborder}; 271 270 border-radius: 3px; 272 271 } 273 272