vscode icon indicating copy to clipboard operation
vscode copied to clipboard

Show squigglies on collapsed regions containing errors or warnings (#120989)

Open gjsjohnmurray opened this issue 2 years ago • 11 comments

This PR closes #120989

junk

gjsjohnmurray avatar Aug 17 '23 15:08 gjsjohnmurray

@aeschli is folding your domain?

gjsjohnmurray avatar Aug 17 '23 15:08 gjsjohnmurray

Tweaked to reduce dominance of the squigglies:

image

gjsjohnmurray avatar Aug 18 '23 08:08 gjsjohnmurray

Thanks @gjsjohnmurray, Having the squigglies on the line number seems strange to me. What about annotating the... decorator? Could be squiggles or part of the decorator text.

@hediet @daviddossett Any ideas?

aeschli avatar Aug 25 '23 08:08 aeschli

Cool idea! I tend to agree. Either a decoration the chevron icon (i.e. chevron-dot like, bell-dot or similar) or a squiggle on the ... makes sense to me.

daviddossett avatar Aug 25 '23 16:08 daviddossett

Thanks for the feedback. Drawbacks I see to putting the decoration under the ... are that it won't always be visible if the first line of the folded section is long enough to require horizontal scrolling, and that ... may not be wide enough for the pattern differentiation between error squigglies and warning squigglies to be discernible (important for people unable to differentiate between the two colours).

I'm willing to give it a try, but I assume I've missed the cutoff for 1.82.

gjsjohnmurray avatar Aug 28 '23 15:08 gjsjohnmurray

I had a go at simulating the appearance of a 'chevron-dot' by using 'debug-coverage'

image

I think it's too cryptic. Nor would it differentiate between folds containing errors and those containing only warnings, unless we come up with two decorations.

I tried unsuccessfully to put the squiggles under the ... at the end of the folded line, or under the chevron-right at the start. I don't understand enough about how the editor CSS works.

I experimented with additional text after the ..., for instance ... (contains errors) but felt that looked ugly. Plus, there's another proposal to append the count of folded lines there.

gjsjohnmurray avatar Sep 08 '23 17:09 gjsjohnmurray

Any more thoughts about this?

gjsjohnmurray avatar Jan 15 '24 09:01 gjsjohnmurray

@hbons is UX your area? If so I would appreciate your input on this.

gjsjohnmurray avatar Mar 21 '24 07:03 gjsjohnmurray

Apologies, I've been on paternity leave until recently and this fell off my radar. Looking at it with fresh eyes, I wonder if we could just put the squiggles on whatever characters are visible when a region is collapsed. Once expanded, the squiggles are removed from the parent and show on the specific lines with errors.

I worry about changing the collapse iconography with similar logic. Once opened, we would suddenly change the icon with the error indicator to some nested level, and so on as more regions are expanded. That seems easier to reason about with squiggles, less so with icons.

daviddossett avatar Mar 22 '24 17:03 daviddossett

@daviddossett congratulations! Re icons, I don't like that idea either. But I think squiggling the whole of the text in the folded line would be confusing, implying that this line itself was entirely in error. Plus, if part of the line genuinely did deserve squiggles we would lose sight of that until we expanded it.

I still favour squiggles in the gutter.

gjsjohnmurray avatar Mar 22 '24 18:03 gjsjohnmurray

It will soon be the first anniversary of this PR of mine @daviddossett - any further thoughts about refining / accepting it?

gjsjohnmurray avatar Jul 10 '24 05:07 gjsjohnmurray