Skip to content

Commit 3600c82

Browse files
authored
Merge pull request #310 from boostcampwm-2021/release0.0.3
Release0.0.3
2 parents d7c580f + 10ae236 commit 3600c82

File tree

282 files changed

+71779
-37054
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

282 files changed

+71779
-37054
lines changed

.github/PULL_REQUEST_TEMP

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
## Related Issue
2+
3+
## WorkList
4+
5+
### [ Title ]
6+
7+
### [ Problem ]
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: 'Error, :sos: help'
6+
assignees: jin-Pro
7+
8+
---
9+
10+
## What happened
11+
12+
## How Solved it
13+
14+
## I Think...
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: FE, Feature
6+
assignees: jin-Pro
7+
8+
---
9+
10+
## Description
11+
12+
## Todo

.github/workflows/chromatic.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Workflow name
2+
name: "Chromatic Deployment"
3+
4+
# Event for the workflow
5+
on:
6+
push:
7+
branches: [dev]
8+
9+
env:
10+
client-directory: ./client
11+
12+
# List of jobs
13+
jobs:
14+
test:
15+
# Operating System
16+
runs-on: ubuntu-latest
17+
# Job steps
18+
steps:
19+
- uses: actions/checkout@v1
20+
21+
- name: Client npm install
22+
working-directory: ${{env.client-directory}}
23+
run: npm install
24+
25+
- name: Storybook Deploy
26+
working-directory: ${{env.client-directory}}
27+
run: npm run

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
cd client && npm run lint-staged

.husky/pre-push

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
cd client && npm run test

README.md

