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

Move Macro image height/width to CSS

Summary: This makes macros and memes grow to 100% of their container //at most//, instead of showing a scrollbar. This is useful for overly large macros, smaller spaces like Feed and Conpherences, and Inline Comments. Fixes T7528

Test Plan: Tested a very large macro, a very large meme, and a very very tiny macro. It looks like memes get cached though, unsure if we should clean them up or just leave them

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T7528

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

+26 -26
+14 -14
resources/celerity/map.php
··· 7 7 */ 8 8 return array( 9 9 'names' => array( 10 - 'core.pkg.css' => '856b962f', 10 + 'core.pkg.css' => 'efdeeb14', 11 11 'core.pkg.js' => '5f50c01b', 12 12 'darkconsole.pkg.js' => '8ab24e01', 13 13 'differential.pkg.css' => '1940be3f', ··· 105 105 'rsrc/css/application/tokens/tokens.css' => '3d0f239e', 106 106 'rsrc/css/application/uiexample/example.css' => '528b19de', 107 107 'rsrc/css/core/core.css' => '86bfbe8c', 108 - 'rsrc/css/core/remarkup.css' => '2dbff225', 108 + 'rsrc/css/core/remarkup.css' => 'bc65f3cc', 109 109 'rsrc/css/core/syntax.css' => '56c1ba38', 110 110 'rsrc/css/core/z-index.css' => '2db67397', 111 111 'rsrc/css/diviner/diviner-shared.css' => '38813222', ··· 353 353 'rsrc/js/application/auth/behavior-persona-login.js' => '9414ff18', 354 354 'rsrc/js/application/config/behavior-reorder-fields.js' => '14a827de', 355 355 'rsrc/js/application/conpherence/ConpherenceThreadManager.js' => '0324970d', 356 - 'rsrc/js/application/conpherence/behavior-durable-column.js' => '64fc1053', 356 + 'rsrc/js/application/conpherence/behavior-durable-column.js' => '44100dc7', 357 357 'rsrc/js/application/conpherence/behavior-menu.js' => 'c4151295', 358 358 'rsrc/js/application/conpherence/behavior-pontificate.js' => '21ba5861', 359 359 'rsrc/js/application/conpherence/behavior-quicksand-blacklist.js' => '7927a7d3', ··· 585 585 'javelin-behavior-diffusion-locate-file' => '6d3e1947', 586 586 'javelin-behavior-diffusion-pull-lastmodified' => '2b228192', 587 587 'javelin-behavior-doorkeeper-tag' => 'e5822781', 588 - 'javelin-behavior-durable-column' => '64fc1053', 588 + 'javelin-behavior-durable-column' => '44100dc7', 589 589 'javelin-behavior-error-log' => '6882e80a', 590 590 'javelin-behavior-fancy-datepicker' => 'c51ae228', 591 591 'javelin-behavior-global-drag-and-drop' => '07f199d8', ··· 739 739 'phabricator-phtize' => 'd254d646', 740 740 'phabricator-prefab' => '72da38cc', 741 741 'phabricator-profile-css' => '1a20dcbf', 742 - 'phabricator-remarkup-css' => '2dbff225', 742 + 'phabricator-remarkup-css' => 'bc65f3cc', 743 743 'phabricator-search-results-css' => '559cc554', 744 744 'phabricator-shaped-request' => '7cbe244b', 745 745 'phabricator-side-menu-view-css' => '7e8c6341', ··· 1110 1110 'javelin-dom', 1111 1111 'javelin-request', 1112 1112 ), 1113 + '44100dc7' => array( 1114 + 'javelin-behavior', 1115 + 'javelin-dom', 1116 + 'javelin-stratcom', 1117 + 'javelin-scrollbar', 1118 + 'javelin-quicksand', 1119 + 'phabricator-keyboard-shortcut', 1120 + 'conpherence-thread-manager', 1121 + ), 1113 1122 '44168bad' => array( 1114 1123 'javelin-behavior', 1115 1124 'javelin-dom', ··· 1256 1265 'javelin-install', 1257 1266 'javelin-dom', 1258 1267 'javelin-fx', 1259 - ), 1260 - '64fc1053' => array( 1261 - 'javelin-behavior', 1262 - 'javelin-dom', 1263 - 'javelin-stratcom', 1264 - 'javelin-scrollbar', 1265 - 'javelin-quicksand', 1266 - 'phabricator-keyboard-shortcut', 1267 - 'conpherence-thread-manager', 1268 1268 ), 1269 1269 '6882e80a' => array( 1270 1270 'javelin-dom',
+2
src/applications/files/markup/PhabricatorEmbedFileRemarkupRule.php
··· 96 96 case 'full': 97 97 $attrs += array( 98 98 'src' => $file->getBestURI(), 99 + 'height' => $file->getImageHeight(), 100 + 'width' => $file->getImageWidth(), 99 101 ); 100 102 $image_class = 'phabricator-remarkup-embed-image-full'; 101 103 break;
+3 -12
src/applications/macro/markup/PhabricatorImageMacroRemarkupRule.php
··· 113 113 $src_uri = PhabricatorEnv::getProductionURI($src_uri); 114 114 } 115 115 116 - $file_data = $file->getMetadata(); 117 - $style = null; 118 - $height = idx($file_data, PhabricatorFile::METADATA_IMAGE_HEIGHT); 119 - $width = idx($file_data, PhabricatorFile::METADATA_IMAGE_WIDTH); 120 - if ($height && $width) { 121 - $style = sprintf( 122 - 'height: %dpx; width: %dpx;', 123 - $height, 124 - $width); 125 - } 126 - 127 116 $id = null; 128 117 $audio = idx($files, $macro->getAudioPHID()); 129 118 $should_play = ($audio && $macro->getAudioBehavior() != ··· 154 143 'src' => $src_uri, 155 144 'alt' => $spec['original'], 156 145 'title' => $spec['original'], 157 - 'style' => $style, 146 + 'height' => $file->getImageHeight(), 147 + 'width' => $file->getImageWidth(), 148 + 'class' => 'phabricator-remarkup-macro', 158 149 )); 159 150 160 151 $engine->overwriteStoredText($spec['token'], $result);
+1
src/applications/macro/markup/PhabricatorMemeRemarkupRule.php
··· 55 55 array( 56 56 'src' => $uri, 57 57 'alt' => $alt_text, 58 + 'class' => 'phabricator-remarkup-macro', 58 59 )); 59 60 } 60 61
+6
webroot/rsrc/css/core/remarkup.css
··· 300 300 } 301 301 302 302 .phabricator-remarkup-embed-image-full img { 303 + height: auto; 303 304 max-width: 100%; 304 305 } 305 306 ··· 486 487 .phabricator-image-macro-hero { 487 488 margin: auto; 488 489 max-width: 95%; 490 + } 491 + 492 + .phabricator-remarkup-macro { 493 + height: auto; 494 + max-width: 100%; 489 495 } 490 496 491 497 .remarkup-nav-sequence-arrow {