Feature: Object Variable Interpolation (#6317)

* Added JSON stringify for object values to allow for proper display
Added styling changes to accommodate objects

* Switching to a multi line approach
This commit is contained in:
Steven
2026-02-16 07:49:40 -05:00
committed by GitHub
parent f7cedcbd92
commit 8724201148
2 changed files with 16 additions and 4 deletions

View File

@@ -395,11 +395,12 @@ const GlobalStyle = createGlobalStyle`
font-size: ${(props) => props.theme.font.size.base};
font-family: Inter, sans-serif;
font-weight: 400;
word-break: break-word;
overflow-wrap: break-word;
white-space: pre-wrap;
line-height: 1.25rem;
color: ${(props) => props.theme.dropdown.color};
min-height: 1.75rem;
max-width: 13.1875rem;
max-width: 17.1875rem;
}
/* Value Editor (CodeMirror) */

View File

@@ -91,9 +91,20 @@ const getMaskedDisplay = (value) => {
const updateValueDisplay = (valueDisplay, value, isSecret, isMasked, isRevealed) => {
if ((isSecret || isMasked) && !isRevealed) {
valueDisplay.textContent = getMaskedDisplay(value);
} else {
valueDisplay.textContent = value || '';
return;
}
if (typeof value === 'object') {
valueDisplay.textContent = value === null ? 'null' : JSON.stringify(value, null, 2);
return;
}
if (typeof value === 'undefined' || value === undefined) {
valueDisplay.textContent = '';
return;
}
valueDisplay.textContent = value;
};
// Check if the raw value contains references to secret variables