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(fe): admin problem create page refactoring #2100

Merged
merged 8 commits into from
Sep 20, 2024

Conversation

eunnbi
Copy link
Contributor

@eunnbi eunnbi commented Sep 19, 2024

Description

주요 변경사항

  • Admin create page에서 컴포넌트를 분리해 코드의 응집성을 높입니다
    • 💡 코드상에서 동떨어져 있지만 같은 목적의 로직과 UI를 하나의 컴포넌트로 뭉쳤습니다
    • CreateProblemAlertDialog: graphql mutation 요청
    • CreateProblemForm: 폼 유효성 검사 - 실패 시 caution dialog 열기, 성공 시 create problem alert dialog 열기
  • ConfirmNavigation 컴포넌트 추가
    • 추가한 이유: shouldSkipWarning 값을 하위 컴포넌트에서 수정해야 하는 케이스가 존재해서 Context API를 이용해 컴포넌트 버전을 추가했습니다. 다른 좋은 해결 방법 있다면 언제든 환영입니다~

마이너 변경사항

  • 클라이언트 환경에서 사용되는 컴포넌트에 use client 지시자 추가 (page.tsxuse client 지시자 없애서 추가했습니다)
  • 자잘한 UX 개선 (폼 유효성 검사에 실패한 경우 사용 흐름 개선)
    • as-is: create 버튼 클릭 -> create problem alert dialog 표시 -> caution dialog 표시 -> caution dialog 닫기 -> create problem alert dialog 닫기 -> 폼 수정
    • to-be: create 버튼 클릭 -> caution dialog 표시 -> caution dialog 닫기 -> 폼 수정

closes TAS-920

Additional context


Before submitting the PR, please make sure you do the following

Copy link

vercel bot commented Sep 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
codedang ✅ Ready (Inspect) Visit Preview Sep 20, 2024 11:02am

Copy link

@eunnbi eunnbi changed the title [WIP] refactor(fe): admin problem create page refactoring refactor(fe): admin problem create page refactoring Sep 19, 2024
@youznn
Copy link
Member

youznn commented Sep 19, 2024

진짜 가독성 최고입니다... 👍👍👍

@coolify-skkuding
Copy link

coolify-skkuding bot commented Sep 19, 2024

The preview deployment is ready. 🟢

Open Preview | Open Build Logs

Last updated at: 2024-09-19 14:44:06 CET

@eunnbi eunnbi marked this pull request as ready for review September 20, 2024 05:31
@B0XERCAT
Copy link
Member

B0XERCAT commented Sep 20, 2024

problem/create 안의 컴포넌트 폴더 이름을 수정해주세요
components -> _components

@B0XERCAT
Copy link
Member

진짜 가독성 최고입니다... 👍👍👍

동감합니다.. 👍👍👍

@eunnbi
Copy link
Contributor Author

eunnbi commented Sep 20, 2024

problem/create 안의 컴포넌트 폴더 이름을 수정해주세요 components -> _components

수정했습니다!
70d95e6

Copy link
Member

@B0XERCAT B0XERCAT left a comment

Choose a reason for hiding this comment

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

LGTM🐱

@eunnbi eunnbi merged commit 42a141a into main Sep 20, 2024
9 checks passed
@eunnbi eunnbi deleted the t920-refactor-admin-problem-create-page branch September 20, 2024 12:08
mnseok pushed a commit that referenced this pull request Nov 12, 2024
* feat(fe): add create problem alert dialog component

* feat(fe): add create problem form component

* feat(fe): add confirm navigation component

* chore(fe): add use client directive

* refactor(fe): refactor admin problem create page

* chore: use not operator

* chore: trigger github action

* chore(fe): use private folder
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants