Skip to content

Conversation

@bongguma
Copy link
Contributor

@bongguma bongguma commented Dec 23, 2025

About

WdsSnackbar, WdsToast, WdsSectionMessage와 같은 메시지 UI 컴포넌트를 통합적으로 관리할 수 있는 유틸리티를 도입하고, 기존 토스트 사용 방식을 새로운 구조로 리팩터링 진행했어요.

메시지 표시·해제의 생명주기를 일관되게 관리할 수 있도록 WdsMessageController와 BuildContext 확장 메서드를 추가해, 전반적인 사용성과 유지보수성을 개선했어요.

Changes

메시지 위젯 관리 구조 개선

  • 메시지 위젯의 표시와 해제를 담당하는 WdsMessageController를 새로 추가
  • BuildContext에 onMessage 확장 메서드를 제공해 WdsSnackbar, WdsToast, WdsSectionMessage를 공통 인터페이스로 표시
  • 노출 시간, 하단 오프셋, 외부 탭 시 닫힘 여부 등 메시지 동작을 유연하게 제어
  • 새 유틸리티를 util.dart와 wds.dart에서 export해, 전역에서 쉽게 사용 가능
  • 화면 너비에 따라 최소 너비 결정 데스크탑/태블릿 : 420px이며, 420px인 이유는 윙크 웹 max-width가 420px / 모바일은 최대 너비

Toast 사용처 리팩터링

  • toast_use_case.dart에서 기존 토스트 컨트롤러 및 유틸 로직을 제거하고, WdsMessageController와 onMessage 기반 구조로 전환
  • 이를 통해 토스트 로직이 다른 메시지 컴포넌트와 동일한 패턴으로 관리되도록 통일
  • (🚨 PR 머지 이전에 wds_toast_util.dart는 삭제해도 되지 않을까 싶음 ..)

@github-actions
Copy link

🎨 Widgetbook Preview

🧭 Branch: fix-wds-toast-width-infinity
🔗 Preview URL

💡 This preview will be updated automatically when you push new commits.

@seunghwanly
Copy link
Contributor

그럼 부모위젯에서 제한을 두면 괜찮을까요? 유스케이스에서도 제한해두고 싶습니다 너무 길어져요

@github-actions
Copy link

🎨 Widgetbook Preview

🧭 Branch: fix-wds-toast-width-infinity
🔗 Preview URL

💡 This preview will be updated automatically when you push new commits.

@github-actions
Copy link

🎨 Widgetbook Preview

🧭 Branch: fix-wds-toast-width-infinity
🔗 Preview URL

💡 This preview will be updated automatically when you push new commits.

@github-actions
Copy link

🎨 Widgetbook Preview

🧭 Branch: fix-wds-toast-width-infinity
🔗 Preview URL

💡 This preview will be updated automatically when you push new commits.

@bongguma bongguma changed the title fix: wdsToast > width size infinity로 설정 Re Dec 23, 2025
@bongguma bongguma changed the title Re Refactor: 메시지 UI 공통 컨트롤러 도입 및 Toast 사용 구조 개선 Dec 23, 2025
@github-actions
Copy link

🎨 Widgetbook Preview

🧭 Branch: fix-wds-toast-width-infinity
🔗 Preview URL

💡 This preview will be updated automatically when you push new commits.

@seunghwanly seunghwanly merged commit 59db283 into main Dec 23, 2025
1 check failed
@seunghwanly seunghwanly deleted the fix-wds-toast-width-infinity branch December 23, 2025 07:09
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.

3 participants