Skip to content

refactor(Toast): Toast 컴포넌트 storybook 및 접근성 개선#281

Open
namdaeun wants to merge 12 commits intomainfrom
feat/#272_toast
Open

refactor(Toast): Toast 컴포넌트 storybook 및 접근성 개선#281
namdaeun wants to merge 12 commits intomainfrom
feat/#272_toast

Conversation

@namdaeun
Copy link
Copy Markdown
Member

@namdaeun namdaeun commented Sep 30, 2025

변경사항

Toast 컴포넌트 Story명을 변경하였으며, description을 구체화했습니다.

기존 toast prop 중 action이 객체 형태여서 스토리북에 나타낼 땐 이에 대한 기능을 구체적으로 확인하지 못했는데, 이 객체 부분을 actionName, onActionClick의 두 개의 prop으로 나타내어 평면화함으로써 각각의 prop이 어떤 역할을 하는지 명시하고, 제어 가능하도록 수정했습니다.

또한 Toast 구현부에서 aria-live 속성을 통해 동적인 변경 부분(Toast 문구)을 감지해서 알려줄 수 있도록 했으며, aria-atomic: true을 통해 변경된 부분 전체를 읽도록 속성을 추가했습니다

시급한 정도

🏃‍♂️ 보통 : 최대한 빠르게 리뷰 부탁드립니다.

@namdaeun namdaeun requested a review from wuzoo September 30, 2025 05:44
@namdaeun namdaeun self-assigned this Sep 30, 2025
@height
Copy link
Copy Markdown

height Bot commented Sep 30, 2025

Link Height tasks by mentioning a task ID in the pull request title or commit messages, or description and comments with the keyword link (e.g. "Link T-123").

💡Tip: You can also use "Close T-X" to automatically close a task when the pull request is merged.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Sep 30, 2025

⚠️ No Changeset found

Latest commit: c0e2d90

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@namdaeun namdaeun changed the title refactor(ui): Toast 컴포넌트 storybook 및 접근성 개선 refactor(Toast): Toast 컴포넌트 storybook 및 접근성 개선 Sep 30, 2025
Copy link
Copy Markdown
Contributor

@constantly-dev constantly-dev left a comment

Choose a reason for hiding this comment

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

수고하셨습니다 간단한 코멘트만 확인해주세요!
추가로 useToast나 toast component에서 리팩터링 할 부분은 없을까요?

Comment thread packages/ui/Toast/parts/index.tsx Outdated
Comment on lines 21 to 22
const isDefaultIcon = typeof icon === 'string';
const DefaultIcon = isDefaultIcon ? convertToIcon[icon] : undefined;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

단순 궁금증인데 토스트 아이콘에 기본 아이콘 제외하하고 다른 element가 들어갈 일이 있나요?
interface에 React.ReactElement도 열어둬서 해당 조건도 확인해야하고, 아래 조건도 복잡해지는 것 같아서 질문 드립니다!

image

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

스크린샷 2026-01-17 오후 3 51 52

위 예시처럼 자주 쓰이지는 않지만 다른 아이콘이 들어갈 수도 있다 해서 열어뒀습니다 !

Comment thread apps/docs/src/stories/Toast.stories.tsx Outdated
Comment thread apps/docs/src/stories/Toast.stories.tsx Outdated
Comment thread apps/docs/src/stories/Toast.stories.tsx
Comment thread packages/ui/Toast/parts/index.tsx
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