add youtube videos#233
Conversation
Confidence Score: 4/5Safe to merge; the new dialog is well-isolated and follows established patterns in the codebase. The implementation is solid: optimistic reorder with rollback, proper loading states, and the isBusy guard preventing concurrent mutations. Only minor style issues were found — an any cast on the drag-listener render prop and a low-resolution YouTube thumbnail. DayVideosDialog.tsx is the most substantial new file and worth a quick read-through; the any on the SortableItem render prop and the thumbnail resolution are both minor but easy to polish before merging. Reviews (1): Last reviewed commit: "Merge remote-tracking branch 'origin/dev..." | Re-trigger Greptile |
| disabled={!isEditable || isBusy} | ||
| className="flex items-center gap-3 rounded-lg border border-dashed border-gray-300 dark:border-input p-2 bg-white dark:bg-[#161616]" | ||
| > | ||
| {({ listeners }: any) => ( |
There was a problem hiding this comment.
Using
any for the render-prop argument suppresses all type checking on listeners (the drag-and-drop event handlers). If SortableItem's callback signature is typed, this can be tightened to avoid silently passing the wrong shape at the call site.
| {({ listeners }: any) => ( | |
| {({ listeners }: { listeners?: React.HTMLAttributes<HTMLElement> }) => ( |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| )} | ||
| {videoId && ( | ||
| <img | ||
| src={`https://img.youtube.com/vi/${videoId}/default.jpg`} |
There was a problem hiding this comment.
default.jpg resolves to a 120×90 px thumbnail. For a w-20 h-14 (80×56 px) element it still looks blurry on HiDPI screens; mqdefault.jpg (320×180) is a better quality fallback that's still freely available from YouTube's CDN.
| src={`https://img.youtube.com/vi/${videoId}/default.jpg`} | |
| src={`https://img.youtube.com/vi/${videoId}/mqdefault.jpg`} |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
No description provided.