Skip to content

Commit 8fb21c1

Browse files
sehyunidaaadcshzj
andauthored
Loosen character limits on image (+ image gallery) and infobar (#1469)
* Loosen character limits on image and infobar * chore: update preview-tw.css --------- Co-authored-by: dcshzj <[email protected]>
1 parent 4de2331 commit 8fb21c1

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

apps/studio/public/assets/css/preview-tw.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1835,10 +1835,6 @@ video {
18351835
max-width: 80rem;
18361836
}
18371837

1838-
.max-w-\[100ch\] {
1839-
max-width: 100ch;
1840-
}
1841-
18421838
.max-w-\[128px\] {
18431839
max-width: 128px;
18441840
}
@@ -1859,6 +1855,10 @@ video {
18591855
max-width: 54rem;
18601856
}
18611857

1858+
.max-w-\[70ch\] {
1859+
max-width: 70ch;
1860+
}
1861+
18621862
.max-w-\[72\.5rem\] {
18631863
max-width: 72.5rem;
18641864
}

packages/components/src/interfaces/complex/Image.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export const ImageSchema = Type.Object(
4646
caption: Type.Optional(
4747
Type.String({
4848
title: "Caption",
49-
maxLength: 100,
49+
maxLength: 250,
5050
format: "textarea",
5151
}),
5252
),

packages/components/src/interfaces/complex/Infobar.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const generateInfobarSchema = ({
3131
description: Type.Optional(
3232
Type.String({
3333
title: "Description",
34-
maxLength: 100,
34+
maxLength: 200,
3535
}),
3636
),
3737
variant: Type.Optional(

packages/components/src/templates/next/components/complex/Image/Image.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const createImageStyles = tv({
77
slots: {
88
container: "mt-0 [&:not(:first-child)]:mt-7",
99
caption:
10-
"overflow-wrap break-word prose-label-sm-medium mt-2 max-w-[100ch] text-base-content-subtle md:mx-auto md:text-center",
10+
"overflow-wrap break-word prose-label-sm-medium mt-2 max-w-[70ch] text-base-content-subtle md:mx-auto md:text-center",
1111
image: "mx-auto h-auto max-w-full rounded",
1212
},
1313
variants: {

packages/components/src/templates/next/components/complex/ImageGallery/ImageGalleryClient.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const createImagePreviewStyles = tv({
2121
"border-base-content outline outline-[0.25rem] outline-offset-[-0.25rem] outline-base-content",
2222
},
2323
false: {
24-
container: "border-base-divider-subtle hover:opacity-80",
24+
container: "border-base-divider-medium hover:opacity-80",
2525
},
2626
},
2727
numberOfImages: {
@@ -207,7 +207,7 @@ export const ImageGalleryClient = ({
207207
/>
208208
{image.caption && (
209209
<div className="prose-label-sm-medium absolute bottom-0 left-0 right-0 bg-base-canvas-inverse-overlay/90 p-3 text-white">
210-
{image.caption}
210+
<div className="line-clamp-3">{image.caption}</div>
211211
</div>
212212
)}
213213
</div>

0 commit comments

Comments
 (0)