Lines changed: 28 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
1+
## 👨 팀원소개
2+
3+
| J039 | J080 | J154 | J220 |
4+
| :------------------------------------------: | :---------------------------------------------: | :---------------------------------------------: | :-----------------------------------------------: |
5+
| [김영진](https://github.com/jin-Pro) | [민태홍](https://github.com/taehong0-0) | [이윤성](https://github.com/ddaynew365) | [홍한솔](https://github.com/Noelsky-code) |
6+
| <img src="https://github.com/jin-Pro.png" /> | <img src="https://github.com/taehong0-0.png" /> | <img src="https://github.com/ddaynew365.png" /> | <img src="https://github.com/Noelsky-code.png" /> |
7+
8+
## [기술 스택](https://github.com/boostcampwm-2021/web10-CowDogTing/wiki/%EA%B8%B0%EC%88%A0-%EC%8A%A4%ED%83%9D)
9+
10+
![image](https://user-images.githubusercontent.com/64246267/142752437-7bb13285-946d-47df-ac42-90afad950ed8.png)
11+
112
# CowDogTing
213

314
<p align="center" >
415
<img src="https://user-images.githubusercontent.com/64246267/138801849-61178d29-1a9a-4723-bcb9-ac3f5d2ce4a7.png" align="center"/>
516
</p>
617

7-
<p align="center" >
8-
COWDOGTING
9-
</p>
10-
1118
---
1219

1320
### 주의할 점
@@ -27,20 +34,25 @@ COWDOGTING
2734

2835
---
2936

30-
## [기술 스택](https://github.com/boostcampwm-2021/web10-CowDogTing/wiki/%EA%B8%B0%EC%88%A0-%EC%8A%A4%ED%83%9D)
31-
32-
![image](https://user-images.githubusercontent.com/64246267/142752437-7bb13285-946d-47df-ac42-90afad950ed8.png)
33-
3437
## Resources
3538

36-
### Backlog
39+
- ### Backlog
40+
- [v0.0.1 Backlog](https://docs.google.com/spreadsheets/d/167yJb78hPknp7S7JK_qtHvbFZXPQ6wmps1iL3sgt1es/edit#gid=1761511684)
41+
- [v0.0.2 Backlog](https://docs.google.com/spreadsheets/d/1KEDtPdyq-6ktoalXyqvbzD71V4ZJRgGZdSqqrwF8L4g/edit#gid=0)
42+
- [v0.0.3 Backlog](https://docs.google.com/spreadsheets/d/1iHp0oGUdseSQMF6j1ngycMOpkKxyRaUgIkAEP47pWUE/edit#gid=0)
43+
- ### StoryBook URL
44+
- [배포](https://www.chromatic.com/build?appId=62f3c06c73a375912ca8d9be&number=1)
45+
- [repo](https://github.com/jin-Pro/CowDogTing_Storybook)
46+
- ### API 문서
47+
- [API](https://github.com/boostcampwm-2021/web10-CowDogTing/wiki/API-%EB%AC%B8%EC%84%9C)
48+
- ### Test 문서
3749

38-
- [v0.0.1 Backlog](https://docs.google.com/spreadsheets/d/167yJb78hPknp7S7JK_qtHvbFZXPQ6wmps1iL3sgt1es/edit#gid=1761511684)
39-
- [v0.0.2 Backlog](https://docs.google.com/spreadsheets/d/1KEDtPdyq-6ktoalXyqvbzD71V4ZJRgGZdSqqrwF8L4g/edit#gid=0)
50+
- [Jest](https://github.com/boostcampwm-2021/web10-CowDogTing/wiki/Jest-%EB%AC%B8%EC%84%9C)
4051

41-
## 👨 팀원소개
52+
- ### Type 문서
4253

43-
| J039 | J080 | J154 | J220 |
44-
| :------------------------------------------: | :---------------------------------------------: | :---------------------------------------------: | :-----------------------------------------------: |
45-
| [김영진](https://github.com/jin-Pro) | [민태홍](https://github.com/taehong0-0) | [이윤성](https://github.com/ddaynew365) | [홍한솔](https://github.com/Noelsky-code) |
46-
| <img src="https://github.com/jin-Pro.png" /> | <img src="https://github.com/taehong0-0.png" /> | <img src="https://github.com/ddaynew365.png" /> | <img src="https://github.com/Noelsky-code.png" /> |
54+
- [Type](https://github.com/boostcampwm-2021/web10-CowDogTing/wiki/Type-%EB%AC%B8%EC%84%9C)
55+
56+
- ### 개선사항
57+
- [Infinity Scroll 비교 분석](https://velog.io/@0_jin/%EB%AC%B4%ED%95%9C%EC%8A%A4%ED%81%AC%EB%A1%A4-%EC%84%B1%EB%8A%A5-%EA%B0%9C%EC%84%A0)
58+
- [Code splitting 적용](https://velog.io/@0_jin/WebVitals-10-%EB%8B%A8%EC%B6%95%EC%8B%9C%ED%82%A4%EA%B8%B0)

client/.eslintrc.json

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@
2222
},
2323
"plugins": ["react", "@typescript-eslint"],
2424
"rules": {
25+
"camelcase":1,
26+
"no-undef" : 1,
27+
"react/require-default-props" : 0,
28+
"no-nested-ternary" : 0,
2529
"react/jsx-props-no-spreading" : 0,
2630
"react/jsx-no-useless-fragment" : 0,
2731
"no-shadow" : 0,
@@ -30,21 +34,21 @@
3034
"react/prop-types" : 0,
3135
"react/react-in-jsx-scope" : 0,
3236
"no-param-reassign" : 0,
33-
"import/prefer-default-export": 0,
34-
"react/function-component-definition" : 0,
35-
"react/jsx-filename-extension" : 0,
36-
"import/no-unresolved": 0,
37-
"react/no-array-index-key" : 0,
38-
"no-use-before-define" : 0,
39-
"import/extensions" : 0,
40-
"no-unused-vars" : 1,
41-
"import/no-extraneous-dependencies" : 0,
42-
"prettier/prettier": [
43-
"error",
44-
{
45-
"endOfLine": "auto"
46-
}
47-
]
37+
"import/prefer-default-export": 0,
38+
"react/function-component-definition" : 0,
39+
"react/jsx-filename-extension" : 0,
40+
"import/no-unresolved": 0,
41+
"react/no-array-index-key" : 0,
42+
"no-use-before-define" : 0,
43+
"import/extensions" : 0,
44+
"no-unused-vars" : 1,
45+
"import/no-extraneous-dependencies" : 0,
46+
"prettier/prettier": [
47+
"error",
48+
{
49+
"endOfLine": "auto"
50+
}
51+
]
4852
},
4953
"settings": {
5054
"import/resolver": {

client/.storybook/main.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
const path = require("path");
2+
const toPath = (_path) => path.join(process.cwd(), _path);
3+
4+
module.exports = {
5+
stories: ["../src/Component/Atom/**/*.stories.tsx"],
6+
addons: ["@storybook/addon-links", "@storybook/addon-essentials", "@storybook/addon-interactions", "@storybook/preset-create-react-app"],
7+
framework: "@storybook/react",
8+
core: {
9+
builder: "@storybook/builder-webpack5",
10+
},
11+
webpackFinal: async (config) => {
12+
config.resolve.alias["@Atom"] = toPath("src/Component/Atom");
13+
config.resolve.alias["@Core"] = toPath("src/Component/Core");
14+
config.resolve.alias["@Hook"] = toPath("src/Hook");
15+
config.resolve.alias["@Page"] = toPath("src/Component/Page");
16+
config.resolve.alias["@Molecules"] = toPath("src/Component/Molecules");
17+
config.resolve.alias["@Organism"] = toPath("src/Component/Organism");
18+
config.resolve.alias["@Template"] = toPath("src/Component/Template");
19+
config.resolve.alias["@Hoc"] = toPath("src/Component/Hoc");
20+
config.resolve.alias["@Common"] = toPath("src/Util");
21+
config.resolve.alias["@Recoil"] = toPath("src/Recoil");
22+
config.resolve.alias["@Socket"] = toPath("src/Socket");
23+
config.resolve.alias["@emotion/styled"] = toPath("node_modules/@emotion/styled");
24+
config.resolve.alias["@emotion/react"] = toPath("node_modules/@emotion/react");
25+
return config;
26+
},
27+
};

client/.storybook/preview.js

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
export const parameters = {
2+
actions: { argTypesRegex: "^on[A-Z].*" },
3+
controls: {
4+
matchers: {
5+
color: /(background|color)$/i,
6+
date: /Date$/,
7+
},
8+
},
9+
};
10+
11+
// function Test({ profileDatas, teamDatas, userDatas, children }) {
12+
// const setProfileModal = useSetRecoilState(profileModalDatas);
13+
// const setTeamState = useSetRecoilState(teamState);
14+
// const setUserState = useSetRecoilState(userState);
15+
16+
// setProfileModal(profileDatas);
17+
// setTeamState(teamDatas);
18+
// setUserState(userDatas);
19+
20+
// return <div>{children}</div>;
21+
// }
22+
23+
// export const decorators = [
24+
// (Story, context) => (
25+
// <RecoilRoot>
26+
// <BrowserRouter>
27+
// <Test {...dummyData}>
28+
// <Story {...context} />
29+
// </Test>
30+
// </BrowserRouter>
31+
// </RecoilRoot>
32+
// ),
33+
// ];
34+
35+
// const dummyData = {
36+
// profileDatas: [
37+
// {
38+
// id: "1",
39+
// image: null,
40+
// location: "서울",
41+
// sex: "남자",
42+
// age: 25,
43+
// info: "hihi",
44+
// gid: null,
45+
// idx: 1,
46+
// },
47+
// ],
48+
// teamDatas: {
49+
// id: "",
50+
// image: null,
51+
// location: "",
52+
// sex: "",
53+
// age: 0,
54+
// info: "",
55+
// leader: "",
56+
// member: [],
57+
// },
58+
// userDatas: {
59+
// id: "",
60+
// image: null,
61+
// location: "",
62+
// sex: "",
63+
// age: 0,
64+
// info: "",
65+
// gid: null,
66+
// idx: 0,
67+
// },
68+
// };

client/config-overrides.js

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,29 @@
11
const { useBabelRc, addWebpackAlias, override } = require("customize-cra");
2+
const SpeedMeasurePlugin = require("speed-measure-webpack-plugin");
23
const path = require("path");
34

45
const resolve = (src) => path.resolve(__dirname, src);
56

6-
module.exports = override(
7-
useBabelRc(),
8-
addWebpackAlias({
9-
"@Atom": resolve("./src/Component/Atom/"),
10-
"@Core": resolve("./src/Component/Core/"),
11-
"@Hook": resolve("./src/Hook/"),
12-
"@Page": resolve("./src/Component/Page/"),
13-
"@Molecules": resolve("./src/Component/Molecules/"),
14-
"@Organism": resolve("./src/Component/Organism/"),
15-
"@Template": resolve("./src/Component/Template/"),
16-
"@Hoc": resolve("./src/Component/Hoc/"),
17-
"@Util": resolve("./src/Util/"),
18-
"@Asset": resolve("./src/Asset/"),
19-
"@Recoil": resolve("./src/Recoil"),
20-
})
21-
);
7+
const smp = new SpeedMeasurePlugin();
8+
9+
module.exports = {
10+
webpack: smp.wrap(
11+
override(
12+
useBabelRc(),
13+
addWebpackAlias({
14+
"@Atom": resolve("./src/Component/Atom/"),
15+
"@Core": resolve("./src/Component/Core/"),
16+
"@Hook": resolve("./src/Hook/"),
17+
"@Page": resolve("./src/Component/Page/"),
18+
"@Molecules": resolve("./src/Component/Molecules/"),
19+
"@Organism": resolve("./src/Component/Organism/"),
20+
"@Template": resolve("./src/Component/Template/"),
21+
"@Hoc": resolve("./src/Component/Hoc/"),
22+
"@Common": resolve("./src/Common/"),
23+
"@Asset": resolve("./src/Asset/"),
24+
"@Recoil": resolve("./src/Recoil/"),
25+
"@Socket": resolve("./src/Socket/"),
26+
})
27+
)
28+
),
29+
};
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { MockProps } from "..";
2+
3+
export const chatInfoHandler: MockProps = (req, res, ctx) => {
4+
return res(
5+
ctx.json([
6+
{
7+
chatRoomId: 1,
8+
member: [
9+
{ id: "test", image: null, location: "수원", sex: "male", age: 25, info: "hihi", gid: 1, idx: 1 },
10+
{ id: "test1", image: null, location: "수원", sex: "male", age: 25, info: "hihi", gid: 1, idx: 2 },
11+
],
12+
13+
chatMessage: [
14+
{
15+
from: "test",
16+
message: "hihi",
17+
source: "",
18+
},
19+
],
20+
},
21+
])
22+
);
23+
};
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { MockProps } from "..";
2+
3+
export const chatMessagesHandler: MockProps = (req, res, ctx) => {
4+
const params = req.url.searchParams;
5+
const chatRoomId = params.get("chatRoomId");
6+
const index = params.get("index");
7+
if (index === "0") return res(ctx.status(403), ctx.json({ errorMessage: "index에러" }));
8+
if (chatRoomId === "0") return res(ctx.status(403), ctx.json({ errorMessage: "chatRoomId에러" }));
9+
return res(
10+
ctx.json([
11+
{
12+
from: "to",
13+
message: "hi",
14+
source: "",
15+
},
16+
])
17+
);
18+
};
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { rest } from "msw";
2+
import { POST_CHAT_READ_API_URL, CHAT_INFO_URL, CHAT_MESSAGES_API_URL, JOIN_CHAT_URL } from "../../../src/Common/URL";
3+
4+
import { chatInfoHandler } from "./chatInfoHandler";
5+
import { chatMessagesHandler } from "./chatMessagesHandler";
6+
import { joinChatHandler } from "./joinChatHandler";
7+
import { postChatReadHandler } from "./postChatReadHandler";
8+
9+
export const chatHandler = [rest.post(POST_CHAT_READ_API_URL, postChatReadHandler), rest.get(JOIN_CHAT_URL, joinChatHandler), rest.get(CHAT_INFO_URL, chatInfoHandler), rest.get(CHAT_MESSAGES_API_URL, chatMessagesHandler)];
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { MockProps } from "..";
2+
3+
export const joinChatHandler: MockProps = (req, res, ctx) => {
4+
return res(
5+
ctx.json([
6+
{ chatRoomId: 1, notReadNum: 0 },
7+
{ chatRoomId: 12, notReadNum: 5 },
8+
])
9+
);
10+
};

0 commit comments

Comments
 (0)