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

To improve wrapping behavior of rendered README files, don't use "PHUIDocumentView" in Diffusion

Summary:
See PHI1268. We currently do some weird width handling when rendering Diffusion readmes in a document directory view.

I think this came from D12330, which used `PHUIDocumentViewPro` to change the font, but we later reverted the font and were left with the `DocumentView`. Other changes after that modified `DocumentView` to have fixed-width behavior, but it doesn't make much sense here since the content panel is clearly rendered full-width.

Today, the `DocumentView` is a more structural element with methods like `setCurtain()`. Just get rid of it to simplify things, at least as a first step.

Test Plan:
Before:

{F6463493}

After:

{F6463492}

Reviewers: amckinley

Reviewed By: amckinley

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

+8 -6
+8 -6
src/applications/diffusion/view/DiffusionReadmeView.php
··· 75 75 $engine = $markup_object->newMarkupEngine($markup_field); 76 76 77 77 $readme_content = $content; 78 - $class = null; 78 + $class = 'ml'; 79 79 break; 80 80 case 'rainbow': 81 81 $content = id(new PhutilRainbowSyntaxHighlighter()) ··· 93 93 break; 94 94 } 95 95 96 - $readme_content = phutil_tag_div($class, $readme_content); 97 - $document = id(new PHUIDocumentView()) 98 - ->setFluid(true) 99 - ->appendChild($readme_content); 96 + $readme_content = phutil_tag( 97 + 'div', 98 + array( 99 + 'class' => $class, 100 + ), 101 + $readme_content); 100 102 101 103 $header = id(new PHUIHeaderView()) 102 104 ->setHeader($readme_name) ··· 106 108 ->setHeader($header) 107 109 ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 108 110 ->addClass('diffusion-mobile-view') 109 - ->appendChild($document) 111 + ->appendChild($readme_content) 110 112 ->addClass('diffusion-readme-view'); 111 113 } 112 114