Open christopher-ha opened 5 months ago
Hey @christopher-ha. Thank you for reporting this, and I'm sorry about the visual inconsistency. Using your schema, I was able to replicate this issue. We will take a look at the layout here.
Comparing the two, the Image Card is rendering as a Stack with grid gap, but the Video Card is rendering as a Box which doesn't have the gap styling. Is there a reason these two components are rendered differently when the Card UI component should render this similarly no matter the children elements?
Upon further investigation its the type: file
that causes it. If you set this to type: image
, the bug resolves. Something is wrong how file types are rendered in the card component.
Describe the bug
The file picker in comparison to the image picker has no spacing between div elements resulting in an unpolished UI for client handoff.
To Reproduce
Steps to reproduce the behavior:
const carousel = { name: "carousel", title: "Carousel", type: "object", icon: InlineElementIcon, fields: [ { name: "media", title: "Media", type: "array", of: [ { name: "image", title: "Image", type: "image", icon: ImagesIcon, fields: [ { name: "title", title: "Title", type: "string" }, { name: "alt", title: "Caption", type: "string", }, ], options: { metadata: ["blurhash", "lqip", "palette"], }, }, { name: "video", title: "Video", type: "file", icon: DocumentVideoIcon, fields: [ { name: "title", title: "Title", type: "string" }, { name: "alt", title: "Caption", type: "string", }, ], options: { accept: "video/*", }, }, ], }, ], preview: { select: { media: "media", }, }, components: { preview: CarouselPreview, }, };
export default carousel;