Skip to content

Conversation

@juhyeong0505
Copy link
Contributor

@juhyeong0505 juhyeong0505 commented Nov 13, 2024

Description

스크린샷 2024-11-14 오전 3 24 28 스크린샷 2024-11-14 오전 3 26 31
  1. Tab에 생성된 testcasetab 스크롤 가능하게 구현
  2. user testcase 입력받는 모달 버튼 구현

모달 내부 구현 진행도
-sample testcase 보여주는 것은 완료
-usertestcase부분 미완성
-add 버튼 누르면 생성되게 하는 기능 구현 완료(prop을 수정하긴 해야함)
-usertestcase textfield에 있는 'X' 모양 아이콘 누르면 해당 usertestcase 삭제하는 기능 미구현(아이콘은 배치 완료)
-save 버튼 기능 미구현
-cancel 버튼 기능 미구현

스크린샷 2024-11-14 오전 3 32 37 add 버튼을 누르면 이렇게 생성이 된다.

closes TAS-1043

Additional context


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

@juhyeong0505 juhyeong0505 changed the title feat(fe): Add Userestcase feat(fe): Add User Testcase Nov 13, 2024
@juhyeong0505 juhyeong0505 self-assigned this Nov 13, 2024
@juhyeong0505
Copy link
Contributor Author

am 3:36 너무 졸려서 중단..🥲🥲

@juhyeong0505 juhyeong0505 changed the title feat(fe): Add User Testcase feat(fe): add user testcase Nov 13, 2024
@eunnbi eunnbi marked this pull request as draft November 14, 2024 07:50
@eunnbi
Copy link
Contributor

eunnbi commented Nov 14, 2024

@juhyeong0505 제가 이어서 작업할게요!

@eunnbi eunnbi force-pushed the t1043-add-user-testcase branch from f04f84a to ba543c9 Compare November 15, 2024 03:44
@eunnbi eunnbi force-pushed the t1043-add-user-testcase branch from afdeb44 to 6a19d83 Compare November 15, 2024 04:19
@eunnbi
Copy link
Contributor

eunnbi commented Nov 15, 2024

Updated

기능 구현

  1. 유저 테스트 케이스 추가 / 수정 / 삭제 / 저장 구현: React-hook-form과 zustand persist 사용
  2. 샘플 테스트 케이스 복사: CopyButton 공용 컴포넌트 만들었습니다. 아이콘의 색깔과 사이즈를 동적으로 설정하기 위해서 svg file + Image 컴포넌트 방식 대신 아이콘 컴포넌트를 사용했습니다.
  3. 유저 테스트 실행 로직 구현: 2개의 POST 요청, Promise.all 사용해 2개의 요청 작업이 성공할 때만 test result polling을 진행하도록 함
  4. Test result polling: tanstack query를 이용해 polling 구현
    1. enabled 속성을 이용해 polling on/off
    2. refetchInterval 옵션 사용

Minor changes

  1. TestcasePanel 스타일 개선 (탭 UI)
  2. EditorHeader에서 불필요한 함수들 제거

폴더 구조
컴포넌트가 계속 추가되다 보니 컴포넌트들의 부모/자식 관계가 잘 파악되지 않는 것 같아서 컴포넌트 폴더를 추가해봤습니다.

(code-editor)/_components
- context
- EditorHeader
- TestcasePanel

(예상 질문)

  1. 왜 zustand와 context를 함께 사용하나요?

+) CopyButon 컴포넌트 만들 때 Framer Motion을 lazy loading해서 번들사이즈 아주 약간 개선했습니다ㅎㅎ (참고: https://motion.dev/docs/react-reduce-bundle-size)

빌드 결과물 비교 스샷 (2024.11.15 기준)

Main branch
image
image

현 브랜치
image
image

@notion-workspace
Copy link

@eunnbi eunnbi marked this pull request as ready for review November 15, 2024 07:07
@eunnbi eunnbi requested review from B0XERCAT, Kimhyojung0810, Kohminchae, jimin9038 and youznn and removed request for Kohminchae November 15, 2024 07:07
@B0XERCAT
Copy link
Member

image
테스트케이스 패널 내에서 Sample과 User 테스트케이스를 구분해서 표시해야 합니다!
탭에서도 마찬가지입니다

@B0XERCAT
Copy link
Member

User Testcase에 input / output을 입력하고 Save 버튼을 눌러도
마지막 User Testcase는 저장이 안되고 있는 것 같습니다!

@B0XERCAT
Copy link
Member

image
수정하다가 탭의 스타일이 깨졌나봐요..

@eunnbi eunnbi force-pushed the t1043-add-user-testcase branch from b6d67ad to 22e1df4 Compare November 15, 2024 16:37
@eunnbi
Copy link
Contributor

eunnbi commented Nov 15, 2024

수정 완료했습니다

image
image

2024-11-16.1.39.02.mov

@eunnbi eunnbi self-assigned this Nov 15, 2024
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.

고생 많으셨습니다!

@eunnbi eunnbi merged commit 0d395f8 into main Nov 16, 2024
8 checks passed
@eunnbi eunnbi deleted the t1043-add-user-testcase branch November 16, 2024 02:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done ✔️

Development

Successfully merging this pull request may close these issues.

4 participants