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

Treat Pholio image descriptions as Remarkup, not plain text

Summary: Fixes T5283.

Test Plan: See screenshots.

Reviewers: chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T5283

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

+42 -30
+21 -21
resources/celerity/map.php
··· 79 79 'rsrc/css/application/paste/paste.css' => 'aa1767d1', 80 80 'rsrc/css/application/people/people-profile.css' => 'ba7b2762', 81 81 'rsrc/css/application/phame/phame.css' => '19ecc703', 82 - 'rsrc/css/application/pholio/pholio-edit.css' => 'b9e59b6d', 82 + 'rsrc/css/application/pholio/pholio-edit.css' => '90616955', 83 83 'rsrc/css/application/pholio/pholio-inline-comments.css' => '3d5a5590', 84 - 'rsrc/css/application/pholio/pholio.css' => '344c1440', 84 + 'rsrc/css/application/pholio/pholio.css' => '5bd4c882', 85 85 'rsrc/css/application/phortune/phortune-credit-card-form.css' => 'b25b4beb', 86 86 'rsrc/css/application/phrequent/phrequent.css' => 'ffc185ad', 87 87 'rsrc/css/application/phriction/phriction-document-css.css' => '7d7f0071', ··· 398 398 'rsrc/js/application/passphrase/phame-credential-control.js' => '1e1c8a59', 399 399 'rsrc/js/application/phame/phame-post-preview.js' => '61d927ec', 400 400 'rsrc/js/application/pholio/behavior-pholio-mock-edit.js' => '1e1e8bb0', 401 - 'rsrc/js/application/pholio/behavior-pholio-mock-view.js' => 'd7f9b108', 401 + 'rsrc/js/application/pholio/behavior-pholio-mock-view.js' => '81f57c3a', 402 402 'rsrc/js/application/phortune/behavior-balanced-payment-form.js' => '3b3e1664', 403 403 'rsrc/js/application/phortune/behavior-stripe-payment-form.js' => '1693a296', 404 404 'rsrc/js/application/phortune/behavior-test-payment-form.js' => 'b3e5ee60', ··· 622 622 'javelin-behavior-phabricator-watch-anchor' => '06e05112', 623 623 'javelin-behavior-phame-post-preview' => '61d927ec', 624 624 'javelin-behavior-pholio-mock-edit' => '1e1e8bb0', 625 - 'javelin-behavior-pholio-mock-view' => 'd7f9b108', 625 + 'javelin-behavior-pholio-mock-view' => '81f57c3a', 626 626 'javelin-behavior-phui-object-box-tabs' => 'a3e2244e', 627 627 'javelin-behavior-phui-timeline-dropdown-menu' => '4d94d9c3', 628 628 'javelin-behavior-policy-control' => 'f3fef818', ··· 748 748 'phabricator-uiexample-reactor-sendproperties' => '551add57', 749 749 'phabricator-zindex-css' => 'efb673ac', 750 750 'phame-css' => '19ecc703', 751 - 'pholio-css' => '344c1440', 752 - 'pholio-edit-css' => 'b9e59b6d', 751 + 'pholio-css' => '5bd4c882', 752 + 'pholio-edit-css' => '90616955', 753 753 'pholio-inline-comments-css' => '3d5a5590', 754 754 'phortune-credit-card-form' => '2290aeef', 755 755 'phortune-credit-card-form-css' => 'b25b4beb', ··· 1421 1421 0 => 'javelin-behavior', 1422 1422 1 => 'javelin-history', 1423 1423 ), 1424 + '81f57c3a' => 1425 + array( 1426 + 0 => 'javelin-behavior', 1427 + 1 => 'javelin-util', 1428 + 2 => 'javelin-stratcom', 1429 + 3 => 'javelin-dom', 1430 + 4 => 'javelin-vector', 1431 + 5 => 'javelin-magical-init', 1432 + 6 => 'javelin-request', 1433 + 7 => 'javelin-history', 1434 + 8 => 'javelin-workflow', 1435 + 9 => 'javelin-mask', 1436 + 10 => 'javelin-behavior-device', 1437 + 11 => 'phabricator-keyboard-shortcut', 1438 + ), 1424 1439 '82ce2142' => 1425 1440 array( 1426 1441 0 => 'aphront-typeahead-control-css', ··· 1867 1882 2 => 'javelin-json', 1868 1883 3 => 'javelin-dom', 1869 1884 4 => 'phabricator-keyboard-shortcut', 1870 - ), 1871 - 'd7f9b108' => 1872 - array( 1873 - 0 => 'javelin-behavior', 1874 - 1 => 'javelin-util', 1875 - 2 => 'javelin-stratcom', 1876 - 3 => 'javelin-dom', 1877 - 4 => 'javelin-vector', 1878 - 5 => 'javelin-magical-init', 1879 - 6 => 'javelin-request', 1880 - 7 => 'javelin-history', 1881 - 8 => 'javelin-workflow', 1882 - 9 => 'javelin-mask', 1883 - 10 => 'javelin-behavior-device', 1884 - 11 => 'phabricator-keyboard-shortcut', 1885 1885 ), 1886 1886 'd83a949c' => 1887 1887 array(
+8 -1
src/applications/pholio/view/PholioMockImagesView.php
··· 67 67 $nonimage_uri = celerity_get_resource_uri( 68 68 'rsrc/image/icon/fatcow/thumbnails/default.p100.png'); 69 69 70 + $engine = id(new PhabricatorMarkupEngine()) 71 + ->setViewer($this->getUser()); 72 + foreach ($mock->getAllImages() as $image) { 73 + $engine->addObject($image, 'default'); 74 + } 75 + $engine->process(); 76 + 70 77 foreach ($mock->getAllImages() as $image) { 71 78 $file = $image->getFile(); 72 79 $metadata = $file->getMetadata(); ··· 86 93 'width' => $x, 87 94 'height' => $y, 88 95 'title' => $image->getName(), 89 - 'desc' => $image->getDescription(), 96 + 'descriptionMarkup' => $engine->getOutput($image, 'default'), 90 97 'isObsolete' => (bool)$image->getIsObsolete(), 91 98 'isImage' => $file->isViewableImage(), 92 99 'isViewable' => $file->isViewableInBrowser(),
+1 -1
src/applications/pholio/view/PholioUploadedImageView.php
··· 34 34 ->setSigil('image-title') 35 35 ->setLabel(pht('Title')); 36 36 37 - $description = id(new AphrontFormTextAreaControl()) 37 + $description = id(new PhabricatorRemarkupControl()) 38 38 ->setName('description_'.$phid) 39 39 ->setValue($image->getDescription()) 40 40 ->setSigil('image-description')
+1
webroot/rsrc/css/application/pholio/pholio-edit.css
··· 86 86 text-align: left; 87 87 padding: 0; 88 88 margin: 0; 89 + clear: both; 89 90 } 90 91 91 92 .pholio-uploaded-image .pholio-image-details .aphront-form-label {
+5
webroot/rsrc/css/application/pholio/pholio.css
··· 200 200 .device-desktop a.pholio-image-button-link:hover .phui-icon-view { 201 201 color: {$sky}; 202 202 } 203 + 204 + .pholio-image-description { 205 + padding: 12px; 206 + border-top: 1px solid {$lightblueborder}; 207 + }
+6 -7
webroot/rsrc/js/application/pholio/behavior-pholio-mock-view.js
··· 628 628 image.title); 629 629 info.push(title); 630 630 631 - var desc = JX.$N( 632 - 'div', 633 - {className: 'pholio-image-description'}, 634 - image.desc); 635 - info.push(desc); 636 - 637 631 if (!image.isObsolete) { 638 632 var embed = JX.$N( 639 633 'div', ··· 648 642 } 649 643 info = JX.$N('div', {className: 'pholio-image-info'}, info); 650 644 651 - return [buttons, info]; 645 + var desc = JX.$N( 646 + 'div', 647 + {className: 'pholio-image-description'}, 648 + JX.$H(image.descriptionMarkup)); 649 + 650 + return [buttons, info, desc]; 652 651 } 653 652 654 653 function render_reticle(classes) {