Page MenuHomePhabricator

Update Phriction for PHUIDocumentViewPro
ClosedPublic

Authored by chad on Nov 4 2015, 2:27 AM.
Tags
None
Referenced Files
F14048023: D14399.id34785.diff
Thu, Nov 14, 6:28 AM
F14048021: D14399.id35160.diff
Thu, Nov 14, 6:28 AM
F14043013: D14399.id35165.diff
Tue, Nov 12, 7:18 AM
F14036865: D14399.id35160.diff
Sun, Nov 10, 12:37 PM
F14026541: D14399.id35160.diff
Fri, Nov 8, 1:38 AM
F14019387: D14399.id35165.diff
Tue, Nov 5, 10:01 PM
F14019386: D14399.id35160.diff
Tue, Nov 5, 10:01 PM
F14019385: D14399.id34785.diff
Tue, Nov 5, 10:01 PM
Subscribers

Details

Summary

Moves Phriction to use PHUIDocumentViewPro

Test Plan

Read lots of documents, tablet, mobile, and desktop. Check ToC, non ToC, Edit a Maniphest Task, New Phriction Document, edit Phriction Document.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

chad retitled this revision from to Update Phriction for PHUIDocumentViewPro.
chad updated this object.
chad edited the test plan for this revision. (Show Details)
chad added a reviewer: epriestley.
src/applications/phriction/controller/PhrictionDocumentController.php
464

Having issues getting this to kick back the Table of Contents... but I pulled it from PhrictionContent. What's the best place to get the ToC as a separate entity?

src/applications/phriction/controller/PhrictionDocumentController.php
465

The $engine you're using here is empty, while the $engine in the original is one that has been used to process the text.

If you do a purely standalone generation of the TOC, you'll have to do the work for generating it twice -- once to generate the body, then once to regenerate it to get the TOC.

Easiest fix for now at least is probably making didMarkupText() just have a side effect like:

$this->renderedTableOfContents = ...

...then add a method like:

public function getRenderedTableOfContents() {
  if ($this->renderedTableOfContents === null) {
    throw new PhutiIInalidStateException('didMarkupText');
  }
  return $this-> renderedTableOfContents;
}

...to fetch it. I think that will work until I can clean up Remarkup more generally.

chad planned changes to this revision.Nov 5 2015, 5:34 PM
  • Toc Renders
  • Add DOCUMENT to PHUIRemarkupPreviewView
chad edited the test plan for this revision. (Show Details)
epriestley edited edge metadata.
epriestley added inline comments.
src/applications/phriction/controller/PhrictionDocumentController.php
88

(Weird indent?)

src/applications/phriction/storage/PhrictionContent.php
131

(Weird indent?)

This revision is now accepted and ready to land.Nov 22 2015, 9:03 PM
This revision was automatically updated to reflect the committed changes.
chad marked 2 inline comments as done.