[Mission4/김유리] - Project_Notion_VanillaJS#17
Open
glassk wants to merge 41 commits intoprgrms-fe-devcourse:3/#4_kimyurifrom
Open
[Mission4/김유리] - Project_Notion_VanillaJS#17glassk wants to merge 41 commits intoprgrms-fe-devcourse:3/#4_kimyurifrom
glassk wants to merge 41 commits intoprgrms-fe-devcourse:3/#4_kimyurifrom
Conversation
* npm run dev로 실행
* Sidebar 내부에서 DocumentList 렌더링 * new 없이 생성한 경우에 대한 방어코드 작성 * util 함수(api, router, constants, helper) 추가
* storage util 함수 추가 * Page와 Editor 컴포넌트 분리
* localStorage에 document id 임시 저장
* reset.css 설정 * 문서 추가 버튼의 텍스트를 아이콘으로 대체 * Sidebar, DocumentList, Editor 컴포넌트에 적용
* request(url, options) -> fetchDocuments(documentId, options)
* contants -> constants 오타 수정
* DocumentList 항목 열기/닫기 토글 처리(localStorage에 저장) * 문서 제목 클릭 시 해당 문서 편집 화면 렌더링 * + 버튼 클릭 시 하위 문서 추가 * 삭제 버튼 클릭 시 해당 문서 삭제
* Sidebar에서 DocumentAddButton 컴포넌트 렌더링
* state 할당 방식 수정 * localStorage value 숫자형으로 통일
* mouseover, mouseout 이벤트에 문서 제목 요소 반영
* 하위 컴포넌트들끼리 전달하던 핸들러를 App에서 관리하도록 변경 * 핸들러: 추가(onAdd), 삭제(onDelete), 수정(onEdit) * 표현 변경: remove -> delete, editing -> edit
* 현재 편집 중인 문서의 하위 문서 링크 렌더링
* 존재하지 않는 페이지이면 alert, 첫 문서로 라우팅
* SidebarHeader 컴포넌트 구현(워크스페이스 이름) * DocumentList 스크롤바 추가
* 선택된 문서의 제목 굵게, 배경색 어둡게 처리
* opened_item => opened_items
* title 프로퍼티 설정
* title이 문자열인지 검사 * UNTITLED 또는 title 리턴
* Sidebar에서 렌더링한 DocumentAddButton을 DocumentList에서 렌더링하도록 변경
* DocumentEditPage와 Sidebar로 나누기
* dev -> start
minjongbaek
reviewed
Nov 19, 2022
| onAdd, | ||
| }); | ||
|
|
||
| this.render = async () => { |
Member
There was a problem hiding this comment.
p4;
다른 컴포넌트들 처럼 현재 상태를 기반으로 렌더링하게끔 수정하는 것도 좋을 것 같아요!
* install parcel
* filter로 삭제되는 id의 문서 제외
* 현재 문서와 삭제되는 문서의 id를 인자로 함께 전달
* setItem, getItem, removeItem -> setStorageItem, getStorageItem, removeStorageItem
* /documents/:id 생성하는 메서드 helper에 추가
* button의 padding 조정
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📌 과제 설명
VanillaJS로 노션(Notion)을 클로닝했습니다.
배포: https://yuri-notion.vercel.app
실행 방법
API_END_POINT값을 설정합니다.npm start또는npx serve -s를 실행합니다.디렉토리 구조
👩💻 요구 사항과 구현 내용
+버튼을 클릭하면, 클릭한 Document의 하위 Document로 새 Document를 생성하고 편집화면으로 넘깁니다....)합니다./documents/{documentId}로 접속 시 해당 Document를 불러와 편집기에 로딩합니다.루트 Document 추가 및 수정
하위 Document 추가 및 수정
Document 삭제
존재하지 않은 Document 접속
현재 편집 중인 Document의 하위 Document 렌더링
✅ PR 포인트 & 궁금한 점