Skip to content

Conversation

@ShipFriend0516
Copy link
Owner

  • 이미지 Alt 태그를 이미지 밑에 띄워서 설명을 할 수 있는 기능 추가
  • 본문 내 이미지의 너비를 부모 요소의 기존 100%에서 90%로 제한
  • 글 작성시 div 태그로 이미지를 감싸는 경우 최대 너비를 50%로 제한 할 수 있는 기능 추가

@ShipFriend0516 ShipFriend0516 self-assigned this Aug 29, 2025
@ShipFriend0516 ShipFriend0516 added the 🪵 기능 추가 뚝딱뚝딱 label Aug 29, 2025
@vercel
Copy link

vercel bot commented Aug 29, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
blog Ready Ready Preview Comment Aug 29, 2025 4:09pm

@ShipFriend0516 ShipFriend0516 merged commit cd3895f into master Aug 29, 2025
3 checks passed
@ShipFriend0516 ShipFriend0516 requested a review from Copilot August 29, 2025 16:12
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds image alternative text rendering functionality to display alt text below images, along with responsive image sizing improvements. The changes enhance accessibility and provide better visual control over image display in post content.

  • Image alt text is now displayed as a description below images when available
  • Image width reduced from 100% to 90% of parent container for better layout
  • Added special handling for nested div images with 50% max-width and override for zoomBox images

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
app/globals.css Adds CSS rules for image width restrictions and alt text description styling
app/entities/post/detail/PostBody.tsx Implements alt text extraction and rendering functionality
app/entities/common/Overlay/Overlay.tsx Adds configurable maxWidth prop for overlay sizing
app/entities/common/Overlay/Image/ImageZoomOverlayContainer.tsx Updates image zoom container styling for better responsiveness

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

}
}

return null;
Copy link

Copilot AI Aug 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function always returns null but is used in a visitor pattern where it should return the node or undefined. The return value should be 'node' or the function should return void.

Suggested change
return null;

Copilot uses AI. Check for mistakes.
>
<div className="animate-popUp container bg-opacity-90 text-overlay rounded-lg mx-auto max-w-2xl">
<div
className={`animate-popUp container bg-opacity-90 text-overlay rounded-lg mx-auto ${isMaxWidthTypeNumber ? `max-w-[${maxWidth}px]` : `max-w-${maxWidth}`}`}
Copy link

Copilot AI Aug 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dynamic class name construction with template literals can lead to CSS injection vulnerabilities. Consider using a predefined map of allowed maxWidth values or sanitizing the input.

Copilot uses AI. Check for mistakes.
Comment on lines +96 to +98
article.post .post-body div > div.zoomBox img {
max-width: 100%;
}
Copy link

Copilot AI Aug 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CSS selector 'div > div.zoomBox img' is overly specific and tightly coupled to the HTML structure. Consider using a single class selector like '.zoomBox img' for better maintainability.

Suggested change
article.post .post-body div > div.zoomBox img {
max-width: 100%;
}

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants