Skip to content
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

[Feature/#335] 문답 화면 텍스트필드 버그 수정 #336

Merged

Conversation

leemhyungyu
Copy link
Member

이슈 #335

Simulator.Screen.Recording.-.iPhone.14.Pro.-.2024-10-25.at.16.20.30.mp4

완료된 기능

  • FocusField enum 추가
  • 50자 이내 입력 후 TextField 포커스 벗어난 경우 활성 상태되던 버그 수정
  • TextField 다시 글자수 0 되면 PlaceHolder 보이게 처리

고민했던 부분

문제가 있었던 부분이 TextField의 포커스가 풀리게 되면 무조건 Active 상태로 설정되게 로직이 짜여져 있어서 어떻게 할지 고민하다가
Feature 내부에 현재 포커스된 TextField에 대한 정보를 가지고 이를 통해 포커스가 벗어났을 때 이전 포커스된 TextField의 글자수에 따라 상태를 관리하는 것으로 수정함!

@leemhyungyu leemhyungyu self-assigned this Oct 25, 2024
@JongHoooon
Copy link
Member

JongHoooon commented Nov 2, 2024

image
image
image

완료 버튼 활성화 여부가 isDisabledButton가 textFieldState에 의해 결정돼서 text field와 관련된 상태 값들만 반영해서 버튼 활성화 여부 상태 조절할 수 있는데 feature에 연산 프로퍼티로 버튼 활성화 여부 관리(첫번째 사진 처림!)하면 QuestionAndAnswerFeature 에 있는 다른 상태들이랑도 엮에서 상태관리도 할 수 있고 좀 더 다양한 상황 대응해 줄 수 있을거같아서 피처에서 연산프로퍼티로 관리할 수 있게 해보면 어떨까???

@@ -24,6 +24,22 @@ extension QuestionAndAnswerFeature {
state.configurePingPong(pingPong)
return .none

case let .focusedFieldDidChanged(field):
guard let previousFocustedField = state.focusedField else {
Copy link
Member

Choose a reason for hiding this comment

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

Focusted 오타 수정하면 좋을거같아!

@leemhyungyu leemhyungyu force-pushed the feature/#335-문답-화면-텍스트필드-버그-수정 branch from 921dc6c to 1aad5a6 Compare November 7, 2024 12:43
@leemhyungyu leemhyungyu merged commit 1688aa9 into develop Nov 7, 2024
1 check passed
@leemhyungyu leemhyungyu deleted the feature/#335-문답-화면-텍스트필드-버그-수정 branch November 7, 2024 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants