Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,7 @@ private extension CommentView {
focus: $isCommentFocused,
placeholder: "내용을 입력하세요",
isSendEnabled: store.isSendEnabled,
isSubmitting: store.isSubmitting,
isCompact: true,
onSend: {
isCommentFocused = false
Expand Down
14 changes: 12 additions & 2 deletions Projects/UI/PickeSharedUI/Sources/Input/PickeCommentInputBar.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
}
Expand Down Expand Up @@ -76,11 +79,11 @@ private extension PickeCommentInputBar {
.foregroundStyle(.iconGrayInverse)
.frame(width: 40, height: 40)
.background(
isSendEnabled ? .buttonIconBackgroundDefault : .buttonIconBackgroundDisabled,
isSubmitting ? .buttonIconBackgroundDisabled : .buttonIconBackgroundDefault,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Propagate submission state from the reply composer

While a reply create/update request is in flight, CommentReplyFeature immediately clears replyText, making the button disabled, but CommentReplyView does not pass this new flag and therefore retains the default isSubmitting == 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 👍 / 👎.

in: Circle()
)
}
.buttonStyle(.plain)
.buttonStyle(CompactSendButtonStyle())
.disabled(!isSendEnabled)
.accessibilityLabel("보내기")
}
Expand Down Expand Up @@ -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)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Replace opacity with the pressed-state token

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 Background.pressed token instead of opacity; add/use the appropriate icon-button pressed token here.

AGENTS.md reference: AGENTS.md:L958-L958

Useful? React with 👍 / 👎.

}
}
Loading