Skip to content

Dim the background of newly written markup text while the document has errors #500

Open
@wrzian

Description

@wrzian

Description

A major complaint I have about the web-app is that while the document contains errors, writing new text doesn't give enough indication that it isn't reflected in the preview. Since most writing is just prose, it might not be obvious whether the text you're currently writing is problematic or if the error exists elsewhere.

I personally often create errors in code mode but leave them unfixed while writing markup, and I get temporarily confused when what I write isn't reflected in the document. This is also common when working with partners, as someone else might break the document with an error several screens away, and suddenly I lose the live preview of my text with no good indicator of what is or isn't written.

My suggestion is that when the document contains errors, any newly added text should have a dimmed/gray background to mark it as unrepresented in the preview. And this should only apply to text written in markup mode, since having this in code blocks would likely be annoying. (There could also be a tooltip or some icon in the line-number area so that it's not just color, but I think color should be the primary notifier.)

Use Case

If you're writing text with collaborators and they break the document, you'll know that what you're now writing isn't reflected in the preview because it has a different background color. Then you can choose to continue writing and wait for the collaborator to fix it, or pause and fix it yourself.

Here's a mockup of what I think this could look like:

Base text:
a paragraph of Typst in the web-app

Adding a new let-statement, but I don't realize it has an error:
adding a let-statement with an obvious error

So I continue writing a new sentence even though it isn't rendering:

Current With dimming on the new text
adding a sentence at the end of the paragraph now the added sentence is dimmed with a gray background

(I'm poor at image editing, but I hope you get the idea :) )

I think this would be a really nice visual cue, and would be a really nice improvement for the web-app.

Metadata

Metadata

Assignees

No one assigned

    Labels

    editorRelated to the text/markup editor.feature requestNew feature or request.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions