diff --git a/shared/inspector/buildScalar.tsx b/shared/inspector/buildScalar.tsx
index 457897a7..f69ce213 100644
--- a/shared/inspector/buildScalar.tsx
+++ b/shared/inspector/buildScalar.tsx
@@ -70,7 +70,7 @@ export function renderValue(
showTypeTag: boolean = true,
overrideStyles: {[key: string]: string} = {},
implicitLength?: number,
- noMultiline: boolean = false
+ singleLineLimit?: boolean | number
): {body: JSX.Element; height?: number} {
if (value == null) {
return {body: {"{}"}};
@@ -155,9 +155,14 @@ export function renderValue(
// @ts-ignore - Intentional fallthrough
case "std::json":
- value = noMultiline ? value : prettyPrintJSON(value);
+ value = singleLineLimit ? value : prettyPrintJSON(value);
case "std::str": {
- const str = noMultiline ? toSingleLineStr(value) : strToString(value);
+ const str = singleLineLimit
+ ? toSingleLineStr(
+ value,
+ singleLineLimit === true ? undefined : singleLineLimit
+ )
+ : strToString(value);
return {
body: (
@@ -165,7 +170,7 @@ export function renderValue(
{implicitLength && value.length === implicitLength ? "…" : ""}
),
- height: noMultiline ? 1 : (str as string).split("\n").length,
+ height: singleLineLimit ? 1 : (str as string).split("\n").length,
};
}
}
diff --git a/shared/studio/tabs/dataview/reviewEditsModal.tsx b/shared/studio/tabs/dataview/reviewEditsModal.tsx
index 6a3e014e..ecdf4be2 100644
--- a/shared/studio/tabs/dataview/reviewEditsModal.tsx
+++ b/shared/studio/tabs/dataview/reviewEditsModal.tsx
@@ -191,7 +191,10 @@ function renderParam({
type.schemaType === "Range" || type.schemaType === "Multirange"
? type.elementType.name
: undefined,
- false
+ false,
+ undefined,
+ undefined,
+ 50
).body;
}
}