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

Refactor/#400 비로그인 상태로 댓글 작성 시도 시 로그인 권유 모달이 표시되도록 변경 #401

Merged
merged 8 commits into from
Sep 14, 2023

Conversation

Creative-Lee
Copy link
Collaborator

📝작업 내용

  • 비로그인 상태로 댓글 작성 시도 시 로그인 권유 모달이 표시되도록 변경
  • 중복된 삼항연산자 제거

💬리뷰 참고사항

코드에 간단한 설명 코멘트 적어둘게요~!
참고해 주세요~

본 PR은 #392 PR 먼저 merge 후 충돌 해결하여 merge할 예정입니다.
충돌 예상 코드는 LoginModal 내부 네비게이션 코드입니다~

#️⃣연관된 이슈

close #400

@Creative-Lee Creative-Lee added [ 🌞 FE ] 프론트엔드 크루들의 빛나는 개발 이야기 하나둘셋 호! 🔨 Refactor 꾸준한 개선이 더 나은 애플리케이션을 만든다 labels Sep 11, 2023
@Creative-Lee Creative-Lee self-assigned this Sep 11, 2023
@github-actions
Copy link

github-actions bot commented Sep 11, 2023

Unit Test Results

  73 files    73 suites   9s ⏱️
287 tests 287 ✔️ 0 💤 0
290 runs  290 ✔️ 0 💤 0

Results for commit a289dcb.

♻️ This comment has been updated with latest results.

) : (
<>
<Avatar src={defaultAvatar} alt="익명 프로필" />
<Input type="text" onFocus={recommendLogin} placeholder="댓글 추가..." maxLength={0} />
Copy link
Collaborator Author

@Creative-Lee Creative-Lee Sep 11, 2023

Choose a reason for hiding this comment

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

💬 onFocus 이벤트로 모달을 띄우기 때문에 input에 값을 입력할 수 없지만,
maxLength를 0으로 명시해서 입력할 수 없는 input이라는 의미를 주고싶었는데 여러분들은 어떻게 생각하시는지요?

위쪽, 정상 input에 maxLength 200과 대조 되어 의미가 강조될 것 같아 작성했습니다.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

혼자 조금 더 생각해 봤는데 없어도 의미 전달 잘 되는 듯 해서 제거했습니다!

Copy link
Collaborator

@ukkodeveloper ukkodeveloper left a comment

Choose a reason for hiding this comment

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

로그인 권유하도록 모달 띄워주도록 변화한 거 잘 확인했습니다!

Comment on lines 48 to 51
const recommendLogin: React.FocusEventHandler<HTMLInputElement> = (e) => {
e.currentTarget.blur();
openLoginModal();
};
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍 모달을 열때 input을 blur 시키는 디테일 좋네요

Comment on lines 31 to 33
<LoginButton type="button" onClick={goLoginPage}>
로그인하러 가기
</LoginButton>
Copy link
Collaborator

Choose a reason for hiding this comment

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

💬 이부분은 Link로 개선되어도 될 것 같네요
굳이 navigate 함수가 필요한 로직은 아닌 것 같아서 링크로만 변경되어도 될 것 같아요

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

좋은 의견 감사합니다~ 반영했습니다~

@Creative-Lee Creative-Lee merged commit 1314081 into main Sep 14, 2023
@Creative-Lee Creative-Lee deleted the refactor/#400 branch September 14, 2023 03:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[ 🌞 FE ] 프론트엔드 크루들의 빛나는 개발 이야기 하나둘셋 호! 🔨 Refactor 꾸준한 개선이 더 나은 애플리케이션을 만든다
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[REFACTOR] 비로그인 상태로 댓글 작성 시도 시 모달 출력되도록 개선
3 participants