Fix: Support displaying newline characters in telemetry string values#3373
Closed
ryanmelt-agent wants to merge 1 commit into
Closed
Fix: Support displaying newline characters in telemetry string values#3373ryanmelt-agent wants to merge 1 commit into
ryanmelt-agent wants to merge 1 commit into
Conversation
In packet viewer and other single-line value displays, embedded newlines in telemetry strings are now shown as visible \n escape sequences rather than silently truncating the display. \r and \t are similarly escaped. In TEXTBOX screen widgets, actual newlines are preserved so the v-textarea renders them as real line breaks, splitting the value across multiple rows. The opt-out is a data property (escapeSpecialCharacters: false) on the widget, keeping FormatValueBase generic for future multi-line widgets. Fixes OpenC3#154 Co-Authored-By: Paperclip <noreply@paperclip.ing>
|
Member
|
dup of #3376 |
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.




Summary
Telemetry string values containing newline (and other special whitespace) characters were silently truncated in the packet viewer and other single-line displays. In TEXTBOX screen widgets, newlines weren't rendered as actual line breaks.
Changes
FormatValueBase.jsformatValueBase(), when returning a plain string value, escape special whitespace characters:\n→\n(visible escape sequence)\r→\r\t→\t\r\n→\r\nescapeSpecialCharacters: falsein theirdata().TextboxWidget.vueescapeSpecialCharacters: falseso actual newline characters in telemetry values are preserved and rendered as real line breaks inside thev-textarea.Testing
"line1\nline2"now shows asline1\nline2in the packet viewer (escaped, no truncation).line2on its own line belowline1.Fixes #154