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

Set "max-width: 100%" on "size=full" Remarkup images

Summary: Fixes T5500. When an image is embedded with `{Fxx, size=full}`, add "max-width: 100%;" so that large images are scaled down to the size of the container. This seems like a better and more reasonable behavior than having them scroll. You can still lightbox them or right-click -> view if you really want the full image.

Test Plan: Dragged window around with a very large `size=full` image. At large window sizes, the image displayed at 100%. At smaller window sizes, the image was scaled to fit.

Reviewers: chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T5500

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

+7 -5
+3 -3
resources/celerity/map.php
··· 7 7 return array( 8 8 'names' => 9 9 array( 10 - 'core.pkg.css' => 'a18bafdb', 10 + 'core.pkg.css' => '9156dd94', 11 11 'core.pkg.js' => '834b4eda', 12 12 'darkconsole.pkg.js' => 'df001cab', 13 13 'differential.pkg.css' => '4a93db37', ··· 104 104 'rsrc/css/application/tokens/tokens.css' => '3d0f239e', 105 105 'rsrc/css/application/uiexample/example.css' => '528b19de', 106 106 'rsrc/css/core/core.css' => '40151074', 107 - 'rsrc/css/core/remarkup.css' => 'cc2d4ed8', 107 + 'rsrc/css/core/remarkup.css' => 'ad4c0676', 108 108 'rsrc/css/core/syntax.css' => '3c18c1cb', 109 109 'rsrc/css/core/z-index.css' => 'd1c137f2', 110 110 'rsrc/css/diviner/diviner-shared.css' => '38813222', ··· 732 732 'phabricator-phtize' => 'd254d646', 733 733 'phabricator-prefab' => '41ed7994', 734 734 'phabricator-profile-css' => 'b459416e', 735 - 'phabricator-remarkup-css' => 'cc2d4ed8', 735 + 'phabricator-remarkup-css' => 'ad4c0676', 736 736 'phabricator-search-results-css' => 'f240504c', 737 737 'phabricator-shaped-request' => '7cbe244b', 738 738 'phabricator-side-menu-view-css' => 'a2ccd7bd',
-2
src/applications/files/remarkup/PhabricatorRemarkupRuleEmbedFile.php
··· 96 96 case 'full': 97 97 $attrs += array( 98 98 'src' => $file->getBestURI(), 99 - 'width' => $file->getImageWidth(), 100 - 'height' => $file->getImageHeight(), 101 99 ); 102 100 $image_class = 'phabricator-remarkup-embed-image-full'; 103 101 break;
+4
webroot/rsrc/css/core/remarkup.css
··· 301 301 display: inline-block; 302 302 } 303 303 304 + .phabricator-remarkup-embed-image-full img { 305 + max-width: 100%; 306 + } 307 + 304 308 .phabricator-remarkup table.remarkup-table { 305 309 border-collapse: separate; 306 310 border-spacing: 1px;