Truncate custom field display to 5 lines

This commit is contained in:
WithoutPants 2025-12-03 10:29:20 +11:00
parent e213fde0cc
commit a03b860624
2 changed files with 14 additions and 1 deletions

View file

@ -8,6 +8,7 @@ import { Icon } from "./Icon";
import { faMinus, faPlus } from "@fortawesome/free-solid-svg-icons";
import cx from "classnames";
import { PatchComponent } from "src/patch";
import { TruncatedText } from "./TruncatedText";
const maxFieldNameLength = 64;
@ -47,7 +48,7 @@ const CustomField: React.FC<{ field: string; value: unknown }> = ({
id={id}
label={field}
labelTitle={field}
value={valueStr}
value={<TruncatedText lineCount={5} text={<>{valueStr}</>} />}
fullWidth={true}
showEmpty
/>

View file

@ -712,6 +712,10 @@ button.btn.favorite-button {
.custom-fields {
width: 100%;
.detail-item {
max-width: 100%;
}
}
.custom-fields .detail-item .detail-item-title {
@ -721,6 +725,14 @@ button.btn.favorite-button {
white-space: nowrap;
}
.custom-fields .detail-item .detail-item-value {
word-break: break-word;
.TruncatedText {
white-space: pre-line;
}
}
.custom-fields-input > .collapse-button {
font-weight: 700;
}