Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support ANSI escape sequence in trace explorer web view #320

Closed
lemmy opened this issue Jan 8, 2024 · 2 comments
Closed

Support ANSI escape sequence in trace explorer web view #320

lemmy opened this issue Jan 8, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@lemmy
Copy link
Member

lemmy commented Jan 8, 2024

TLC supports ANSI escape sequences to, e.g., colorize counterexmples: Screenshot 2024-01-07 at 9 18 23 PM

The extension's webview should properly render the ANSI escape sequences:

image

https://github.com/rburns/ansi-to-html appears to come with the relevant functionality.

@afonsonf Please advice if https://github.com/rburns/ansi-to-html would be a sensible choice to support ANSI?

@lemmy lemmy added the enhancement New feature or request label Jan 8, 2024
lemmy added a commit that referenced this issue Jan 8, 2024
Uses insecure `dangerouslySetInnerHTML` & `unsafe-inline`.

Implements Github issue #320
#320

[Feature]

Signed-off-by: Markus Alexander Kuppe <github.com@lemmster.de>
lemmy added a commit that referenced this issue Jan 8, 2024
Implements Github issue #320
#320

[Feature]

Signed-off-by: Markus Alexander Kuppe <github.com@lemmster.de>
lemmy added a commit that referenced this issue Jan 8, 2024
The library `ansi-to-react` automatically wraps the content of `value.str` in a `<code>` tag. This results in the text being displayed with a distinct color and a grayish background. Ideally, `ansi-to-react` would not insert a `<code>` tag. However, the tag is [hardcoded into the library](https://github.com/lemmy/ansi-to-react/blob/681753c5e897c80c3afb269f9b3bbf33abab2a2e/src/index.ts#L170).

Polishes Github issue #320
#320

[Feature]

Signed-off-by: Markus Alexander Kuppe <github.com@lemmster.de>
lemmy added a commit that referenced this issue Jan 8, 2024
The JS ecosystem keeps on giving.

Fixes build breakage of Github issue #320
#320

[Feature]

Signed-off-by: Markus Alexander Kuppe <github.com@lemmster.de>
lemmy added a commit that referenced this issue Jan 8, 2024
Moar fun: microsoft/vscode#200708 (comment)

Fixes build breakage of Github issue #320
#320

[Feature]

Signed-off-by: Markus Alexander Kuppe <github.com@lemmster.de>
lemmy added a commit that referenced this issue Jan 8, 2024
Uses insecure `dangerouslySetInnerHTML` & `unsafe-inline`.

Implements Github issue #320
#320

[Feature]

Signed-off-by: Markus Alexander Kuppe <github.com@lemmster.de>
lemmy added a commit that referenced this issue Jan 8, 2024
Implements Github issue #320
#320

[Feature]

Signed-off-by: Markus Alexander Kuppe <github.com@lemmster.de>
lemmy added a commit that referenced this issue Jan 8, 2024
The library `ansi-to-react` automatically wraps the content of `value.str` in a `<code>` tag. This results in the text being displayed with a distinct color and a grayish background. Ideally, `ansi-to-react` would not insert a `<code>` tag. However, the tag is [hardcoded into the library](https://github.com/lemmy/ansi-to-react/blob/681753c5e897c80c3afb269f9b3bbf33abab2a2e/src/index.ts#L170).

Polishes Github issue #320
#320

[Feature]

Signed-off-by: Markus Alexander Kuppe <github.com@lemmster.de>
lemmy added a commit that referenced this issue Jan 8, 2024
The JS ecosystem keeps on giving.

Fixes build breakage of Github issue #320
#320

[Feature]

Signed-off-by: Markus Alexander Kuppe <github.com@lemmster.de>
lemmy added a commit that referenced this issue Jan 8, 2024
Moar fun: microsoft/vscode#200708 (comment)

Fixes build breakage of Github issue #320
#320

[Feature]

Signed-off-by: Markus Alexander Kuppe <github.com@lemmster.de>
@afonsonf
Copy link
Collaborator

afonsonf commented Jan 8, 2024

The library you used (https://github.com/sagemathinc/ansi-to-react) seems to be a good option yes

@lemmy
Copy link
Member Author

lemmy commented Jan 8, 2024

image

@lemmy lemmy closed this as completed Jan 8, 2024
lemmy added a commit that referenced this issue Jan 8, 2024
ansi-to-react does not need `unsafe-inline`.

Corrects merge mistake of Github issue #320
#320

[Feature]

Signed-off-by: Markus Alexander Kuppe <github.com@lemmster.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

2 participants