feat(gif-mood): masonry wall mode with DnD + flex columns
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 2m55s
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 2m55s
- Wall mode: flex columns (no empty bottoms), all GIFs mixed - DnD in wall: SortableContext on current user items only, others are fixed - Own GIFs show drag handle, others show avatar badge - Image min-h skeleton prevents 0-height layout slots while loading Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -26,6 +26,7 @@ export const GifMoodCard = memo(function GifMoodCard({
|
||||
const [itemVersion, setItemVersion] = useState(item);
|
||||
const [isPending, startTransition] = useTransition();
|
||||
const [imgError, setImgError] = useState(false);
|
||||
const [imgLoaded, setImgLoaded] = useState(false);
|
||||
const [isFocused, setIsFocused] = useState(false);
|
||||
const textareaRef = useRef<HTMLTextAreaElement>(null);
|
||||
|
||||
@@ -78,7 +79,8 @@ export const GifMoodCard = memo(function GifMoodCard({
|
||||
<img
|
||||
src={item.gifUrl}
|
||||
alt="GIF"
|
||||
className="w-full block"
|
||||
className={`w-full block ${imgLoaded ? '' : 'min-h-[80px]'}`}
|
||||
onLoad={() => setImgLoaded(true)}
|
||||
onError={() => setImgError(true)}
|
||||
/>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user