Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
118 commits
Select commit Hold shift + click to select a range
734e885
fix: ci 오류 해결
yeojinseok1 Jul 7, 2025
b6d59a3
chore: 패키지 설치
yeojinseok1 Jul 7, 2025
c65c45f
feat: 라우터 기능 추가 및 mocking 함수 수정
yeojinseok1 Jul 7, 2025
f76a2dc
feat: page 컴포넌트 분리
yeojinseok1 Jul 7, 2025
13d6eea
feat: router page 연결
yeojinseok1 Jul 7, 2025
aa767c6
refactor: 라우터 구성 요소를 render에서 getComponent로 변경
yeojinseok1 Jul 7, 2025
17c106d
feat: createStore 및 createPersistStore 함수 추가
yeojinseok1 Jul 7, 2025
8fca29a
feat: QueryDataType 타입 정의 추가
yeojinseok1 Jul 7, 2025
e8ca3ec
feat: productStore 및 Product 타입 정의 추가
yeojinseok1 Jul 7, 2025
bd44f59
refactor: create router 타입스크립트로 리팩토링
yeojinseok1 Jul 7, 2025
3989023
feat: 홈화면 상품 데이터 API 연결 작업
yeojinseok1 Jul 7, 2025
e196a7c
refactor: ts => js 마이그레이션 작업
yeojinseok1 Jul 8, 2025
96f549f
fix: pnpm이 정상적으로 실행되도록 ci 설정 변경
yeojinseok1 Jul 8, 2025
e852fba
feat: 스토어 구독 기반 형태로 변경
yeojinseok1 Jul 8, 2025
5fac993
feat: 메인화면 컴포넌트, 로딩컴포넌트 나누기 작업
yeojinseok1 Jul 8, 2025
e0504c6
refactor: 상품 컴포넌트들 정리
yeojinseok1 Jul 8, 2025
53ec749
feat: 스로틀 함수 추가
yeojinseok1 Jul 8, 2025
81241e0
feat: 상품 리스트 무한 스크롤 추가
yeojinseok1 Jul 8, 2025
a7821ee
fix: 무한 스크롤 될 때 history 쌓이는 버그 수정
yeojinseok1 Jul 9, 2025
4770302
feat: component 추상화 클래스 추가
yeojinseok1 Jul 9, 2025
bb479ff
refactor: 상품 리스트 컴포넌트 클래스 방식으로 리팩토링
yeojinseok1 Jul 9, 2025
95015ff
feat: cart-modal 추가
JunilHwang Jul 8, 2025
ce3fac0
test: 테스트 논리적 오류 해결
JunilHwang Jul 8, 2025
f1cb5b9
feat: IntersectionObserver 모의 구현 추가
realstone2 Jul 9, 2025
4464d3c
refactor: productStore 경로 수정 및 관련 파일 업데이트
realstone2 Jul 9, 2025
ce7e891
feat: 카테고리 리스트 핸들러 및 상태 저장소 추가
realstone2 Jul 9, 2025
6d1bd94
feat: 카테고리 필터 섹션 추가
realstone2 Jul 9, 2025
a85539c
refactor: 컴포넌트 사용 패턴 방식 리팩토링
realstone2 Jul 9, 2025
f41f5e2
fix: unmount 시 부모 요소에서 자식 요소 제거 조건 추가
realstone2 Jul 10, 2025
fefeb25
fix: 카테고리 테스트 코드 동작 수정
realstone2 Jul 10, 2025
a9ca9c3
feat: 카테고리 필터 변경시 productList API 호출이 완료되었는지 채크하는 테스트 코드 추가
realstone2 Jul 10, 2025
ae35e2b
feat: easy / hard 를 구분하여 테스트를 실행할 수 있도록 함
JunilHwang Jul 10, 2025
7bb244c
fix: 필터 관련 테스트코드 로직 수정
realstone2 Jul 10, 2025
1081e40
feat: 개수, 정렬 필터 컴포넌트 추가
realstone2 Jul 10, 2025
b0f95c3
fix: 장바구니 테스트의 논리적 오류 해결
JunilHwang Jul 9, 2025
257bcbf
fix: api에서 page와 current를 모두 수용할 수 있도록 함
JunilHwang Jul 9, 2025
8fd0a45
feat: easy / hard 를 구분하여 테스트를 실행할 수 있도록 함
JunilHwang Jul 10, 2025
225b6d7
fix: 상품명 기반 검색을 위한 텍스트 입력 필드 테스트 위치 변경
realstone2 Jul 10, 2025
8b1173b
feat: 상품명 검색 필터 추가
realstone2 Jul 10, 2025
e9e92ea
fix: 테스트 코드 순서 변경
realstone2 Jul 10, 2025
8de0659
remove(product): 상품 아이템 컴포넌트 파일 삭제
realstone2 Jul 11, 2025
5aba528
feat(event): 이벤트 위임 클래스 추가
realstone2 Jul 11, 2025
54fb468
refactor(event): 이벤트 핸들러 등록 및 해제 메서드 개선
realstone2 Jul 11, 2025
9822fba
feat(store): createPersistStore 기능 개선
realstone2 Jul 11, 2025
f121e97
feat(cart): 장바구니 기능 추가 및 헤더 컴포넌트 통합
realstone2 Jul 11, 2025
4ef51fc
fix: 테스트 코드 goTo 함수 주석 처리
realstone2 Jul 11, 2025
a534c53
remove(product): 상품 관련 컴포넌트 및 페이지 삭제
realstone2 Jul 11, 2025
1947596
fix(test): 장바구니 담기 테스트 통합
realstone2 Jul 11, 2025
ebeb7b0
feat(component): 상태 관리 기능 추가
realstone2 Jul 11, 2025
8ace9fe
feat(cart): 장바구니 기능 및 토스트 메시지 컴포넌트 추가
realstone2 Jul 11, 2025
e288a67
feat(product): 상품 상세 페이지 및 관련 기능 추가
realstone2 Jul 11, 2025
cc9b342
feat(component): 상태 초기화 및 라우터 개선
realstone2 Jul 11, 2025
b971415
feat(product): 상품 상세 페이지 및 관련 상품 목록 기능 추가
realstone2 Jul 11, 2025
25ba179
feat(common): NotFound 컴포넌트 추가 및 라우터 설정 변경
realstone2 Jul 11, 2025
40f020e
fix: ci 오류 해결
yeojinseok1 Jul 7, 2025
7d5c7e0
chore: 패키지 설치
yeojinseok1 Jul 7, 2025
3293929
feat: 라우터 기능 추가 및 mocking 함수 수정
yeojinseok1 Jul 7, 2025
56b6ea0
feat: page 컴포넌트 분리
yeojinseok1 Jul 7, 2025
32ec3b2
feat: router page 연결
yeojinseok1 Jul 7, 2025
aeb1795
refactor: 라우터 구성 요소를 render에서 getComponent로 변경
yeojinseok1 Jul 7, 2025
fffc349
feat: createStore 및 createPersistStore 함수 추가
yeojinseok1 Jul 7, 2025
d8c569d
feat: QueryDataType 타입 정의 추가
yeojinseok1 Jul 7, 2025
5e5349b
feat: productStore 및 Product 타입 정의 추가
yeojinseok1 Jul 7, 2025
c090478
refactor: create router 타입스크립트로 리팩토링
yeojinseok1 Jul 7, 2025
8e8693a
feat: 홈화면 상품 데이터 API 연결 작업
yeojinseok1 Jul 7, 2025
0d3673c
refactor: ts => js 마이그레이션 작업
yeojinseok1 Jul 8, 2025
fa7e5c5
feat: 스토어 구독 기반 형태로 변경
yeojinseok1 Jul 8, 2025
f015fe7
feat: 메인화면 컴포넌트, 로딩컴포넌트 나누기 작업
yeojinseok1 Jul 8, 2025
e2cffda
refactor: 상품 컴포넌트들 정리
yeojinseok1 Jul 8, 2025
d950cac
feat: 스로틀 함수 추가
yeojinseok1 Jul 8, 2025
fbdd41a
feat: 상품 리스트 무한 스크롤 추가
yeojinseok1 Jul 8, 2025
07190f6
fix: 무한 스크롤 될 때 history 쌓이는 버그 수정
yeojinseok1 Jul 9, 2025
670cec7
feat: component 추상화 클래스 추가
yeojinseok1 Jul 9, 2025
637b5c9
refactor: 상품 리스트 컴포넌트 클래스 방식으로 리팩토링
yeojinseok1 Jul 9, 2025
a6f3e60
feat: IntersectionObserver 모의 구현 추가
realstone2 Jul 9, 2025
4cd52ef
refactor: productStore 경로 수정 및 관련 파일 업데이트
realstone2 Jul 9, 2025
503b7eb
feat: 카테고리 리스트 핸들러 및 상태 저장소 추가
realstone2 Jul 9, 2025
5a0bae7
feat: 카테고리 필터 섹션 추가
realstone2 Jul 9, 2025
ee7a0f1
refactor: 컴포넌트 사용 패턴 방식 리팩토링
realstone2 Jul 9, 2025
5503d42
fix: unmount 시 부모 요소에서 자식 요소 제거 조건 추가
realstone2 Jul 10, 2025
ed81605
fix: 카테고리 테스트 코드 동작 수정
realstone2 Jul 10, 2025
811167a
feat: 카테고리 필터 변경시 productList API 호출이 완료되었는지 채크하는 테스트 코드 추가
realstone2 Jul 10, 2025
8914fbc
fix: 필터 관련 테스트코드 로직 수정
realstone2 Jul 10, 2025
5bc3c9e
feat: 개수, 정렬 필터 컴포넌트 추가
realstone2 Jul 10, 2025
36c68e6
fix: api에서 page와 current를 모두 수용할 수 있도록 함
JunilHwang Jul 9, 2025
0274cd9
fix: 상품명 기반 검색을 위한 텍스트 입력 필드 테스트 위치 변경
realstone2 Jul 10, 2025
10c591c
feat: 상품명 검색 필터 추가
realstone2 Jul 10, 2025
787f411
fix: 테스트 코드 순서 변경
realstone2 Jul 10, 2025
55a69f7
remove(product): 상품 아이템 컴포넌트 파일 삭제
realstone2 Jul 11, 2025
d6a49dd
feat(event): 이벤트 위임 클래스 추가
realstone2 Jul 11, 2025
2e3a794
refactor(event): 이벤트 핸들러 등록 및 해제 메서드 개선
realstone2 Jul 11, 2025
fca94c1
feat(store): createPersistStore 기능 개선
realstone2 Jul 11, 2025
f240297
feat(cart): 장바구니 기능 추가 및 헤더 컴포넌트 통합
realstone2 Jul 11, 2025
ab04843
fix: 테스트 코드 goTo 함수 주석 처리
realstone2 Jul 11, 2025
6619480
remove(product): 상품 관련 컴포넌트 및 페이지 삭제
realstone2 Jul 11, 2025
58324f6
fix(test): 장바구니 담기 테스트 통합
realstone2 Jul 11, 2025
8b50b55
feat(component): 상태 관리 기능 추가
realstone2 Jul 11, 2025
d990147
feat(cart): 장바구니 기능 및 토스트 메시지 컴포넌트 추가
realstone2 Jul 11, 2025
738861a
feat(product): 상품 상세 페이지 및 관련 기능 추가
realstone2 Jul 11, 2025
2d64f8c
feat(component): 상태 초기화 및 라우터 개선
realstone2 Jul 11, 2025
86ac649
feat(product): 상품 상세 페이지 및 관련 상품 목록 기능 추가
realstone2 Jul 11, 2025
13f9088
feat(common): NotFound 컴포넌트 추가 및 라우터 설정 변경
realstone2 Jul 11, 2025
b4e0192
Merge branch 'main' of https://github.com/realstone2/front_6th_chapte…
realstone2 Jul 11, 2025
2534ef2
fix: 빌드 에러 수정
realstone2 Jul 11, 2025
0bdef0f
remove(api): 상품 API 파일 삭제
realstone2 Jul 11, 2025
104571e
fix(common): EventDelegator 경로 수정
realstone2 Jul 11, 2025
b8c5e45
feat(router): BASE_PATH 상수 추가
realstone2 Jul 11, 2025
bb2b364
feat(deploy): GitHub Pages 배포 워크플로우 추가
realstone2 Jul 11, 2025
6070264
fix(html): 불필요한 스크립트 및 스타일 시트 제거
realstone2 Jul 11, 2025
bc64cd3
feat(router): 404 페이지 추가
realstone2 Jul 11, 2025
dd13d13
refactor(html): 불필요한 div 제거
realstone2 Jul 11, 2025
52cdcd9
feat(html): URL 경로 변경 스크립트 추가
realstone2 Jul 11, 2025
368856c
feat(router): BASE_PATH를 사용하여 경로 변경 로직 수정
realstone2 Jul 11, 2025
b68e670
feat(router): BASE_PATH를 외부에서 사용할 수 있도록 수정
realstone2 Jul 11, 2025
85b5124
feat(pr): 과제 체크포인트 문서 추가
realstone2 Jul 12, 2025
8fe376b
feat(cart): 장바구니 모달 및 관련 기능 추가
realstone2 Jul 12, 2025
9a4c82d
feat(product): 장바구니에 제품 추가 기능 개선
realstone2 Jul 12, 2025
97efdad
feat(cart): 장바구니 모달 기능 개선
realstone2 Jul 12, 2025
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
53 changes: 47 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
workflow_dispatch:

jobs:
unit:
hard-basic:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -23,12 +23,31 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: 22
cache: 'pnpm'
cache: "pnpm"
- run: |
pnpm install
pnpm run test:hard:basic
hard-advanced:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- uses: pnpm/action-setup@v4
with:
version: latest
- uses: actions/setup-node@v4
with:
node-version: 22
cache: "pnpm"
- name: Install dependencies
run: |
pnpm install
pnpm run test
e2e:
npx playwright install --with-deps
pnpm run test:hard:advanced
easy-basic:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
Expand All @@ -42,9 +61,31 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: 22
cache: 'pnpm'
cache: "pnpm"
- name: Install dependencies
run: |
pnpm install
npx playwright install --with-deps
pnpm run test:e2e
pnpm run test:easy:basic
easy-advanced:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- uses: pnpm/action-setup@v4
with:
version: latest
- uses: actions/setup-node@v4
with:
node-version: 22
cache: "pnpm"
- name: Install dependencies
run: |
pnpm install
npx playwright install --with-deps
pnpm run test:easy:advanced

#
38 changes: 38 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Deploy to GitHub Pages

on:
push:
branches: [main]

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "18"

- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8

- name: Install dependencies
run: pnpm install

- name: Build
run: pnpm build
env:
NODE_ENV: production

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
67 changes: 67 additions & 0 deletions componet.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
export abstract class Component<P extends object = {}, S extends object = {}> {
public isMounted = false;

el: HTMLElement;

parentEl?: HTMLElement;

protected _state: S;

get state(): S {
return this._state;
}

set state(newState: S) {
this._state = newState;
this.update();
}

protected _props: P;

constructor(props?: P, initialState?: S) {
this._props = props ?? ({} as P);
this._state = initialState ?? ({} as S); // state 초기화 추가
this.el = this.render();
}

get props(): P {
return this._props;
}

abstract render(): HTMLElement;

update() {
const newEl = this.render();
this.el.replaceWith(newEl);
this.el = newEl;
this.onUpdate();
}

mount(target: HTMLElement) {
if (this.isMounted) {
return;
}
this.parentEl = target;

this.parentEl.appendChild(this.el);
this.isMounted = true;
this.componentDidMount();
}

unmount() {
if (!this.isMounted) {
return;
}

this.componentWillUnmount();

this.el.remove();

this.isMounted = false;
}

onUpdate() {}

componentDidMount() {}
componentWillUnmount() {}
}
Loading
Loading