Enable preformatting of job attempt logs#530
Open
jwarner112 wants to merge 1 commit intoriverqueue:masterfrom
Open
Enable preformatting of job attempt logs#530jwarner112 wants to merge 1 commit intoriverqueue:masterfrom
jwarner112 wants to merge 1 commit intoriverqueue:masterfrom
Conversation
I recognize that it's ill-advised to use the metadata to store lots of logs. However, the logs I do provide, I'd like to have control over the output for. The `<code>` block in the [PlaintextPanel][a] prevents any attempts at pre-formatting. In the backend, these logs are glommed together as a single `[]byte` and that's fine, but upon output, that should make rendering the output of the `TextHandler` or `JSONHandler` easy; both of them separate records with newlines. With the use of a simple `<code>` tag, there's no way to perform any kind of formatting. It will strip it all. This PR changes the PlainText component's `<code></code>` to a `<pre><code></code></pre>`, and I hope you'll consider approval. [a]: https://github.com/riverqueue/riverui/blob/9df43c2f4f86cd726997ada749ac42e07be8b3f2/src/components/PlaintextPanel.tsx#L127-L129
Collaborator
|
@bgentry Ugh, Blake I might have to kick this one over to you. I think it seems okay from a general HTML sense (it's common for the pre and code elements to be found together), but not sure if there'd be any gotchas to look out here given the expansive TS stack. |
Author
|
Thanks for the reply! From my research, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I recognize that it's ill-advised to use the metadata to store lots of logs. However, the logs I do provide, I'd like to have control over the output for. The
<code>block in the PlaintextPanel prevents any attempts at pre-formatting.In the backend, these logs are glommed together as a single
[]byteand that's fine, but upon output, that should make rendering the output of theTextHandlerorJSONHandlereasy; both of them separate records with newlines. With the use of a simple<code>tag, there's no way to perform any kind of formatting. It will strip it all.This PR changes the PlainText component's
<code></code>to a<pre><code></code></pre>, and I hope you'll consider approval.