Skip to content

[IDLE-000] 테스트플라이트 피드백 반영 #69

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

Merged
merged 18 commits into from
Sep 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
1dbbfc0
[IDLE-000] 기기마다 고유한 유저 아이디를 가지도록 변경
J0onYEong Sep 20, 2024
424e828
[IDLE-000] 프로필 수정시 위치텍스트가 변경되도록 수정
J0onYEong Sep 20, 2024
02d3dd5
[IDLE-000] 텍스트 필드 높이와 버튼 사이즈가 안맞는 버그수정
J0onYEong Sep 20, 2024
6aa69af
[IDLE-000] 텍스트 필드 높이와 버튼 사이즈가 안맞는 버그수정
J0onYEong Sep 20, 2024
3cf505b
[IDLE-000] IdleLabel 라인Height설정 변경
J0onYEong Sep 21, 2024
9c395a9
[IDLE-000] IdleLabel 베이스라인을 중앙으로 조정
J0onYEong Sep 21, 2024
0aa3ee6
[IDLE-000] 라인 높이 조정 테스트 완료
J0onYEong Sep 21, 2024
30193c2
[IDLE-000] 설정화면 폰트변경
J0onYEong Sep 21, 2024
74893a2
[IDLE-000] 텍스트필드 입력완료시 클리어 버튼 숨김처리
J0onYEong Sep 21, 2024
b33619b
[IDLE-000] 센터/요양보호 회원가입 로그인 화면 레이아웃 조정
J0onYEong Sep 21, 2024
37ecf39
[IDLE-000] 센터관리자 아이디/패스워드 UI수정
J0onYEong Sep 21, 2024
54362df
[IDLE-000] 사업자 번호 인증 UI수정
J0onYEong Sep 21, 2024
6ba3156
[IDLE-000] 몸무게, (선택) 라벨간 간격조정
J0onYEong Sep 21, 2024
7b61eef
[IDLE-000] 공고 오버뷰 화면 UI수정
J0onYEong Sep 21, 2024
9a82c56
[IDLE-000] 텍스트필드 수정
J0onYEong Sep 21, 2024
8387920
[IDLE-000] 바텀시트 UI 여백클릭스 닫히도록 설정
J0onYEong Sep 21, 2024
7105a41
[IDLE-000] 공고 수정하기(바텀시트 버튼) 색상 수정
J0onYEong Sep 21, 2024
3b8a5af
[IDLE-000] 공고 수정하기(바텀시트 버튼) 사이드 이팩트 해결
J0onYEong Sep 21, 2024
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 @@ -25,8 +25,9 @@ public class AmplitudeLogger: LoggerMessagePublisher {
apiKey: AmplitudeConfig.apiKey
)
)

setUserId(id: "AnonymousIOSUser")

// 유저 아이디 설정
setUserId(id: getAnonymousUserId())
}

public func send(event: LoggingEvent) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,6 @@ public protocol LoggerMessagePublisher: AnyObject {

/// 이벤트의 주체를 설정합니다.
func setUserId(id: String)

/// 이벤트의 시작시간을 알립니다.
func startTimer(screenName: String, actionName: String)

/// 이벤트의 종료를 알리며, 지속시간을 기록합니다.
func endTimer(screenName: String, actionName: String, isSuccess: Bool)
}

public extension LoggerMessagePublisher {
Expand All @@ -45,13 +39,15 @@ public extension LoggerMessagePublisher {
send(event: event)
}

/// 이벤트의 시작시간을 알립니다.
func startTimer(screenName: String, actionName: String) {
timerQueue.sync {
let key = screenName + actionName
timerDict[key] = Date()
}
}

/// 이벤트의 종료를 알리며, 지속시간을 기록합니다.
func endTimer(screenName: String, actionName: String, isSuccess: Bool) {
timerQueue.sync {
let key = screenName + actionName
Expand Down Expand Up @@ -83,4 +79,21 @@ public extension LoggerMessagePublisher {

send(event: event)
}

/// 피로깅의 주체를 인식하는 식별자를 반환합니다.
func getAnonymousUserId() -> String {

let key = "AnonymousUserIdForDevice"

if let cachedId = UserDefaults.standard.string(forKey: key) {

return cachedId
}

let id = UUID().uuidString

UserDefaults.standard.setValue(id, forKey: key)

return id
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ public class BottomSheetButton: TappableUIView {

private let disposeBag = DisposeBag()

public init(image: UIImage, titleText: String, color: UIColor) {
public init(image: UIImage, titleText: String, imageColor: UIColor, textColor: UIColor) {
self.imageView.image = image
self.imageView.tintColor = color
self.imageView.tintColor = imageColor
self.titleLabel.textString = titleText
self.titleLabel.attrTextColor = color
self.titleLabel.attrTextColor = textColor

super.init()

Expand Down Expand Up @@ -89,6 +89,7 @@ public class BottomSheetButton: TappableUIView {
BottomSheetButton(
image: DSIcon.postCheck.image,
titleText: "채용 종료하기",
color: DSColor.red100.color
imageColor: DSColor.red100.color,
textColor: DSColor.red100.color
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import RxCocoa
public class IdleUnderLineLabelButton: TappableUIView {

let label: IdleLabel = {
let label = IdleLabel(typography: .Body2)
let label = IdleLabel(typography: .Body3)
label.attrTextColor = DSColor.gray300.color
label.setAttr(attr: .underlineStyle, value: NSUnderlineStyle.single.rawValue)
return label
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,9 @@ public class InfoBox: UIView {
valueStack.setContentCompressionResistancePriority(.init(750), for: .horizontal)

// mainStack
[
titleLabel,
keyValueStack
].forEach {
mainStack.addArrangedSubview($0)
mainStack.addArrangedSubview(titleLabel)
if keyStack.arrangedSubviews.count > 0 {
mainStack.addArrangedSubview(keyValueStack)
}

[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public class IdleContentTitleLabel: UIStackView {

self.axis = .horizontal
self.alignment = .center
self.spacing = 4

[
titleLabel,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public class IFType1: UIStackView {

func setStack() {

self.alignment = .top
self.alignment = .fill
self.axis = .horizontal
self.spacing = 4.0
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class TextButtonType1: UIView {
let label = IdleLabel(typography: .Subtitle4)

label.textString = labelText
label.textColor = .white
label.attrTextColor = .white
label.textAlignment = .center

return label
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,6 @@ public class IdleLabel: UILabel {

public required init?(coder: NSCoder) { fatalError() }

public override var intrinsicContentSize: CGSize {

let size = super.intrinsicContentSize

if currentLineCount != 0 {
return CGSize(width: size.width, height: typography.lineHeight * CGFloat(currentLineCount))
}
return super.intrinsicContentSize
}

public var typography: Typography {
get {
currentTypography
Expand All @@ -58,42 +48,17 @@ public class IdleLabel: UILabel {
}
}

var wholeRangeParagraphStyle: NSMutableParagraphStyle? {

if let text = attributedText?.string, text.isEmpty {
return nil
}

var paragraph: NSMutableParagraphStyle

if let prevParagraph = self.attributedText?.attribute(.paragraphStyle, at: 0, effectiveRange: nil) as? NSMutableParagraphStyle {
paragraph = prevParagraph
} else {
paragraph = NSMutableParagraphStyle()
}

return paragraph
}

public override var textAlignment: NSTextAlignment {
get {
super.textAlignment
}
set {

if let paragraphStyle = wholeRangeParagraphStyle {
paragraphStyle.alignment = newValue

if let attrText = self.attributedText {
let mutableAttr = NSMutableAttributedString(attributedString: attrText)
let range = NSRange(location: 0, length: mutableAttr.length)
mutableAttr.addAttribute(.paragraphStyle, value: paragraphStyle, range: range)

self.attributedText = mutableAttr
}
}

let paragraphStyle = currentAttributes[.paragraphStyle] as! NSMutableParagraphStyle
paragraphStyle.alignment = newValue
super.textAlignment = newValue

updateText()
}
}

Expand Down Expand Up @@ -121,23 +86,12 @@ public class IdleLabel: UILabel {
let newAttr: [NSAttributedString.Key: Any] = [attr: value]
currentAttributes = newAttr.merging(currentAttributes) { first, _ in first }
updateText()
invalidateIntrinsicContentSize()
}

private func updateText() {
let attributedStr = NSMutableAttributedString(string: textString, attributes: currentAttributes)

if let fontHeight = (currentTypography.attributes[.font] as? UIFont)?.lineHeight {

if let paragraphStyle = wholeRangeParagraphStyle {

paragraphStyle.lineSpacing = currentTypography.lineHeight-fontHeight

attributedStr.addAttribute(.paragraphStyle, value: paragraphStyle, range: NSMakeRange(0, attributedStr.length))
}
}
let attributedStr = NSMutableAttributedString(string: currentText, attributes: currentAttributes)

self.rx.attributedText.onNext(attributedStr)
invalidateIntrinsicContentSize()
self.attributedText = attributedStr
self.sizeToFit()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public class IdleOneLineInputField: UIView {
self.layer.borderColor = borderColor.cgColor

// Initial setting
textField.placeholder = placeHolderText
textField.attrPlaceholder = placeHolderText
textField.keyboardType = keyboardType
textField.contentVerticalAlignment = .center

Expand Down Expand Up @@ -261,6 +261,7 @@ extension IdleOneLineInputField: DisablableComponent {
self.isEnabled = isEnabled
self.isUserInteractionEnabled = isEnabled

clearButton.isHidden = true
textField.textColor = isEnabled ? .black : DSKitAsset.Colors.gray300.color
self.backgroundColor = isEnabled ? .white : DSKitAsset.Colors.gray050.color

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,25 +136,6 @@ public extension IdleTextField {
}

private func setInset(bounds: CGRect) -> CGRect {
let height = (currentTypography.attributes[.font] as! UIFont).lineHeight

let verticalInset = currentTextFieldInsets.top + currentTextFieldInsets.bottom

// 실제 폰트와 attribute의 라인 Height이 상이함으로 이를 조정하는 과정입니다.
var topInset: CGFloat = 0
var bottomInset: CGFloat = 0

if verticalInset > 0 {
topInset = (currentTypography.lineHeight+verticalInset - height) * (currentTextFieldInsets.top/verticalInset)

bottomInset = (currentTypography.lineHeight+verticalInset - height) * (currentTextFieldInsets.bottom/verticalInset)
}

return bounds.inset(by: .init(
top: topInset,
left: currentTextFieldInsets.left,
bottom: bottomInset,
right: currentTextFieldInsets.right
))
bounds.inset(by: currentTextFieldInsets)
}
}
Loading