Repository navigation
댓글·답글 입력 버튼을 Figma 디자인에 맞춤 #50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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<Bool>.Binding | ||
|
|
@@ -23,13 +24,15 @@ public struct PickeCommentInputBar: View { | |
| focus: FocusState<Bool>.Binding, | ||
| placeholder: String, | ||
| isSendEnabled: Bool, | ||
| isSubmitting: Bool = false, | ||
| isCompact: Bool = false, | ||
| onSend: @escaping () -> Void | ||
| ) { | ||
| _text = text | ||
| 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) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When the user holds the compact send button, this style fades the entire label—including its icon and background—rather than rendering the designated pressed background. That produces a translucent, off-spec state and directly violates the repository requirement that pressed feedback use the component's AGENTS.md reference: AGENTS.md:L958-L958 Useful? React with 👍 / 👎. |
||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While a reply create/update request is in flight,
CommentReplyFeatureimmediately clearsreplyText, making the button disabled, butCommentReplyViewdoes not pass this new flag and therefore retains the defaultisSubmitting == false. This branch consequently paints the disabled reply button with the dark default background for the whole request, whereas the comment composer receives the intended disabled submission color; track and pass the reply submission state as well.Useful? React with 👍 / 👎.