mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 17:02:41 +01:00
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
This commit is contained in:
parent
75f081aaf2
commit
7aebd2388f
4 changed files with 12 additions and 47 deletions
|
@ -167,6 +167,10 @@ final class PhabricatorExtraConfigSetupCheck extends PhabricatorSetupCheck {
|
||||||
$reply_handler_reason = pht(
|
$reply_handler_reason = pht(
|
||||||
'Reply handlers can no longer be overridden with configuration.');
|
'Reply handlers can no longer be overridden with configuration.');
|
||||||
|
|
||||||
|
$monospace_reason = pht(
|
||||||
|
'Phabricator no longer supports global customization of monospaced '.
|
||||||
|
'fonts.');
|
||||||
|
|
||||||
$ancient_config += array(
|
$ancient_config += array(
|
||||||
'phid.external-loaders' =>
|
'phid.external-loaders' =>
|
||||||
pht(
|
pht(
|
||||||
|
@ -245,6 +249,9 @@ final class PhabricatorExtraConfigSetupCheck extends PhabricatorSetupCheck {
|
||||||
'metamta.precedence-bulk' => pht(
|
'metamta.precedence-bulk' => pht(
|
||||||
'Phabricator now always sends transaction mail with '.
|
'Phabricator now always sends transaction mail with '.
|
||||||
'"Precedence: bulk" to improve deliverability.'),
|
'"Precedence: bulk" to improve deliverability.'),
|
||||||
|
|
||||||
|
'style.monospace' => $monospace_reason,
|
||||||
|
'style.monospace.windows' => $monospace_reason,
|
||||||
);
|
);
|
||||||
|
|
||||||
return $ancient_config;
|
return $ancient_config;
|
||||||
|
|
|
@ -137,28 +137,6 @@ final class PhabricatorSyntaxHighlightingConfigOptions
|
||||||
pht(
|
pht(
|
||||||
"Treat all '*.x.bak' file as '.x'. NOTE: We map to capturing group ".
|
"Treat all '*.x.bak' file as '.x'. NOTE: We map to capturing group ".
|
||||||
"1 by specifying the mapping as '1'")),
|
"1 by specifying the mapping as '1'")),
|
||||||
$this->newOption(
|
|
||||||
'style.monospace',
|
|
||||||
'string',
|
|
||||||
null)
|
|
||||||
->setLocked(true)
|
|
||||||
->setSummary(
|
|
||||||
pht('Default monospace font.'))
|
|
||||||
->setDescription(
|
|
||||||
pht(
|
|
||||||
"Set the default monospaced font style for users who haven't set ".
|
|
||||||
"a custom style.")),
|
|
||||||
$this->newOption(
|
|
||||||
'style.monospace.windows',
|
|
||||||
'string',
|
|
||||||
null)
|
|
||||||
->setLocked(true)
|
|
||||||
->setSummary(
|
|
||||||
pht('Default monospace font for clients on Windows.'))
|
|
||||||
->setDescription(
|
|
||||||
pht(
|
|
||||||
"Set the default monospaced font style for users who haven't set ".
|
|
||||||
"a custom style and are using Windows.")),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -90,8 +90,6 @@ EXAMPLE;
|
||||||
),
|
),
|
||||||
pht('User Guide: Configuring an External Editor'));
|
pht('User Guide: Configuring an External Editor'));
|
||||||
|
|
||||||
$font_default = PhabricatorEnv::getEnvConfig('style.monospace');
|
|
||||||
|
|
||||||
$pref_monospaced_textareas_value = $preferences
|
$pref_monospaced_textareas_value = $preferences
|
||||||
->getPreference($pref_monospaced_textareas);
|
->getPreference($pref_monospaced_textareas);
|
||||||
if (!$pref_monospaced_textareas_value) {
|
if (!$pref_monospaced_textareas_value) {
|
||||||
|
@ -139,12 +137,8 @@ EXAMPLE;
|
||||||
id(new AphrontFormTextControl())
|
id(new AphrontFormTextControl())
|
||||||
->setLabel(pht('Monospaced Font'))
|
->setLabel(pht('Monospaced Font'))
|
||||||
->setName($pref_monospaced)
|
->setName($pref_monospaced)
|
||||||
// Check plz
|
->setCaption(
|
||||||
->setCaption(hsprintf(
|
pht('Overrides default fonts in tools like Differential.'))
|
||||||
'%s<br />(%s: %s)',
|
|
||||||
pht('Overrides default fonts in tools like Differential.'),
|
|
||||||
pht('Default'),
|
|
||||||
$font_default))
|
|
||||||
->setValue($preferences->getPreference($pref_monospaced)))
|
->setValue($preferences->getPreference($pref_monospaced)))
|
||||||
->appendChild(
|
->appendChild(
|
||||||
id(new AphrontFormMarkupControl())
|
id(new AphrontFormMarkupControl())
|
||||||
|
|
|
@ -280,17 +280,14 @@ final class PhabricatorStandardPageView extends PhabricatorBarePageView {
|
||||||
|
|
||||||
|
|
||||||
protected function getHead() {
|
protected function getHead() {
|
||||||
$monospaced = PhabricatorEnv::getEnvConfig('style.monospace');
|
$monospaced = null;
|
||||||
$monospaced_win = PhabricatorEnv::getEnvConfig('style.monospace.windows');
|
|
||||||
|
|
||||||
$request = $this->getRequest();
|
$request = $this->getRequest();
|
||||||
if ($request) {
|
if ($request) {
|
||||||
$user = $request->getUser();
|
$user = $request->getUser();
|
||||||
if ($user) {
|
if ($user) {
|
||||||
$pref = $user->loadPreferences()->getPreference(
|
$monospaced = $user->loadPreferences()->getPreference(
|
||||||
PhabricatorUserPreferences::PREFERENCE_MONOSPACED);
|
PhabricatorUserPreferences::PREFERENCE_MONOSPACED);
|
||||||
$monospaced = nonempty($pref, $monospaced);
|
|
||||||
$monospaced_win = nonempty($pref, $monospaced_win);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -306,21 +303,10 @@ final class PhabricatorStandardPageView extends PhabricatorBarePageView {
|
||||||
'</style>', $monospaced);
|
'</style>', $monospaced);
|
||||||
}
|
}
|
||||||
|
|
||||||
$font_css_win = null;
|
|
||||||
if (!empty($monospaced_win)) {
|
|
||||||
$font_css_win = hsprintf(
|
|
||||||
'<style type="text/css">'.
|
|
||||||
'.platform-windows .PhabricatorMonospaced, '.
|
|
||||||
'.platform-windows .phabricator-remarkup '.
|
|
||||||
'.remarkup-code-block .remarkup-code { font: %s !important; }'.
|
|
||||||
'</style>', $monospaced_win);
|
|
||||||
}
|
|
||||||
|
|
||||||
return hsprintf(
|
return hsprintf(
|
||||||
'%s%s%s%s',
|
'%s%s%s',
|
||||||
parent::getHead(),
|
parent::getHead(),
|
||||||
$font_css,
|
$font_css,
|
||||||
$font_css_win,
|
|
||||||
$response->renderSingleResource('javelin-magical-init', 'phabricator'));
|
$response->renderSingleResource('javelin-magical-init', 'phabricator'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue