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
2 changes: 1 addition & 1 deletion .github/workflows/create-jira-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ jobs:
with:
actions: 'update-issue'
token: ${{ secrets.PAT_TOKEN }}
title: '[${{ steps.create.outputs.issue }}/${{ github.event.issue.title }}'
title: '[${{ steps.create.outputs.issue }}] ${{ github.event.issue.title }}'

- name: Add Jira issue link comment
uses: actions-cool/issues-helper@v3
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ public class BKBaseTextField: UITextField {
}
}

private let textFont = BKTextStyle.body2(weight: .medium).uiFont
private let placeholderFont = BKTextStyle.body2(weight: .regular).uiFont
private let textFont: UIFont?
private let placeholderFont: UIFont?
let clearButton: UIButton = {
let button = UIButton(type: .custom)
button.setImage(BKImage.Icon.xCircle, for: .normal)
Expand All @@ -40,12 +40,18 @@ public class BKBaseTextField: UITextField {

var onReturn: ((String) -> Void)?

private let fontStyle: BKTextStyle

public init(
frame: CGRect = .zero,
placeholder: String = "",
type: TextFieldType = .normal
type: TextFieldType = .normal,
fontStyle: BKTextStyle = .body2(weight: .medium)
) {
self.textFieldType = type
self.fontStyle = fontStyle
self.textFont = fontStyle.uiFont
self.placeholderFont = BKTextStyle.body2(weight: .regular).uiFont
super.init(frame: frame)
self.placeholder = placeholder
configure()
Expand Down Expand Up @@ -136,12 +142,34 @@ private extension BKBaseTextField {
returnKeyType = .done
layer.cornerRadius = BKRadius.small
backgroundColor = .bkBaseColor(.secondary)
font = BKTextStyle.body2(weight: .medium).uiFont
font = textFont
textColor = .bkContentColor(.primary)
textAlignment = .natural

applyTypingAttributes()

applyClearButtonStyle()
applyPlaceholderStyle()
}

func applyTypingAttributes() {
guard let font = textFont else { return }

let paragraphStyle = fontStyle.paragraphStyle
paragraphStyle.alignment = textAlignment

typingAttributes = [
.font: font,
.foregroundColor: UIColor.bkContentColor(.primary),
.paragraphStyle: paragraphStyle
]

defaultTextAttributes = [
.font: font,
.foregroundColor: UIColor.bkContentColor(.primary),
.paragraphStyle: paragraphStyle
]
}

func applyClearButtonStyle() {
let containerView = UIView()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,14 @@ public final class BKSearchTextField: BKBaseTextField {
public override init(
frame: CGRect = .zero,
placeholder: String = "",
type: BKBaseTextField.TextFieldType = .normal
type: BKBaseTextField.TextFieldType = .normal,
fontStyle: BKTextStyle = .body2(weight: .medium)
) {
super.init(
frame: frame,
placeholder: placeholder,
type: type
type: type,
fontStyle: fontStyle
)
setup()
configure()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ import UIKit

public final class BKTextFieldView: UIView {
private let titleLabel = BKLabel2()
private let textField = BKBaseTextField()
private let textField: BKBaseTextField
private let helpMessageLabel = BKLabel(type: .help)

private var labelText: String
private var placeholder: String
private var helpMessage: String
private let fontStyle: BKTextStyle

private var isError: Bool = false {
didSet {
Expand Down Expand Up @@ -48,12 +49,15 @@ public final class BKTextFieldView: UIView {
labelText: String = "",
placeholder: String = "",
helpMessage: String = "",
isError: Bool = false
isError: Bool = false,
fontStyle: BKTextStyle = .body2(weight: .medium)
) {
self.labelText = labelText
self.placeholder = placeholder
self.helpMessage = helpMessage
self.isError = isError
self.fontStyle = fontStyle
self.textField = BKBaseTextField(fontStyle: fontStyle)
super.init(frame: frame)
setup()
layout()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ public final class BKTextView: UIView {
textView.layer.borderColor = UIColor.clear.cgColor
textView.backgroundColor = .bkBaseColor(.secondary)
textView.isScrollEnabled = true
textView.font = BKTextStyle.body2(weight: .regular).uiFont
textView.textColor = .bkContentColor(.primary)
textView.textContainerInset = UIEdgeInsets(
top: LayoutConstants.contentTitleInset,
Expand All @@ -28,10 +27,7 @@ public final class BKTextView: UIView {
return textView
}()

private let placeholderLabel = BKLabel(
fontStyle: .body2(weight: .regular),
color: .bkContentColor(.tertiary)
)
private let placeholderLabel = BKLabel(color: .bkContentColor(.tertiary))

private let errorMessageLabel = BKLabel(type: .error)

Expand All @@ -48,6 +44,7 @@ public final class BKTextView: UIView {
}

private let textViewMinHeight: CGFloat
private let fontStyle: BKTextStyle

private let stackView: UIStackView = {
let stackView = UIStackView()
Expand All @@ -70,11 +67,13 @@ public final class BKTextView: UIView {
frame: CGRect = .zero,
labelText: String? = nil,
placeholder: String = "",
minHeight: CGFloat = 140
minHeight: CGFloat = 140,
fontStyle: BKTextStyle = .body2(weight: .regular)
) {
self.labelText = labelText
self.placeholderText = placeholder
self.textViewMinHeight = minHeight
self.fontStyle = fontStyle
super.init(frame: frame)
setup()
layoutViews()
Expand Down Expand Up @@ -138,6 +137,10 @@ public final class BKTextView: UIView {

private extension BKTextView {
func setup() {
textView.font = fontStyle.uiFont
applyTypingAttributes()

placeholderLabel.setFontStyle(style: fontStyle)
placeholderLabel.setText(text: placeholderText)
placeholderLabel.isUserInteractionEnabled = false

Expand All @@ -151,6 +154,19 @@ private extension BKTextView {
addSubviews(titleLabel, stackView)
}

func applyTypingAttributes() {
guard let font = fontStyle.uiFont else { return }

let paragraphStyle = fontStyle.paragraphStyle
paragraphStyle.alignment = textView.textAlignment

textView.typingAttributes = [
.font: font,
.foregroundColor: UIColor.bkContentColor(.primary),
.paragraphStyle: paragraphStyle
]
}

func layoutViews() {
if titleLabel.superview != nil {
titleLabel.snp.makeConstraints {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,9 +267,8 @@ private extension UINavigationController {

let backImage = BKImage.Icon.chevronLeft
.withRenderingMode(.alwaysTemplate)
.imageWithOffset(x: -4, y: 2) ?? BKImage.Icon.chevronLeft
.withAlignmentRectInsets(
UIEdgeInsets(top: 0, left: -16, bottom: 0, right: 0)
UIEdgeInsets(top: 0, left: -8, bottom: 0, right: 0)
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

백버튼 인셋 조정 확인

인셋 값이 -16에서 -8로 조정되고 imageWithOffset 변환이 제거되어 백버튼 위치가 더 표준에 가까워졌습니다. 이는 PR 목표인 백버튼 인셋 통일과 일치합니다.

다음 스크립트로 이 스타일을 사용하는 모든 화면에서 백버튼이 올바르게 렌더링되는지 확인하세요:


🏁 Script executed:

#!/bin/bash
# Description: BKNavigationBarStyle.standard를 사용하는 모든 ViewController 찾기

# standard 스타일을 사용하는 모든 파일 검색
rg -n -A5 -B2 'BKNavigationBarStyle\.standard' --type=swift

Length of output: 0


검색 결과가 없어 추가 검증이 필요합니다. 파일 내용과 변경 영향을 확인하겠습니다.


---

🏁 Script executed:

```shell
#!/bin/bash
# Description: 파일 존재 확인 및 271줄 주변 내용 확인

# 파일 존재 확인
if [ -f "src/Projects/BKPresentation/Sources/Common/Extension/UINavigationController+.swift" ]; then
  echo "=== File found ==="
  echo "=== Lines 260-280 context ==="
  sed -n '260,280p' "src/Projects/BKPresentation/Sources/Common/Extension/UINavigationController+.swift" | nl -v 260
else
  echo "File not found"
fi

Length of output: 89


🏁 Script executed:

#!/bin/bash
# Description: imageWithOffset 메서드 사용 여부 확인

echo "=== Searching for imageWithOffset usage ==="
rg -n 'imageWithOffset' --type=swift -C3

echo -e "\n=== Searching for back button related code ==="
rg -n 'backButton\|back_button\|UIBarButtonItem' --type=swift -C2 | head -50

Length of output: 941


🏁 Script executed:

#!/bin/bash
# Description: UINavigationController 확장에서 정의된 모든 메서드 확인

echo "=== Methods in UINavigationController extension ==="
ast-grep --pattern $'extension UINavigationController {
  $$$
}'

Length of output: 51


더 정확한 파일 내용 확인이 필요합니다.


---

🏁 Script executed:

```shell
#!/bin/bash
# Description: 271줄을 포함한 주변 코드 확인 및 imageWithOffset 호출 확인

echo "=== Lines 260-280 ==="
sed -n '260,280p' "src/Projects/BKPresentation/Sources/Common/Extension/UINavigationController+.swift"

echo -e "\n=== Lines 350-365 (imageWithOffset method) ==="
sed -n '350,365p' "src/Projects/BKPresentation/Sources/Common/Extension/UINavigationController+.swift"

echo -e "\n=== Searching for imageWithOffset() call (not just definition) ==="
rg 'imageWithOffset\(' --type=swift -n

Length of output: 1479


🏁 Script executed:

#!/bin/bash
# Description: 전체 파일에서 Back 버튼 관련 메서드 검색

echo "=== Searching for Back button setup methods ==="
rg -n 'setupBack|configureBack|backButtonImage|back.*Image' --type=swift -C2

echo -e "\n=== Checking file size and structure ==="
wc -l "src/Projects/BKPresentation/Sources/Common/Extension/UINavigationController+.swift"

Length of output: 4455


Dead code 제거 필요: imageWithOffset 메서드는 사용되지 않습니다

Line 271의 인셋 조정은 configureBackButton 메서드에 올바르게 통합되어 있으며 line 129에서 호출되어 활성화됩니다. 변경된 -8 좌측 인셋 값이 모든 표준 네비게이션 바에 일관되게 적용되어 PR 목표(백버튼 인셋 통일)가 달성됩니다.

그러나 lines 353-361의 imageWithOffset 메서드는 파일 내 어디에서도 호출되지 않는 dead code입니다. 이 메서드를 제거하여 코드를 정리하세요.

// 제거 대상 (lines 353-361)
func imageWithOffset(x: CGFloat = 0, y: CGFloat = 0) -> UIImage? {
    let newRect = CGRect(
        x: x,
        y: y,
        width: size.width,
        height: size.height
    )
    
    return imageWithCustomRect(newRect, canvasSize: size)
}
🤖 Prompt for AI Agents
In
src/Projects/BKPresentation/Sources/Common/Extension/UINavigationController+.swift
around lines 353 to 361, remove the unused dead method `imageWithOffset(x:y:)`
(the entire function block shown in the comment) and any stray helper calls or
unused imports tied only to it; keep existing `configureBackButton` and the
inset at line 271 as-is, and run a quick project-wide search to confirm no
remaining references to `imageWithOffset` before committing.

)
appearance.setBackIndicatorImage(backImage, transitionMaskImage: backImage)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,12 @@ private extension NoteView {
.store(in: &cancellables)
}

if pageControl.currentPage >= pageViews.count - 1 {
nextButton.primaryButton?.title = "기록 완료"
} else {
nextButton.primaryButton?.title = "다음"
}

updateNextButtonEnabled()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ final class SentenceAppreciationView: BaseView {
private let textDidChangeSubject = PassthroughSubject<Void, Never>()
private let containerView = UIView()
private let titleLabel = BKLabel(
text: "문장에 대한 감상을 남겨주세요",
text: "떠오르는 생각이 있다면 자유롭게 작성해 주세요.",
fontStyle: .heading1(weight: .bold)
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,20 @@ final class NoteEditView: BaseView {

private let pageField = BKTextFieldView(
labelText: "책 페이지",
placeholder: "기록하고 싶은 페이지를 작성해보세요"
placeholder: "기록하고 싶은 페이지를 작성해보세요",
fontStyle: .body2(weight: .medium)
)

private let sentenceTextView = BKTextView(
labelText: "문장 기록",
placeholder: "기록하고 싶은 문장을 작성해보세요"
placeholder: "기록하고 싶은 문장을 작성해보세요",
fontStyle: .body2(weight: .medium)
)

private let appreciationTextView = BKTextView(
labelText: "감상평",
placeholder: "문장에 대한 감상을 남겨주세요"
placeholder: "문장에 대한 감상을 남겨주세요",
fontStyle: .body2(weight: .medium)
)

private let emotionStatusView: UIStackView = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ private extension NotificationSettingsView {
static let permissionRequestViewHorizontalInset = BKInset.inset5
static let commonHorizontalInset = BKInset.inset5
static let toggleEmptySpacing = BKSpacing.spacing4
static let toggleSpacingWithRequest = BKSpacing.spacing2
static let toggleSpacingWithRequest = BKSpacing.spacing4
static let permissionToggleLabelPadding = BKSpacing.spacing4
static let permissionRequestLabelPadding = BKSpacing.spacing6
}
Expand Down
2 changes: 1 addition & 1 deletion src/SupportingFiles/Booket/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.1.3</string>
<string>1.2.0</string>
<key>FirebaseAppDelegateProxyEnabled</key>
<string>NO</string>
<key>CFBundleURLTypes</key>
Expand Down
Loading