Skip to content
This repository was archived by the owner on Jul 8, 2024. It is now read-only.

Commit 00d1eb8

Browse files
authored
release: v1.0.10 릴리즈 (#142)
* refactor: solutionTab의 상태관련 로직들을 custom hook으로 분리 (#124) * refactor: popup의 인증 관련들을 custom hook으로 분리 (#125) * refactor: profile tab의 데이터 파싱 로직들을 service 레이어로 분리 (#126) * chore: 브라우저 호환 대상 브라우저 리스트 수정 (#128) Babel에서 브라우저를 점유율 0.25퍼센트 이상 호환하게끔 수정하였다. 또한 @babel/plugin-transform-runtime 플러그인을 사용해 전역 네임스페이스를 오염시키지 않게끔 수정하였다. * refactor: URLSearchParams를 이용해 쿼리 파라미터를 얻게끔 수정 (#129) 기존 방식은 정규표현식을 이용해 쿼리 파라미터를 얻었었다. URLSearchParams를 이용해 쿼리 파라미터를 얻는 방식으로 리팩터링 하였다. * refactor: fetch util함수 커스터마이징 (#130) 기존 방식은 HTTP 상태코드와 데이터 타입에 따라 커스텀하기 어려웠습니다. 그래서 fetch util함수가 상태코드에 따라 에러 핸들링 작업을 위임하게끔 수정했고, json 뿐만 아니라 다른 데이터타입도 처리할 수 있게끔 수정하였습니다. close #127 * refactor: 프로그래머스 테스트 페이지의 문제 업로드 로직을 service로 분리 (#131) * refactor: 재사용되는 컴포넌트와 해당 도메인에서만 사용되는 컴포넌트들을 분리 (#132) 기존 component 폴더는 재사용되는 컴포넌트들만을 각 유형에 따라 분리하였다. 하지만 각 도메인에서 사용되는 컴포넌트들을 해당 페이지에서 구현하는 것이 아닌 component 폴더에 따로 관리하는 것이 좋다고 생각하게 되었다. 그래서 재사용되는 컴포넌트들은 shared 하위 폴더로, 각 도메인에서만 사용되는 컴포넌트들은 domain 하위 폴더로 따로 관리하였다. * chore: webpack, babel 설정 최적화 (#134) * feat: 문제 아카이빙 아이디어 탭을 생성하는 버튼 구현 * feat: 문제 아카이빙 탭 생성 * test: 페이지네이션 스토리북 작성 * refactor: webpack 개발용 설정, 빌드, 배포용 설정 나누어서 설정하기 * refactor: webpack 개발용 설정에 HMR 추가 * chore: Babel에서 중복되는 플러그인들을 제거 * chore: webpack 정적파일 압축 * chore: GitHub Actions를 이용한 storybook cd 구현 (#135) * chore: webpack production 설정 수정 (#136) * feat: 문제 아카이빙 아이디어 탭을 생성하는 버튼 구현 * feat: 문제 아카이빙 탭 생성 * test: 페이지네이션 스토리북 작성 * feat: 비동기 에러를 처리하는 AsyncBoundary 구현 자식 컴포넌트를 렌더링할 때 발생하는 에러를 핸들링하는 ErrorBoundary를 구현후 해당 Errorboundary를 Suspense와 조합하여 비동기로 데이터를 받아오는 컴포넌트를 다룰 때 사용할 수 있는 AsyncBoundary를 구현하였다. * chore: webpack production 설정 수정 - devtool을 source-map에서 hidden-source-map으로 변경해 보안 문제 해결 - image-webpack-loader 로더를 이용한 이미지 압축 * refactor: Profile 페이지 컴포넌트의 비즈니스 로직을 Custom Hook으로 분리 (#137) * chore: webpack publicPath 수정 * refactor: Profile 페이지 컴포넌트의 비즈니스 로직을 Custom Hook으로 분리 * feat: 코드가 렌더링되기 전에 보여줄 Skeleton UI 구현 (#138) * fix: 나의 풀이 페이지 버튼 위치를 %에서 rem으로 수정 기존에는 %로 버튼을 위치시켰으나, 모니터 해상도에 따라 원하는 위치에 버튼이 있지 않았음 rem을 이용해 모든 모니터에 대해서 동일한 위치에 있게끔 수정했다. * fix: 코드 깜빡임 현상 해결 * feat: SkeletonUI 구현 * feat: Virtual Scroll 구현 * feat: code mirror 스타일링 * refactor: Select 컴포넌트 리팩터링 (#139) Compound Component패턴을 이용해 Select 컴포넌트의 option를 렌더링하게끔 리팩터링했다. 기존에는 각 option들의 값을 지정하는 것을 Select 컴포넌트에서 수행했으나, Compound Component 패턴을 이용해 Select.Item을 이용해 각 옵션들을 렌더링하면서 option들의 값을 지정하는 것을 Select.Item에 위임하였다. * fix: problem.json을 계속 request하는 이슈 해결 (#140) 기존 코드에서 problem.json을 계속 request하는 이슈가 있었다. 그 이유는 useEffect의 dependency에 문제 배열이 들어가 있어 계속 useEffect 함수가 호출된 것이다. 이슈가 발생되지 않게끔 수정해 초기 로드 때만 request하게끔 수정하였다. * test: storybook 컴포넌트 스토리 문서화 (#141) * test: solution page 통합테스트 코드 작성 * refactor: Popup page Compound 패턴 제거 * feat: 각 스토리의 argument와 component에 대한 description 작성 * fix: 로딩 완료될 때의 isLoaded의 값을 false에서 true로 변경 * modify: SolutionTab 페이지 하위 컴포넌트를 component 폴더로 이동 * test: select 컴포넌트 스토리북 작성
1 parent 4d634dc commit 00d1eb8

File tree

136 files changed

+20393
-16475
lines changed

Some content is hidden

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

136 files changed

+20393
-16475
lines changed

.github/workflows/chromatic.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: 'Chromatic Deployment'
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- develop
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v1
14+
- run: yarn
15+
- uses: chromaui/action@v1
16+
with:
17+
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
18+
token: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
/dist
88
build.zip
99
.firebase
10+
storybook-static
1011

1112
# misc
1213
.DS_Store
@@ -19,4 +20,5 @@ npm-debug.log*
1920
yarn-debug.log*
2021
yarn-error.log*
2122

22-
firebase-debug.log
23+
firebase-debug.log
24+
*.log

.storybook/main.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,15 @@ module.exports = {
1616
builder: 'webpack5',
1717
},
1818
webpackFinal: async config => {
19+
const fileLoaderRule = config.module.rules.find(rule => rule.test && rule.test.test('.svg'));
20+
fileLoaderRule.exclude = /\.svg$/;
21+
22+
config.module.rules.push({
23+
test: /\.svg$/,
24+
enforce: 'pre',
25+
loader: require.resolve('@svgr/webpack'),
26+
});
27+
1928
config.resolve.plugins = [
2029
...(config.resolve.plugins || []),
2130
new TsconfigPathsPlugin({

.storybook/preview.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
import { ThemeProvider } from 'styled-components';
22
import { theme } from '../src/styles/theme';
3-
const themeDecorator = storyFn => <ThemeProvider theme={theme}>{storyFn()}</ThemeProvider>;
3+
import { RecoilRoot } from 'recoil';
4+
import GlobalStyles from '../src/styles/global';
5+
6+
const themeDecorator = Story => (
7+
<ThemeProvider theme={theme}>
8+
<RecoilRoot>
9+
<GlobalStyles />
10+
<Story />
11+
</RecoilRoot>
12+
</ThemeProvider>
13+
);
414
export const decorators = [themeDecorator];
515

616
export const parameters = {

babel.config.js

Lines changed: 28 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,36 @@
11
module.exports = {
2-
exclude: [/node_modules[\\\/]core-js/, /node_modules[\\\/]webpack[\\\/]buildin/],
32
presets: [
4-
['@babel/preset-env', { modules: false }],
3+
['@babel/preset-env', { targets: '> 0.25%' }],
54
['@babel/preset-react', { runtime: 'automatic' }],
6-
"@babel/preset-typescript"
5+
'@babel/preset-typescript',
76
],
87
plugins: [
9-
'@babel/plugin-transform-template-literals',
10-
'@babel/plugin-transform-arrow-functions',
11-
'@babel/plugin-transform-runtime',
8+
['@babel/plugin-transform-runtime', { corejs: 3 }],
129
'@babel/plugin-syntax-dynamic-import',
1310
],
14-
env: {
15-
development: {
16-
plugins: ['babel-plugin-styled-components'],
17-
},
18-
production: {
19-
only: ['src'],
20-
plugins: [
21-
['transform-react-remove-prop-types', { removeImport: true }],
22-
'@babel/plugin-transform-react-inline-elements',
23-
'@babel/plugin-transform-react-constant-elements',
24-
],
25-
},
26-
},
2711
};
12+
13+
// Fix: Storybook build시 오류 발생하는 설정 (env field 문제)
14+
// module.exports = {
15+
// presets: [
16+
// ['@babel/preset-env', { targets: '> 0.25%' }],
17+
// ['@babel/preset-react', { runtime: 'automatic' }],
18+
// '@babel/preset-typescript',
19+
// ],
20+
// plugins: [
21+
// ['@babel/plugin-transform-runtime', { corejs: 3 }],
22+
// '@babel/plugin-syntax-dynamic-import',
23+
// 'babel-plugin-styled-components',
24+
// ],
25+
// env: {
26+
// production: {
27+
// only: ['src'],
28+
// plugins: [
29+
// ['babel-plugin-styled-components', { displayName: false }],
30+
// 'transform-react-remove-prop-types',
31+
// '@babel/plugin-transform-react-inline-elements',
32+
// '@babel/plugin-transform-react-constant-elements',
33+
// ],
34+
// },
35+
// },
36+
// };

build/app-paths.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
const path = require('path');
2+
const APP_PATH = pathDir => path.resolve(__dirname, `../${pathDir}`);
3+
4+
module.exports = APP_PATH;
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
2+
3+
module.exports = {
4+
plugins: [
5+
new BundleAnalyzerPlugin({
6+
analyzerMode: 'static', // 분석된 결과를 파일로 저장
7+
openAnalyzer: false, // 분석 결과 페이지 자동 열기 여부
8+
reportFilename: `bundle-size.html.html`, // 분석 결과 파일명
9+
openAnalyzer: true, // 웹팩 빌드 후 보고서파일을 자동으로 열지 여부
10+
}),
11+
],
12+
};

build/webpack.common.js

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
const path = require('path');
2+
3+
const APP_PATH = require('./app-paths');
4+
const HTML_PLUGIN = chunks => {
5+
return chunks.map(
6+
({ chunk, title }) =>
7+
new HtmlPlugin({
8+
title: `${title}`,
9+
filename: `${chunk}.html`,
10+
chunks: [chunk],
11+
}),
12+
);
13+
};
14+
15+
const Dotenv = require('dotenv-webpack');
16+
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
17+
const CopyPlugin = require('copy-webpack-plugin');
18+
const HtmlPlugin = require('html-webpack-plugin');
19+
const { env } = require('process');
20+
21+
module.exports = {
22+
entry: {
23+
popup: APP_PATH('src/pages/popup/index.tsx'),
24+
background: APP_PATH('src/pages/background/index.ts'),
25+
testContent: APP_PATH('src/pages/content/testPage.tsx'),
26+
solutionContent: APP_PATH('src/pages/content/solutionPage.tsx'),
27+
problemContent: APP_PATH('src/pages/content/problemPage.tsx'),
28+
profileTab: APP_PATH('src/pages/newTab/profile/index.tsx'),
29+
solutionTab: APP_PATH('src/pages/newTab/Solution.tsx'),
30+
},
31+
output: {
32+
filename: 'script/[name].js',
33+
publicPath: './',
34+
path: APP_PATH('dist'),
35+
},
36+
cache: {
37+
type: env.dev ? 'memory' : 'filesystem',
38+
buildDependencies: {
39+
config: [__filename],
40+
},
41+
idleTimeout: 2000,
42+
},
43+
module: {
44+
rules: [
45+
{
46+
test: /\.ts(x?)$/,
47+
exclude: /node_modules/,
48+
loader: 'esbuild-loader',
49+
options: {
50+
loader: 'tsx',
51+
target: 'esnext',
52+
tsconfigRaw: require('../tsconfig.json'),
53+
},
54+
},
55+
{
56+
test: /\.css$/i,
57+
use: ['style-loader', 'css-loader'],
58+
},
59+
{
60+
test: /\.svg$/i,
61+
use: ['@svgr/webpack'],
62+
},
63+
],
64+
},
65+
resolve: {
66+
extensions: ['.tsx', '.ts', '.js', '.json'],
67+
alias: {
68+
'@src': APP_PATH('./src'),
69+
'@assets': APP_PATH('./assets'),
70+
},
71+
},
72+
plugins: [
73+
new Dotenv({
74+
path: '.env',
75+
}),
76+
new CopyPlugin({
77+
patterns: [
78+
{
79+
from: APP_PATH('src/static'),
80+
to: APP_PATH('dist'),
81+
},
82+
],
83+
}),
84+
new CleanWebpackPlugin({
85+
cleanOnceBeforeBuildPatterns: ['**/*', path.resolve(process.cwd(), 'dist/**/*')],
86+
}),
87+
...HTML_PLUGIN([
88+
{ chunk: 'popup', title: '프로솔브 - PopUp 페이지' },
89+
{ chunk: 'solutionTab', title: '프로솔브 - 문제 풀이 페이지' },
90+
{ chunk: 'profileTab', title: '프로솔브 - 나의 풀이 페이지' },
91+
]),
92+
],
93+
};

build/webpack.dev.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
const { HotModuleReplacementPlugin } = require('webpack');
2+
3+
module.exports = {
4+
mode: 'development',
5+
devtool: 'source-map',
6+
plugins: [new HotModuleReplacementPlugin()],
7+
module: {
8+
rules: [
9+
{
10+
test: /\.(jpe?g|png|gif)$/i,
11+
type: 'asset/inline',
12+
},
13+
],
14+
},
15+
};

build/webpack.prod.js

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
const { ESBuildMinifyPlugin } = require('esbuild-loader');
2+
3+
module.exports = {
4+
mode: 'production',
5+
devtool: 'hidden-source-map',
6+
module: {
7+
rules: [
8+
{
9+
test: /\.(jpe?g|png|gif)$/i,
10+
type: 'asset',
11+
parser: {
12+
dataUrlCondition: {
13+
maxSize: 10 * 1024, // 10KB
14+
},
15+
},
16+
use: [
17+
{
18+
loader: 'image-webpack-loader',
19+
options: {
20+
mozjpeg: {
21+
progressive: true,
22+
quality: 65,
23+
},
24+
optipng: {
25+
enabled: false,
26+
},
27+
pngquant: {
28+
quality: [0.65, 0.9],
29+
speed: 4,
30+
},
31+
gifsicle: {
32+
interlaced: false,
33+
},
34+
webp: {
35+
quality: 75,
36+
},
37+
},
38+
},
39+
],
40+
},
41+
],
42+
},
43+
optimization: {
44+
minimizer: [
45+
new ESBuildMinifyPlugin({
46+
target: 'es2015',
47+
css: true,
48+
}),
49+
],
50+
},
51+
};

0 commit comments

Comments
 (0)