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

Remove monospaced font preference global defaults

Summary: Fixes T7764. These settings have low utility, are no longer used by default, have become less useful on modern Windows which has a better selection of available fonts, and will eventually be subsumed (at least, for the most part) by T4103.

Test Plan:
- Grepped for strings.
- Viewed settings.
- Changed font to "24px impact".
- Viewed diffs with default and custom font.

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: chad, epriestley

Maniphest Tasks: T7764

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

+12 -47
+7
src/applications/config/check/PhabricatorExtraConfigSetupCheck.php
··· 167 167 $reply_handler_reason = pht( 168 168 'Reply handlers can no longer be overridden with configuration.'); 169 169 170 + $monospace_reason = pht( 171 + 'Phabricator no longer supports global customization of monospaced '. 172 + 'fonts.'); 173 + 170 174 $ancient_config += array( 171 175 'phid.external-loaders' => 172 176 pht( ··· 245 249 'metamta.precedence-bulk' => pht( 246 250 'Phabricator now always sends transaction mail with '. 247 251 '"Precedence: bulk" to improve deliverability.'), 252 + 253 + 'style.monospace' => $monospace_reason, 254 + 'style.monospace.windows' => $monospace_reason, 248 255 ); 249 256 250 257 return $ancient_config;
-22
src/applications/config/option/PhabricatorSyntaxHighlightingConfigOptions.php
··· 137 137 pht( 138 138 "Treat all '*.x.bak' file as '.x'. NOTE: We map to capturing group ". 139 139 "1 by specifying the mapping as '1'")), 140 - $this->newOption( 141 - 'style.monospace', 142 - 'string', 143 - null) 144 - ->setLocked(true) 145 - ->setSummary( 146 - pht('Default monospace font.')) 147 - ->setDescription( 148 - pht( 149 - "Set the default monospaced font style for users who haven't set ". 150 - "a custom style.")), 151 - $this->newOption( 152 - 'style.monospace.windows', 153 - 'string', 154 - null) 155 - ->setLocked(true) 156 - ->setSummary( 157 - pht('Default monospace font for clients on Windows.')) 158 - ->setDescription( 159 - pht( 160 - "Set the default monospaced font style for users who haven't set ". 161 - "a custom style and are using Windows.")), 162 140 ); 163 141 } 164 142
+2 -8
src/applications/settings/panel/PhabricatorDisplayPreferencesSettingsPanel.php
··· 90 90 ), 91 91 pht('User Guide: Configuring an External Editor')); 92 92 93 - $font_default = PhabricatorEnv::getEnvConfig('style.monospace'); 94 - 95 93 $pref_monospaced_textareas_value = $preferences 96 94 ->getPreference($pref_monospaced_textareas); 97 95 if (!$pref_monospaced_textareas_value) { ··· 139 137 id(new AphrontFormTextControl()) 140 138 ->setLabel(pht('Monospaced Font')) 141 139 ->setName($pref_monospaced) 142 - // Check plz 143 - ->setCaption(hsprintf( 144 - '%s<br />(%s: %s)', 145 - pht('Overrides default fonts in tools like Differential.'), 146 - pht('Default'), 147 - $font_default)) 140 + ->setCaption( 141 + pht('Overrides default fonts in tools like Differential.')) 148 142 ->setValue($preferences->getPreference($pref_monospaced))) 149 143 ->appendChild( 150 144 id(new AphrontFormMarkupControl())
+3 -17
src/view/page/PhabricatorStandardPageView.php
··· 280 280 281 281 282 282 protected function getHead() { 283 - $monospaced = PhabricatorEnv::getEnvConfig('style.monospace'); 284 - $monospaced_win = PhabricatorEnv::getEnvConfig('style.monospace.windows'); 283 + $monospaced = null; 285 284 286 285 $request = $this->getRequest(); 287 286 if ($request) { 288 287 $user = $request->getUser(); 289 288 if ($user) { 290 - $pref = $user->loadPreferences()->getPreference( 289 + $monospaced = $user->loadPreferences()->getPreference( 291 290 PhabricatorUserPreferences::PREFERENCE_MONOSPACED); 292 - $monospaced = nonempty($pref, $monospaced); 293 - $monospaced_win = nonempty($pref, $monospaced_win); 294 291 } 295 292 } 296 293 ··· 306 303 '</style>', $monospaced); 307 304 } 308 305 309 - $font_css_win = null; 310 - if (!empty($monospaced_win)) { 311 - $font_css_win = hsprintf( 312 - '<style type="text/css">'. 313 - '.platform-windows .PhabricatorMonospaced, '. 314 - '.platform-windows .phabricator-remarkup '. 315 - '.remarkup-code-block .remarkup-code { font: %s !important; }'. 316 - '</style>', $monospaced_win); 317 - } 318 - 319 306 return hsprintf( 320 - '%s%s%s%s', 307 + '%s%s%s', 321 308 parent::getHead(), 322 309 $font_css, 323 - $font_css_win, 324 310 $response->renderSingleResource('javelin-magical-init', 'phabricator')); 325 311 } 326 312