-
Notifications
You must be signed in to change notification settings - Fork 29
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
[Mission5/신호원] Project_Notion_Vanilla JS 과제 #45
Open
howons
wants to merge
66
commits into
4/#5_HowonShin
Choose a base branch
from
4/#5_HowonShin_working
base: 4/#5_HowonShin
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
66 commits
Select commit
Hold shift + click to select a range
3067a6c
Init: 프로젝트 생성
howons a4bf0ab
Chore: dependency 설치
howons a803b13
Feat: 초기 파일 추가
howons 9a85444
Feat: webpack 구성 파일 추가
howons d559dbe
Feat: yarn 스크립트 추가
howons 4399af0
Feat: babel 구성 파일 추가
howons e72d984
Feat: eslint 구성 파일 추가
howons 67b0ce3
Feat: prettier 구성 파일 추가
howons ccfe9ca
Chore: import alias 설정
howons c3ad7fa
Feat: new 생성자 검증 기능 추가
howons 599bc32
Feat: route 테스트 및 콘솔 에러 제거
howons e764def
Feat: setState 저장소 분리
howons 678baf8
Feat: 임시 Home 컴포넌트 추가
howons 5e39397
Feat: router 분리
howons e3b03e6
Feat: 기본 레이아웃 설정
howons c999cdc
Feat: setState 분리 및 once 함수 구현
howons fc0902e
Feat: setState 및 validation 개선
howons 6eafb07
Feat: 사이드바 기본 구조 구현 및 api 연결
howons 2e6fc51
Fix: Drawer 레벨 추가
howons c7e81ab
Feat: 자식 Drawer 열고닫기 추가
howons 772e097
Feat: 문서 생성기능 추가
howons ebd45e6
Feat: 루트 문서 생성 버튼 추가
howons 7ca7794
Feat: 사이드바 스크롤 추가
howons 91a87ce
Feat: 문서 생성 시 하위 목록 열리게 수정
howons 20479ae
Feat: 문서 삭제 기능 추가
howons 26b98b1
Feat: Draw 클릭 시 route 기능 구현
howons 1925391
Feat: 문서 정보 불러오기 구현
howons 19f9205
Feat: 문서 저장 기능 추가
howons 85ea18e
Feat: DrawerItem 강조 효과 추가 및 패딩 방식 변경
howons d968ca3
Feat: 헤더 문서 네비게이션 추가
howons 65b3d61
Feat: 사이드바와 헤더에 낙관적 업데이트 추가
howons 20702cf
Feat: 헤더 문서 링크 추가
howons 85f4dfc
Style: Document 스타일 적용
howons a43b6f8
Style: 사이드바 아이콘 추가 및 스타일 수정
howons 960f583
Feat: Home 페이지 추가 및 로컬 스토리지 설정
howons 1f972ac
Feat: Home 스타일 및 링크 추가
howons a07b858
Style: Home 로고 스타일 수정
howons 826a2fe
Fix: Home에 남아있는 Header 정보 초기화
howons 0275de0
Feat: 문서 삭제 시 로컬 스토리지 및 페이지 처리
howons 8e2377b
Fix: DrawerItem 삭제 중 클릭 방지 구현
howons 82e66ea
Style: 제목 글자 분리 수정
howons 6482d4f
Chore: Fix webpack config
howons 78f9744
Fix: webpack publickPath 수정
howons 47066b3
Refactor: 적용 안되던 eslint 적용 및 수정
howons ba04315
Fix: event 이름 상수 처리
howons b66777b
Refactor: stateSetter 사용 추상화
howons 040f676
Rename: validation 함수 이름 변경
howons 2b30e90
Rename: App 위치 변경
howons 444813a
Rename: Home을 Dashboard로 개명
howons 0ee6a1c
Rename: route 대상 요소 pages로 이동
howons 174f5e0
Merge pull request #61 from Howon-Shin/4/#5_HowonShin_working
howons e41a665
Refactor: Document init 함수 기능 추상화
howons 49015c0
Rename: numUsed를 usedCount로 개명
howons 32d6122
Rename: most를 frequent로 개명
howons 717b91c
Refactor: title 제목없음 로직 간단하게 수정
howons 7e4febe
Refactor: parent DrawerItem 관련 재귀 하나로 통합
howons 776f386
Refactor: DrawerItem 이벤트 핸들러 정리
howons f2108f9
Fix: margin을 padding으로 변경
howons d8909b9
Style: header title css 보강
howons eb41e10
Rename: delete api 응답 받는 변수이름 수정
howons c79c371
Fix: 문서 생성 후 이동 기능 추가
howons 90e8ccf
Refactor: 헤더 렌더링 nav 범위로 축소
howons fe7094d
Rename: Drawer를 DocumentList로 개명
howons 5d0fc8d
Fix: 문서 삭제 시 replaceState 처리
howons 845fca8
Fix: document, dashboard 페이지 라우팅 시 플리커링 제거
howons 0db76b4
Fix: 동일 문서 route 시 pushState 미적용
howons File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"presets": ["@babel/preset-env"], | ||
"plugins": [ | ||
[ | ||
"module-resolver", | ||
{ | ||
"alias": { | ||
"@Components": "./src/components", | ||
"@Pages": "./src/pages", | ||
"@Utils": "./src/utils", | ||
"@Static": "./src/static" | ||
} | ||
} | ||
] | ||
] | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
dist/ |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"env": { | ||
"browser": true | ||
}, | ||
"extends": ["airbnb-base", "prettier", "plugin:import/recommended"], | ||
"overrides": [], | ||
"parserOptions": { | ||
"ecmaVersion": "latest", | ||
"sourceType": "module" | ||
}, | ||
"plugins": ["import", "prettier"], | ||
"root": true, | ||
"rules": { | ||
"no-alert": "off", | ||
"no-console": "warn", | ||
"no-new": "off", | ||
"no-unused-vars": "warn", | ||
"no-use-before-define": "warn", | ||
"import/no-cycle": "off", | ||
"import/no-unresolved": "off", | ||
"prettier/prettier": ["error"] | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,144 @@ | ||
# Created by https://www.toptal.com/developers/gitignore/api/node | ||
# Edit at https://www.toptal.com/developers/gitignore?templates=node | ||
|
||
### Node ### | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
lerna-debug.log* | ||
.pnpm-debug.log* | ||
|
||
# Diagnostic reports (https://nodejs.org/api/report.html) | ||
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
*.lcov | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# Bower dependency directory (https://bower.io/) | ||
bower_components | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (https://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
|
||
# Snowpack dependency directory (https://snowpack.dev/) | ||
web_modules/ | ||
|
||
# TypeScript cache | ||
*.tsbuildinfo | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Optional stylelint cache | ||
.stylelintcache | ||
|
||
# Microbundle cache | ||
.rpt2_cache/ | ||
.rts2_cache_cjs/ | ||
.rts2_cache_es/ | ||
.rts2_cache_umd/ | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# dotenv environment variable files | ||
.env | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
.env.local | ||
|
||
# parcel-bundler cache (https://parceljs.org/) | ||
.cache | ||
.parcel-cache | ||
|
||
# Next.js build output | ||
.next | ||
out | ||
|
||
# Nuxt.js build / generate output | ||
.nuxt | ||
dist | ||
|
||
# Gatsby files | ||
.cache/ | ||
# Comment in the public line in if your project uses Gatsby and not Next.js | ||
# https://nextjs.org/blog/next-9-1#public-directory-support | ||
# public | ||
|
||
# vuepress build output | ||
.vuepress/dist | ||
|
||
# vuepress v2.x temp and cache directory | ||
.temp | ||
|
||
# Docusaurus cache and generated files | ||
.docusaurus | ||
|
||
# Serverless directories | ||
.serverless/ | ||
|
||
# FuseBox cache | ||
.fusebox/ | ||
|
||
# DynamoDB Local files | ||
.dynamodb/ | ||
|
||
# TernJS port file | ||
.tern-port | ||
|
||
# Stores VSCode versions used for testing VSCode extensions | ||
.vscode-test | ||
|
||
# yarn v2 | ||
.yarn/cache | ||
.yarn/unplugged | ||
.yarn/build-state.yml | ||
.yarn/install-state.gz | ||
.pnp.* | ||
|
||
### Node Patch ### | ||
# Serverless Webpack directories | ||
.webpack/ | ||
|
||
# Optional stylelint cache | ||
|
||
# SvelteKit build / generate output | ||
.svelte-kit | ||
|
||
# End of https://www.toptal.com/developers/gitignore/api/node |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"printWidth": 80, | ||
"tabWidth": 2, | ||
"semi": true, | ||
"singleQuote": false, | ||
"trailingComma": "es5", | ||
"bracketSpacing": true, | ||
"quoteProps": "as-needed", | ||
"arrowParens": "always", | ||
"endOfLine": "lf", | ||
|
||
"importOrder": [ | ||
"^@Components/(.*)$", | ||
"^@Pages/(.*)$", | ||
"^@Utils/(.*)$", | ||
"^@Static/(.*)$", | ||
"^[./]" | ||
], | ||
"importOrderSeparation": true, | ||
"importOrderSortSpecifiers": true | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"compilerOptions": { | ||
"module": "ES2022", | ||
"baseUrl": ".", | ||
"paths": { | ||
"@Components/*": ["./src/components/*"], | ||
"@Pages/*": ["./src/pages/*"], | ||
"@Utils/*": ["./src/utils/*"], | ||
"@Static/*": ["./src/static/*"] | ||
} | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"name": "Mission_4_5", | ||
"version": "1.0.0", | ||
"main": "main.js", | ||
"repository": "[email protected]:prgrms-fe-devcourse/FEDC4-5_Project_Notion_VanillaJS.git", | ||
"author": "Howon Shin <[email protected]>", | ||
"license": "MIT", | ||
"private": true, | ||
"scripts": { | ||
"start": "yarn serve:dev", | ||
"build": "yarn build:prod", | ||
"build:dev": "webpack --mode=development", | ||
"build:prod": "webpack --mode=production", | ||
"serve:dev": "webpack serve --mode=development", | ||
"serve:prod": "webpack serve --mode=production", | ||
"lint": "eslint './**/*.js'" | ||
}, | ||
"devDependencies": { | ||
"@babel/cli": "^7.22.5", | ||
"@babel/core": "^7.22.5", | ||
"@babel/preset-env": "^7.22.5", | ||
"babel-loader": "^9.1.2", | ||
"babel-plugin-module-resolver": "^5.0.0", | ||
"css-loader": "^6.8.1", | ||
"eslint": "^8.44.0", | ||
"eslint-config-airbnb-base": "^15.0.0", | ||
"eslint-config-prettier": "^8.8.0", | ||
"eslint-plugin-import": "^2.27.5", | ||
"eslint-plugin-prettier": "5.0.0", | ||
"html-loader": "^4.2.0", | ||
"html-webpack-plugin": "^5.5.3", | ||
"prettier": "^3.0.0", | ||
"style-loader": "^3.3.3", | ||
"svg-inline-loader": "^0.8.2", | ||
"webpack": "^5.88.1", | ||
"webpack-cli": "^5.1.4", | ||
"webpack-dev-server": "^4.15.1" | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Hotion</title> | ||
</head> | ||
<body> | ||
<main class="app"></main> | ||
</body> | ||
</html> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
body { | ||
margin: 0px; | ||
} | ||
|
||
.app { | ||
display: flex; | ||
width: 100vw; | ||
height: 100vh; | ||
} | ||
|
||
.main-container { | ||
display: flex; | ||
flex-direction: column; | ||
flex: 1 1 0%; | ||
height: 100vh; | ||
} | ||
|
||
.document-container { | ||
flex: 1 1 0%; | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { patchSidebarState, registerStateSetter } from "@Utils/stateSetters"; | ||
import DocumentContainer from "@Components/DocumentContainer"; | ||
import Header from "@Components/Header/Header"; | ||
import Sidebar from "@Components/Sidebar/Sidebar"; | ||
import "./App.css"; | ||
|
||
export default function App({ $target }) { | ||
// 기본 레이아웃 요소 생성 | ||
const sidebar = new Sidebar({ $target }); | ||
registerStateSetter(sidebar); | ||
patchSidebarState(); | ||
|
||
const $main = document.createElement("div"); | ||
|
||
const header = new Header({ $target: $main }); | ||
registerStateSetter(header); | ||
|
||
$main.className = "main-container"; | ||
$target.appendChild($main); | ||
|
||
// route 로 변경되는 부분 | ||
new DocumentContainer({ $target: $main }); | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { registerStateSetter } from "@Utils/stateSetters"; | ||
import router from "@Utils/router"; | ||
import { EVENT } from "@Utils/constants"; | ||
import Document from "@Pages/Document/Document"; | ||
import Dashboard from "../pages/Dashboard/Dashboard"; | ||
|
||
export default function DocumentContainer({ $target }) { | ||
const $documentContainer = document.createElement("article"); | ||
$target.appendChild($documentContainer); | ||
$documentContainer.className = "document-container"; | ||
|
||
const dashboard = new Dashboard({ $target: $documentContainer }); | ||
registerStateSetter(dashboard); | ||
|
||
const hotionDocument = new Document({ $target: $documentContainer }); | ||
registerStateSetter(hotionDocument); | ||
|
||
const route = () => router({ $target: $documentContainer }); | ||
window.addEventListener("load", route); | ||
window.addEventListener("popstate", route); | ||
window.addEventListener(EVENT.ROUTE, route); | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
.header { | ||
display: flex; | ||
align-items: center; | ||
justify-content: space-between; | ||
height: 2em; | ||
padding: 7px; | ||
} | ||
|
||
.header-nav { | ||
display: flex; | ||
align-items: center; | ||
margin-left: 0.5em; | ||
} | ||
|
||
.header-title { | ||
howons marked this conversation as resolved.
Show resolved
Hide resolved
|
||
padding: 0.3em; | ||
border-radius: 3px; | ||
cursor: pointer; | ||
user-select: none; | ||
} | ||
|
||
.header-title:hover { | ||
background-color: #e6e6e6; | ||
} | ||
|
||
.header-title-divider { | ||
margin: 0 0.5em 0 0.5em; | ||
color: #848484; | ||
user-select: none; | ||
} |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
재밌는(흥미로운) 점은, 호원님, 혜진님의 prettierrc 세팅이 다다르다는 것이네요!
정답이 있는게 아니라서 재밌다고 표현했습니다!
창욱님 세팅
혜진님 세팅