Page MenuHomePhabricator

Build a 2-up preview mode into the fullscreen Remarkup editor
Open, WishlistPublic

Tokens
"Like" token, awarded by leoluk."Party Time" token, awarded by spawnlt."Like" token, awarded by mcorteel."Piece of Eight" token, awarded by rdfree50."Like" token, awarded by OCram."Like" token, awarded by champo."Like" token, awarded by dmgander."Like" token, awarded by timesking."Love" token, awarded by calfzhou."Like" token, awarded by piaolingxue."Like" token, awarded by bunam."Like" token, awarded by benvium."Like" token, awarded by mim.
Assigned To
None
Authored By
aruizca, Oct 15 2013

Description

We have many places where people may want to write and preview Remarkup in a clean, simple interface. We have the additional restraint that these places may be themselves space constrained, like Conpherence, Durable Column, Pholio Comments, Differential Inline comments. I'd like to design out a more complete Fullscreen editor that has a full preview column that updates as you type (50/50 left/right).

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
aruizca raised the priority of this task from to Wishlist.Oct 15 2013, 10:44 PM
aruizca added a project: Phriction.
aruizca added a subscriber: aruizca.
chad added a subscriber: Yomi.Mar 30 2014, 2:50 AM

◀ Merged tasks: T4702.

svemir added a subscriber: svemir.Jun 24 2014, 12:28 PM
mim added a subscriber: mim.Jul 28 2014, 7:52 AM

Had same complains and I think this feature will be reasonably useful.
Hopefully will be implemented any time soon.

mim awarded a token.Jul 28 2014, 7:53 AM
benvium added a subscriber: benvium.

This is my number one feature request for Phabricator. A long Wiki page is really hard to edit with the preview at the bottom of the screen. I've often used the Chrome inspector to 'munge' the CSS so I can see the preview on the right, which helps a little.

same here, this option would be quite useful.
Two independent scrollable views. one to write and one for preview.
This can be placed side by side in the white space when you comment task, create it or in Phriction pages.

Can i bump and add a thing ?

  • this mode should be visible in a new button full screen + preview because if we go in the full screen edit it's for long edit

also how i can help ?

piaolingxue added a subscriber: piaolingxue.
timesking added a subscriber: timesking.
eadler added a subscriber: eadler.Apr 28 2015, 3:20 AM
chad renamed this task from Phriction Feature Request: Markdown preview on the right hand side instead of below to Build a preview mode into the fullscreen Remarkup editor.May 6 2015, 4:20 PM
chad updated the task description. (Show Details)
chad edited projects, added Remarkup; removed Phriction.
chad updated the task description. (Show Details)May 6 2015, 7:23 PM
btrahan claimed this task.May 21 2015, 9:14 PM

My attempt(s) yesterday focused around trying to stick the existing preview in the pertinent area via CSS.

My next attempt will instead create a new preview area in the DOM and have the preview behavior set the pertinent HTML for the existing preview and the preview I am building (2x). This struck me as dirty before, but after more than a few hours wrestling CSS I'm pretty sure this will be cleaner and less buggy.

Implementation wrinkle is differential, maniphest, conpherence (and possibly more) need implementation detail slightly different than the generic transaction technology. Nothing too major here but its not going to be as uber clean as one might like.

chad added a comment.May 22 2015, 4:05 PM

If the design is missing anything, let me know, though I think this is straightforward interaction-wise.

The only piece there is the "Document Preview" label is either going to be just "Preview" or something per object type, like "Comment Preview" or "Message Preview", etc. I figure that's NBD but I do plan to deviate there.

After thinking about this for a bit, I sort of question whether this is actually a very good solution. I think there are three root problems:

  1. Poor preview behavior on mobile, mostly resulting from network performance (T1895).
  2. You need to do a lot of scrolling when composing large documents, like Phriction pages (T7271).
  3. No message preview in Conpherence (T8088).

This doesn't directly affect mobile and presumably isn't a usable view on mobile, so I think it doesn't solve (1). I think the fix there almost certainly needs to be a click-to-preview workflow, like the one described in T8088.

