From 02233303f2d49bd3bc6de97593fb677f58ab306e Mon Sep 17 00:00:00 2001 From: Roy Date: Sat, 17 Oct 2026 22:42:20 +0900 Subject: [PATCH] =?UTF-8?q?=EB=8C=93=EA=B8=80=20=EC=9E=85=EB=A0=A5=20?= =?UTF-8?q?=EB=B2=84=ED=8A=BC=EC=9D=84=20=EB=94=94=EC=9E=90=EC=9D=B8=20?= =?UTF-8?q?=EC=BB=B4=ED=8F=AC=EB=84=8C=ED=8A=B8=EC=97=90=20=EB=A7=9E?= =?UTF-8?q?=EC=B6=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 빈 입력에서도 댓글과 답글의 전송 버튼 배경을 디자인 토큰의 기본 갈색으로 표시한다. 제출 중에는 비활성 토큰을 사용하고 눌림 피드백을 유지한다. --- .../Chat/Sources/Comment/View/CommentView.swift | 1 + .../Sources/Input/PickeCommentInputBar.swift | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/Projects/Feature/Chat/Sources/Comment/View/CommentView.swift b/Projects/Feature/Chat/Sources/Comment/View/CommentView.swift index d7d168af..a0e2c1d0 100644 --- a/Projects/Feature/Chat/Sources/Comment/View/CommentView.swift +++ b/Projects/Feature/Chat/Sources/Comment/View/CommentView.swift @@ -495,6 +495,7 @@ private extension CommentView { focus: $isCommentFocused, placeholder: "내용을 입력하세요", isSendEnabled: store.isSendEnabled, + isSubmitting: store.isSubmitting, isCompact: true, onSend: { isCommentFocused = false diff --git a/Projects/UI/PickeSharedUI/Sources/Input/PickeCommentInputBar.swift b/Projects/UI/PickeSharedUI/Sources/Input/PickeCommentInputBar.swift index 8379a531..12c8df7b 100644 --- a/Projects/UI/PickeSharedUI/Sources/Input/PickeCommentInputBar.swift +++ b/Projects/UI/PickeSharedUI/Sources/Input/PickeCommentInputBar.swift @@ -14,6 +14,7 @@ public struct PickeCommentInputBar: View { @Binding private var text: String private let placeholder: String private let isSendEnabled: Bool + private let isSubmitting: Bool private let isCompact: Bool private let onSend: () -> Void private var focus: FocusState.Binding @@ -23,6 +24,7 @@ public struct PickeCommentInputBar: View { focus: FocusState.Binding, placeholder: String, isSendEnabled: Bool, + isSubmitting: Bool = false, isCompact: Bool = false, onSend: @escaping () -> Void ) { @@ -30,6 +32,7 @@ public struct PickeCommentInputBar: View { self.focus = focus self.placeholder = placeholder self.isSendEnabled = isSendEnabled + self.isSubmitting = isSubmitting self.isCompact = isCompact self.onSend = onSend } @@ -76,11 +79,11 @@ private extension PickeCommentInputBar { .foregroundStyle(.iconGrayInverse) .frame(width: 40, height: 40) .background( - isSendEnabled ? .buttonIconBackgroundDefault : .buttonIconBackgroundDisabled, + isSubmitting ? .buttonIconBackgroundDisabled : .buttonIconBackgroundDefault, in: Circle() ) } - .buttonStyle(.plain) + .buttonStyle(CompactSendButtonStyle()) .disabled(!isSendEnabled) .accessibilityLabel("보내기") } @@ -127,3 +130,10 @@ private extension PickeCommentInputBar { .disabled(!isSendEnabled) } } + +private struct CompactSendButtonStyle: ButtonStyle { + func makeBody(configuration: Configuration) -> some View { + configuration.label + .opacity(configuration.isPressed ? 0.7 : 1) + } +}