qpixel icon indicating copy to clipboard operation
qpixel copied to clipboard

For suggested edits, can we show rendered version too and not just the Markdown source?

Open cellio opened this issue 3 years ago • 3 comments

https://meta.codidact.com/posts/287402

It can be hard for reviewers to evaluate suggested edits when Mathjax or other finicky formatting is involved, because the reviewer only sees the Markdown source. Even with the diff pointing out where the changes are, you might not be able to spot a Markdown error. It would be helpful if reviewers could also see the rendered output.

This request is to have a way for a user to switch between viewing the Markdown and viewing the output, keeping the side-by-side presentation (current and proposed edit). In an ideal world we'd show the diff in the output, but that's not strictly necessary so don't worry about it if it's a hassle. We have the diff for the Markdown and that wouldn't change, so that gives the reviewer access to the diff in the source at least.

If we added an option to get the rendered post below the Markdown, then a reviewer could see both in one page. Can we add an expander below the Markdown and above the approve/reject buttons labelled something like "show formatted post", and clicking that would add the side-by-side output? Would that be inefficient (if it has to be generated before the page can load, as opposed to only on demand)? The other approach would be a toggle, so you'd see either Markdown or output but not both, but especially if we can't show the diff in the output, I think it'd be good if a reviewer could see, say, the Mathjax change and its output together.

cellio avatar Jan 22 '23 05:01 cellio

Having the rendered output available on demand is good for cases where the reviewer has a concern and knows they need to double check, so this is a definite improvement.

However, for cases where the markdown/MathJax looks correct but has a subtle bug, this may be missed if the reviewer doesn't see a reason to open the rendered output.

For this reason I'd like to see the rendered output immediately and prominently visible so the reviewer will see it even when they don't realise that they need to. However, I understand this might be a less straightforward change, so maybe that should be a separate issue for discussion of the arguments for and against, and this current issue could just be for rendering output on demand?

If so, we could have this initial issue show the entire rendered output when the reviewer requests it (straightforward as we already show this during suggesting an edit). Then the separate further improvement issue could show the rendered output immediately and prominently, but only the relevant section of it (more challenging as there could be an arbitrary amount of required context before or after the edited section that would prevent correct rendering if omitted).

If that sounds reasonable I might hold off on opening a further issue until this one is completed so we know what foundation we're building on. Just getting this written somewhere as a reminder for later.

trichoplax avatar Jan 22 '23 12:01 trichoplax

That sounds good to me. We don't want people to have to page through a whole 30,000-character post before approving a one-line text change, but we should consider being more pro-active when there's a change where it would matter. The latter would require us to be able to focus on the specific change. Let's do this first part (make it available on demand) and then build on that. I don't know if having it behind an expander is performant (I hope so) or if we're going to need a separate load a la "write/preview" tabs here on GitHub, and the answer to that could affect future work.

I could also see users on some communities wanting an option for "always show", if most edits on Math, say, involve Mathjax.

cellio avatar Jan 22 '23 15:01 cellio

Related: https://github.com/codidact/qpixel/issues/1116

If we give people the option to see both raw and rendered versions in both suggested edits and history, we would address all of the issues raised here and there.

cellio avatar Apr 06 '25 03:04 cellio