Skip to content

Comments

Prompt 컴포넌트 리팩토링 및 배경 이미지 오류, Storybook 이미지 오류 수정#59

Merged
dolmeengii merged 5 commits intodevfrom
storybook
Oct 20, 2025
Merged

Prompt 컴포넌트 리팩토링 및 배경 이미지 오류, Storybook 이미지 오류 수정#59
dolmeengii merged 5 commits intodevfrom
storybook

Conversation

@nijesmik
Copy link
Contributor

@nijesmik nijesmik commented Oct 20, 2025

작업 내용

@nijesmik nijesmik changed the title 배경 이미지 오류, Storybook 이미지 오류, Prompt 컴포넌트 수정 Prompt 컴포넌트 리팩토링 및 배경 이미지 오류, Storybook 이미지 오류 수정 Oct 20, 2025
@nijesmik nijesmik self-assigned this Oct 20, 2025
Copy link
Contributor

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 refactors the Prompt component by converting it from a class-based React component to a functional component, fixes background image sizing issues, and corrects Storybook image paths. The changes move the fullscreen prompt to a centralized location and improve the ImageBox component's implementation by using native <img> elements instead of CSS background images.

Key Changes:

  • Refactored FullscreenPrompt from class component with portal to functional component with CSS media queries
  • Fixed background image sizing by adding backgroundSize: 'cover' to body styles
  • Updated Storybook image paths from absolute (/images/...) to relative (./images/...)

Reviewed Changes

Copilot reviewed 19 out of 19 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/components/prompt/index.tsx New functional component implementation of FullscreenPrompt
src/components/prompt/index.css.ts New styles with media query-based responsive behavior
src/pages/landing/FullScreenPrompt.tsx Removed old class-based component file
src/pages/landing/index.css.ts Removed prompt-related styles (moved to component)
src/pages/landing/layout.tsx Removed local FullscreenPrompt usage
src/app/index.tsx Added centralized FullscreenPrompt at app level
src/components/frame/with-buttons/index.tsx Removed duplicate FullscreenPrompt usage
src/components/image-box/index.tsx Refactored to use <img> element instead of CSS background
src/components/image-box/index.css.ts Updated styles to support new img-based implementation
src/styles/main.css.ts Added backgroundSize: 'cover' to fix background image display
src/styles/sprinkles.css.ts Added aspectRatio: 'square' utility
src/constants/screen.ts New file defining device dimension constants
src/components/frame/constants.ts Refactored to use screen dimension constants
index.html Removed unused #prompt portal div
*.stories.tsx Updated image paths from /images/ to ./images/ for Storybook compatibility

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

})}
>
{children}
<img className={styles.image} src={imgSrc} alt={alt} />
Copy link

Copilot AI Oct 20, 2025

Choose a reason for hiding this comment

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

The alt prop is optional but no default value is provided. When alt is undefined, screen readers will announce the image filename, which may not be meaningful. Consider providing a default empty string for decorative images: alt={alt ?? ''}.

Suggested change
<img className={styles.image} src={imgSrc} alt={alt} />
<img className={styles.image} src={imgSrc} alt={alt ?? ''} />

Copilot uses AI. Check for mistakes.
@dolmeengii dolmeengii merged commit 729603b into dev Oct 20, 2025
1 check passed
@dolmeengii dolmeengii deleted the storybook branch October 20, 2025 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Prompt 컴포넌트 수정 스토리북 이미지 오류 수정 배경 이미지 여백 제거

2 participants