@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.

Allow configuration of the default monospaced font style

Summary: This is a fairly contentious default that we can easily move to configuration.

Test Plan: Changed the default, changed my user setting, reverted my user setting, verified the "settings" page.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

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

+26 -26
+5
conf/default.conf.php
··· 1154 1154 '@\.arcconfig$@' => 'js', 1155 1155 ), 1156 1156 1157 + // Set the default monospaced font style for users who haven't set a custom 1158 + // style. 1159 + 'style.monospace' => '10px "Menlo", "Consolas", "Monaco", monospace', 1160 + 1161 + 1157 1162 );
+4 -2
src/applications/people/controller/settings/panels/PhabricatorUserPreferenceSettingsPanelController.php
··· 59 59 ), 60 60 'User Guide: Configuring an External Editor'); 61 61 62 + $font_default = PhabricatorEnv::getEnvConfig('style.monospace'); 63 + $font_default = phutil_escape_html($font_default); 64 + 62 65 $form = id(new AphrontFormView()) 63 66 ->setUser($user) 64 67 ->setAction('/settings/page/preferences/') ··· 90 93 ->setName($pref_monospaced) 91 94 ->setCaption( 92 95 'Overrides default fonts in tools like Differential. '. 93 - '(Default: 10px "Menlo", "Consolas", "Monaco", '. 94 - 'monospace)') 96 + '(Default: '.$font_default.')') 95 97 ->setValue($preferences->getPreference($pref_monospaced))) 96 98 ->appendChild( 97 99 id(new AphrontFormMarkupControl())
+17 -19
src/view/page/PhabricatorStandardPageView.php
··· 209 209 } 210 210 211 211 $response = CelerityAPI::getStaticResourceResponse(); 212 - $head = 213 - '<script type="text/javascript">'. 214 - $framebust. 215 - 'window.__DEV__=1;'. 216 - '</script>'. 217 - $response->renderResourcesOfType('css'). 218 - $response->renderSingleResource('javelin-magical-init'); 212 + 213 + $monospaced = PhabricatorEnv::getEnvConfig('style.monospace'); 219 214 220 215 $request = $this->getRequest(); 221 216 if ($request) { 222 217 $user = $request->getUser(); 223 218 if ($user) { 224 - $monospaced = $user->loadPreferences()->getPreference( 225 - PhabricatorUserPreferences::PREFERENCE_MONOSPACED 226 - ); 227 - 228 - if (strlen($monospaced)) { 229 - $head .= 230 - '<style type="text/css">'. 231 - '.PhabricatorMonospaced { font: '. 232 - $monospaced. 233 - ' !important; }'. 234 - '</style>'; 235 - } 219 + $monospaced = nonempty( 220 + $user->loadPreferences()->getPreference( 221 + PhabricatorUserPreferences::PREFERENCE_MONOSPACED), 222 + $monospaced); 236 223 } 237 224 } 225 + 226 + $head = 227 + '<script type="text/javascript">'. 228 + $framebust. 229 + 'window.__DEV__=1;'. 230 + '</script>'. 231 + $response->renderResourcesOfType('css'). 232 + '<style type="text/css">'. 233 + '.PhabricatorMonospaced { font: '.$monospaced.'; }'. 234 + '</style>'. 235 + $response->renderSingleResource('javelin-magical-init'); 238 236 239 237 return $head; 240 238 }
-5
webroot/rsrc/css/application/base/standard-page-view.css
··· 207 207 background-image: url(/rsrc/image/icon/fatcow/bullet_black.png); 208 208 } 209 209 210 - .PhabricatorMonospaced { 211 - font-family: "Menlo", "Consolas", "Monaco", monospace; 212 - font-size: 10px; 213 - } 214 - 215 210 .aphront-developer-error-callout { 216 211 padding: 2em; 217 212 background: #aa0000;