This is probably the right general way forward for T7271, but I think doesn't completely fix it. It will improve it a lot if the document is about a page long. If the document is more than a page long, I worry you'll need to independently scroll the preview and text input a lot to line them up. Making the preview scroll correctly automatically seems very hard (although maybe I'm overestimating the difficulty of getting this to feel "good enough"). I worry this approach may feel pretty bad for 3+ page documents without a lot more work to get the scrolling to line up. If we did that work, it seems like it would be better in all cases for editing large documents like Phriction pages and Legalpad, and that we'd be better off replacing the main editing UI with a 2-up UI rather than burying this UI so deeply.

This sort of works around (3), but it's fairly heavyweight, buried, and won't work on mobile.

If the fix to (1) is click-to-preview, building that (like T8088) and just defaulting to it in Conpherence seems cleaner than pursuing this?

Pursuing a 2-up view generally seems very hard to get right in the 3+ page document case.

chad added a comment.May 22 2015, 5:33 PM

I think you're right on 1), that we may need to pursue a click to preview for alternative cases like mobile. In regards to a 2-up view only being useful in Phriction/Legalpad, I'd probably disagree. Mostly, I don't know when or where I might want to spend an hour typing something out (comment, new task, Pholio, etc) so having something available everywhere would be my preference. In the basic sense, even if I have to manually scroll each window, it's still seems like improvement over the current situation. Or at least, I'd like to feel it out before deciding it was really bad.

chad added a comment.May 22 2015, 5:40 PM

Thought maybe this is also a lot more work that I thought to even test out, up to @btrahan.

I do think we can get the scrolling to work well, even if it feels pretty bad with the naive approach, but would have to do something like this:

  • Add a trace/marker mode to the Remarkup engine.
  • In this mode, each block element generates invisible start/end markers in the document based on which lines it generated from.
  • In JS, we can then look at the scroll position / cursor position of the textarea, use the markers to figure out the corresponding pixel positions in the preview, and scroll appropriately.
  • Some block-level elements could support cursor positioning within the element, too, although this would probably need to be element-by-element and I'm not sure how useful it would be.
  • This could possibly extend into "Edit this paragraph" for Phriction, if the output could generate with line markers.
  • But this is probably a huge amount of work.

Taking a step back here...

  • I think users actually want a WYSIWYG editor. That said, I don't think its as actually valuable as the wants indicate and people wouldn't be particularly more effective or efficient with it after they learn remarkup; definitely very useful for new users. Mainly because I don't think people create content and format that content at the exact same time, and the overhead of scrolling to see the preview, clicking preview, etc really isn't that bad. Just to really hammer on this, I think people use their whole brain to think about the words they are writing, then switch to caring about how the words look and back again. Upfront, this switch may happen a bunch, but overtime the formatting bit is more mechanical. As an example, imagine building a table in Remarkup. I think people would check out the preview a bunch at the start, then get into a mechanical rhythm / trust the Remarkup directly and focus back on the content.
  • Similarly, I think something like getting scrolling in the preview area is something we can punt on, despite users wanting it. The overhead of having to scroll that second area really isn't that bad, and as they keep on writing they won't be checking it out that often in the common case.
  • I do like the fullscreen side by side thing conceptually; my kind-of-working-version feels good too.
  • I think T1895 is an important problem out of scope of this task. To me, its most important to start queuing the drafting / preview requests, as I am pretty sure the phone gets overwhelmed with the per keystroke requests and slow internet.
bnealey renamed this task from Build a preview mode into the fullscreen Remarkup editor to uild a preview mode into the fullscreen Remarkup editor.Jul 8 2015, 11:26 AM
bnealey raised the priority of this task from Wishlist to Normal.
epriestley renamed this task from uild a preview mode into the fullscreen Remarkup editor to Build a preview mode into the fullscreen Remarkup editor.Jul 8 2015, 11:27 AM
epriestley lowered the priority of this task from Normal to Wishlist.

I am sorry to have deleted the "B"....

  • Because epriestley had to change it back?

Dear epriestley,

Is that an automatic error correction?

Kindly,
Brandon

No, I fixed it manually.

OK, I love you. Much love!

dmgander added a subscriber: dmgander.
OCram added a subscriber: OCram.
epriestley added a subscriber: btrahan.

Building something generalish here may be the best way to unblock D14802, and to reduce the amount of regression behavior from T9905 (I am missing the preview a little myself). I think we need click-to-preview in some cases (mobile, Conpherence) anyway, so my tentative plan is:

  1. build a generic click-to-preview remarkup endpoint;
  2. build click-to-preview into remarkup controls (best solution for mobile, conpherence);
  3. see if we can get a "good enough" 2-up preview, per earlier work.
qgil removed a subscriber: qgil.Dec 22 2015, 5:38 PM
fanis added a subscriber: fanis.Dec 28 2015, 9:02 AM
chad moved this task from Backlog to Fullscreen Editor on the Remarkup board.Mar 27 2017, 3:48 PM
epriestley removed epriestley as the assignee of this task.Jun 28 2017, 4:21 PM
  • Remarkup areas got inline previews in D14855.
  • EditEngine got some extensions to restore similar on-page previews to Maniphest.

Remaining work:

  • Explore 2-up previews.
epriestley renamed this task from Build a preview mode into the fullscreen Remarkup editor to Build a 2-up preview mode into the fullscreen Remarkup editor.Jun 28 2017, 4:21 PM
urzds added a subscriber: urzds.Jul 12 2017, 11:16 AM
spawnlt added a subscriber: spawnlt.
leoluk added a subscriber: leoluk.Sep 8 2019, 5:22 PM
leoluk awarded a token.Sep 8 2019, 5:22 PM