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

Replace hardcoded <tt> HTML tags with <kbd>/<samp>/<code> tags

Summary:
<tt> is deprecated in HTML5 and should be avoided: https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/tt

Replace the hardcoded <tt> elements with semantically more appropriate alternatives and update our CSS accordingly.

Note: This change does not handle/affect <tt> elements created by Phorge in a Remarkup context (`tt.remarkup-monospaced`).

Test Plan:
* Go to http://phorge.localhost/uiexample/view/PHUITimelineExample/ and look at the top box
* Go to http://phorge.localhost/config/issue/ and open an issue which shows a command in its description (e.g. "Daemons Are Not Running")

Reviewers: O1 Blessed Committers, mainframe98

Reviewed By: O1 Blessed Committers, mainframe98

Subscribers: mainframe98, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D26671

+37 -36
+5 -5
resources/celerity/map.php
··· 9 9 'names' => array( 10 10 'conpherence.pkg.css' => 'b2d6f4b8', 11 11 'conpherence.pkg.js' => '020aebcf', 12 - 'core.pkg.css' => 'eeb65c02', 12 + 'core.pkg.css' => '671fbe41', 13 13 'core.pkg.js' => '33424d18', 14 14 'dark-console.pkg.js' => '187792c2', 15 15 'differential.pkg.css' => 'abdb4fe9', ··· 44 44 'rsrc/css/application/conduit/conduit-api.css' => 'ce2cfc41', 45 45 'rsrc/css/application/config/config-options.css' => '25d545a9', 46 46 'rsrc/css/application/config/config-template.css' => '20babf50', 47 - 'rsrc/css/application/config/setup-issue.css' => '46111bd0', 47 + 'rsrc/css/application/config/setup-issue.css' => '85136031', 48 48 'rsrc/css/application/config/unhandled-exception.css' => '9ecfc00d', 49 49 'rsrc/css/application/conpherence/color.css' => 'b17746b0', 50 50 'rsrc/css/application/conpherence/durable-column.css' => '236e57cc', ··· 156 156 'rsrc/css/phui/phui-icon-set-selector.css' => '19e0253b', 157 157 'rsrc/css/phui/phui-icon.css' => 'e790b94e', 158 158 'rsrc/css/phui/phui-image-mask.css' => '724396b6', 159 - 'rsrc/css/phui/phui-info-view.css' => 'a10a909b', 159 + 'rsrc/css/phui/phui-info-view.css' => '556cfe55', 160 160 'rsrc/css/phui/phui-invisible-character-view.css' => 'c694c4a4', 161 161 'rsrc/css/phui/phui-left-right.css' => '68513c34', 162 162 'rsrc/css/phui/phui-lightbox.css' => 'e4015eff', ··· 785 785 'phui-icon-set-selector-css' => '19e0253b', 786 786 'phui-icon-view-css' => 'e790b94e', 787 787 'phui-image-mask-css' => '724396b6', 788 - 'phui-info-view-css' => 'a10a909b', 788 + 'phui-info-view-css' => '556cfe55', 789 789 'phui-inline-comment-view-css' => '066c3341', 790 790 'phui-invisible-character-view-css' => 'c694c4a4', 791 791 'phui-left-right-css' => '68513c34', ··· 831 831 'project-card-view-css' => '7294b671', 832 832 'project-triggers-css' => 'cd9c8bb9', 833 833 'project-view-css' => '2650c4c0', 834 - 'setup-issue-css' => '46111bd0', 834 + 'setup-issue-css' => '85136031', 835 835 'sprite-login-css' => '0abdf921', 836 836 'sprite-tokens-css' => '330edc9e', 837 837 'syntax-default-css' => 'c0307dc6',
+1 -1
src/applications/config/check/PhabricatorAuthSetupCheck.php
··· 74 74 ->addRelatedPhabricatorConfig('auth.lock-config') 75 75 ->addCommand( 76 76 hsprintf( 77 - '<tt>%s $</tt>./bin/auth lock', 77 + '<samp>%s $</samp><kbd>./bin/auth lock</kbd>', 78 78 PlatformSymbols::getPlatformServerPath())); 79 79 } 80 80 }
+2 -1
src/applications/config/check/PhabricatorBaseURISetupCheck.php
··· 96 96 ->setMessage($message) 97 97 ->addCommand( 98 98 hsprintf( 99 - '<tt>%s $</tt>./bin/config set phabricator.base-uri %s', 99 + '<samp>%s $</samp><kbd>./bin/config set phabricator.base-uri '. 100 + '%s</kbd>', 100 101 PlatformSymbols::getPlatformServerPath(), 101 102 $base_uri_guess)); 102 103 }
+2 -2
src/applications/config/check/PhabricatorDaemonsSetupCheck.php
··· 51 51 ->setMessage($message) 52 52 ->addCommand( 53 53 hsprintf( 54 - '<tt>%s $</tt>./bin/phd start', 54 + '<samp>%s $</samp><kbd>./bin/phd start</kbd>', 55 55 PlatformSymbols::getPlatformServerPath())); 56 56 } 57 57 ··· 95 95 ->addPhabricatorConfig('phd.user') 96 96 ->addCommand( 97 97 hsprintf( 98 - '<tt>%s $</tt>./bin/phd restart', 98 + '<samp>%s $</samp><kbd>./bin/phd restart</kbd>', 99 99 PlatformSymbols::getPlatformServerPath())); 100 100 101 101 break;
+4 -4
src/applications/config/check/PhabricatorDatabaseSetupCheck.php
··· 35 35 ->addPhabricatorConfig('mysql.port') 36 36 ->addCommand( 37 37 hsprintf( 38 - '<tt>%s $</tt>./bin/config set mysql.host %s', 38 + '<samp>%s $</samp><kbd>./bin/config set mysql.host %s</kbd>', 39 39 PlatformSymbols::getPlatformServerPath(), 40 40 $host)) 41 41 ->addCommand( 42 42 hsprintf( 43 - '<tt>%s $</tt>./bin/config set mysql.port %s', 43 + '<samp>%s $</samp><kbd>./bin/config set mysql.port %s</kbd>', 44 44 PlatformSymbols::getPlatformServerPath(), 45 45 $port)); 46 46 } ··· 173 173 ->setIsFatal(true) 174 174 ->addCommand( 175 175 hsprintf( 176 - '<tt>%s $</tt>./bin/storage upgrade', 176 + '<samp>%s $</samp><kbd>./bin/storage upgrade</kbd>', 177 177 PlatformSymbols::getPlatformServerPath())); 178 178 179 179 return true; ··· 201 201 ->setMessage($message) 202 202 ->addCommand( 203 203 hsprintf( 204 - '<tt>%s $</tt>./bin/storage upgrade', 204 + '<samp>%s $</samp><kbd>./bin/storage upgrade</kbd>', 205 205 PlatformSymbols::getPlatformServerPath())); 206 206 207 207 return true;
+2 -2
src/applications/config/check/PhabricatorElasticsearchSetupCheck.php
··· 62 62 ->setName(pht('Elasticsearch Index Not Found')) 63 63 ->addCommand( 64 64 hsprintf( 65 - '<tt>%s $</tt>./bin/search init', 65 + '<samp>%s $</samp><kbd>./bin/search init</kbd>', 66 66 PlatformSymbols::getPlatformServerPath())) 67 67 ->setSummary($summary) 68 68 ->setMessage($message); ··· 81 81 ->setName(pht('Elasticsearch Index Schema Mismatch')) 82 82 ->addCommand( 83 83 hsprintf( 84 - '<tt>%s $</tt>./bin/search init', 84 + '<samp>%s $</samp><kbd>./bin/search init</kbd>', 85 85 PlatformSymbols::getPlatformServerPath())) 86 86 ->setSummary($summary) 87 87 ->setMessage($message);
+3 -3
src/applications/config/check/PhabricatorExtraConfigSetupCheck.php
··· 77 77 78 78 if ($found_local) { 79 79 $command = hsprintf( 80 - '<tt>%s $</tt>./bin/config delete %s', 80 + '<samp>%s $</samp><kbd>./bin/config delete %s</kbd>', 81 81 PlatformSymbols::getPlatformServerPath(), 82 82 $key); 83 83 $issue->addCommand($command); ··· 87 87 $issue->addPhabricatorConfig($key); 88 88 89 89 $command = hsprintf( 90 - '<tt>%s $</tt>./bin/config delete --database %s', 90 + '<samp>%s $</samp><kbd>./bin/config delete --database %s</kbd>', 91 91 PlatformSymbols::getPlatformServerPath(), 92 92 $key); 93 93 $issue->addCommand($command); ··· 178 178 ), 179 179 $doc_name)); 180 180 $command = hsprintf( 181 - '<tt>%s $</tt>%s', 181 + '<samp>%s $</samp><kbd>%s</kbd>', 182 182 PlatformSymbols::getPlatformServerPath(), 183 183 csprintf( 184 184 './bin/config delete --database %R',
+8 -8
src/applications/config/view/PhabricatorSetupIssueView.php
··· 82 82 $install_info = pht( 83 83 'You can usually install a PHP extension using %s, %s, or %s. A '. 84 84 'common package name is %s. Try commands like these:', 85 - phutil_tag('tt', array(), 'apt-get'), 86 - phutil_tag('tt', array(), 'dnf'), 87 - phutil_tag('tt', array(), 'yum'), 88 - hsprintf('<tt>php-<em>%s</em></tt>', pht('extname'))); 85 + phutil_tag('kbd', array(), 'apt-get'), 86 + phutil_tag('kbd', array(), 'dnf'), 87 + phutil_tag('kbd', array(), 'yum'), 88 + hsprintf('<kbd>php-<em>%s</em></kbd>', pht('extname'))); 89 89 90 90 // TODO: We should do a better job of detecting how to install extensions 91 91 // on the current system. 92 92 $install_commands = hsprintf( 93 - "<tt>$</tt>sudo apt-get install php-<em>extname</em> ". 93 + "<samp>$</samp><kbd>sudo apt-get install php-<em>extname</em></kbd> ". 94 94 "# Debian / Ubuntu\n". 95 - "<tt>$</tt>sudo dnf install php-<em>extname</em> ". 95 + "<samp>$</samp><kbd>sudo dnf install php-<em>extname</em></kbd> ". 96 96 "# Red Hat / Derivatives\n". 97 - "<tt>$</tt>sudo yum install php-<em>extname</em> ". 97 + "<samp>$</samp><kbd>sudo yum install php-<em>extname</em></kbd> ". 98 98 "# Older Red Hat versions"); 99 99 100 100 $fallback_info = pht( ··· 293 293 $update = array(); 294 294 foreach ($configs as $key) { 295 295 $update[] = hsprintf( 296 - '<tt>%s $</tt>./bin/config set %s <em>value</em>', 296 + '<samp>%s $</samp><kbd>./bin/config set %s <em>value</em></kbd>', 297 297 PlatformSymbols::getPlatformServerPath(), 298 298 $key); 299 299 }
+1 -1
src/applications/people/controller/PhabricatorPeopleDeleteController.php
··· 28 28 'command line:')) 29 29 ->appendCommand( 30 30 hsprintf( 31 - '<tt>%s $</tt> %s', 31 + '<samp>%s $</samp><kbd>%s</kbd>', 32 32 PlatformSymbols::getPlatformServerPath(), 33 33 csprintf( 34 34 './bin/remove destroy %R',
+1 -1
src/applications/uiexample/examples/PHUIObjectItemListExample.php
··· 9 9 public function getDescription() { 10 10 return pht( 11 11 'Use %s to render lists of objects.', 12 - hsprintf('<tt>PHUIObjectItemListView</tt>')); 12 + hsprintf('<code>PHUIObjectItemListView</code>')); 13 13 } 14 14 15 15 public function renderExample() {
+1 -1
src/applications/uiexample/examples/PHUITimelineExample.php
··· 8 8 public function getDescription() { 9 9 return pht( 10 10 'Use %s to comments and transactions.', 11 - hsprintf('<tt>PHUITimelineView</tt>')); 11 + hsprintf('<code>PHUITimelineView</code>')); 12 12 } 13 13 14 14 public function renderExample() {
+2 -2
src/applications/uiexample/examples/PhabricatorSetupIssueUIExample.php
··· 25 25 ->setMessage(pht('Message')) 26 26 ->setIssueKey('example.key') 27 27 ->addCommand(hsprintf( 28 - '<tt>%s $</tt># Add Command', 28 + '<samp>%s $</samp># Add Command', 29 29 PlatformSymbols::getPlatformServerPath())) 30 30 ->addCommand(hsprintf( 31 - '<tt>%s $</tt>ls -1 > /dev/null', 31 + '<samp>%s $</samp><kbd>ls -1 > /dev/null</kbd>', 32 32 PlatformSymbols::getPlatformServerPath())) 33 33 ->addPHPConfig('php.config.example') 34 34 ->addPhabricatorConfig('test.value')
+2 -2
src/infrastructure/markup/__tests__/PhutilTranslatedHTMLTestCase.php
··· 52 52 )); 53 53 54 54 $this->assertEqual( 55 - 'Run the command <tt>ls</tt> 123 times.', 55 + 'Run the command <kbd>ls</kbd> 123 times.', 56 56 (string)$translator->translate( 57 57 'Run the command %s %d time(s).', 58 - hsprintf('<tt>%s</tt>', 'ls'), 58 + hsprintf('<kbd>%s</kbd>', 'ls'), 59 59 123)); 60 60 } 61 61
+2 -2
webroot/rsrc/css/application/config/setup-issue.css
··· 50 50 border-radius: 3px; 51 51 } 52 52 53 - .setup-issue tt { 53 + .setup-issue samp { 54 54 color: {$blacktext}; 55 55 background: {$greybackground}; 56 56 padding: 2px 4px; ··· 122 122 padding: 12px 0; 123 123 } 124 124 125 - .setup-issue-config > pre > tt { 125 + .setup-issue-config > pre > samp { 126 126 user-select: none; 127 127 margin-right: 0.5em; 128 128 }
+1 -1
webroot/rsrc/css/phui/phui-info-view.css
··· 45 45 margin-left: 24px; 46 46 } 47 47 48 - .phui-info-view-body tt { 48 + .phui-info-view-body code { 49 49 color: {$blacktext}; 50 50 background: rgba({$alphablue},0.1); 51 51 padding: 1px 4px;