Skip to content
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

[FE] issue243: 링크 모음 CRUD + 링크 미리보기 구현 #274

Merged
merged 51 commits into from Aug 17, 2022
Merged
Show file tree
Hide file tree
Changes from 38 commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
0d0cc18
fix: 스토리북 오류 수정
nan-noo Aug 12, 2022
2c778b2
feat: UserDescription 컴포넌트 구현
nan-noo Aug 12, 2022
e9e20bc
feat: Image 컴포넌트 -> CenterImage 컴포넌트
nan-noo Aug 12, 2022
de38ac2
feat: LinkPreview 컴포넌트 구현
nan-noo Aug 12, 2022
fddc9e4
Merge branch 'develop' of https://github.com/nan-noo/2022-moamoa into…
nan-noo Aug 13, 2022
240cfca
feat: LinkPreview 컴포넌트 수정
nan-noo Aug 13, 2022
20f1ef6
Merge branch 'develop' of https://github.com/nan-noo/2022-moamoa into…
nan-noo Aug 13, 2022
184783e
chore: storybook main.js 수정
nan-noo Aug 13, 2022
9de8fb9
feat: DropDownBox 컴포넌트 구현
nan-noo Aug 13, 2022
879ee4f
feat: DropDownBox 컴포넌트 적용
nan-noo Aug 13, 2022
bdb55a0
refactor: eslint 적용
nan-noo Aug 13, 2022
4a6db01
feat: LinkItem 컴포넌트 구현
nan-noo Aug 13, 2022
a668f58
refactor: icon svg 컴포넌트 분리
nan-noo Aug 13, 2022
b1d5a48
feat: LinkForm 컴포넌트 구현
nan-noo Aug 13, 2022
7acae0d
refactor: Input.style.js 공통 컴포넌트 폴더로 이동
nan-noo Aug 13, 2022
342dd26
feat: LinkForm 컴포넌트 로직 수정
nan-noo Aug 13, 2022
694ebb0
feat: url 정규식 검증 로직 추가
nan-noo Aug 13, 2022
14a6c83
feat: LinkRoomTabPanel 컴포넌트 구현
nan-noo Aug 13, 2022
3f400c7
style: 스터디 방 페이지 반응형 UI 적용
nan-noo Aug 13, 2022
287042b
feat: Modal 컴포넌트 구현
nan-noo Aug 14, 2022
8d73500
feat: 링크 모음탭에 모달 적용
nan-noo Aug 14, 2022
f9e7582
feat: 링크 모킹 서버 구현
nan-noo Aug 14, 2022
57200d2
feat: 링크 조회 무한 스크롤 구현
nan-noo Aug 14, 2022
4654ac3
feat: 링크 등록 기능 구현
nan-noo Aug 14, 2022
84874d2
feat: 링크 삭제 기능 구현
nan-noo Aug 14, 2022
6539f26
feat: 링크 수정 기능 구현
nan-noo Aug 14, 2022
ca9d73a
refactor: eslint, prettier 적용
nan-noo Aug 14, 2022
41a1e28
feat: 메타 태그 추가
nan-noo Aug 14, 2022
90e38bc
feat: 내 링크만 수정/삭제 가능하도록 수정
nan-noo Aug 15, 2022
480ad1b
chore: api 환경변수 추가
nan-noo Aug 15, 2022
e42be66
feat: 링크 미리보기 구현
nan-noo Aug 15, 2022
9b22e30
feat: 도메인네임만 보여주도록 수정
nan-noo Aug 15, 2022
511affc
test: 테스트 수정
nan-noo Aug 16, 2022
04a012b
feat: 링크 미리보기 서버와 연결
nan-noo Aug 16, 2022
a98f989
fix: domainName이 유효하지 않은 url인 오류 수정
nan-noo Aug 16, 2022
d3b7c45
refactor: lint, type 수정
nan-noo Aug 16, 2022
26cb75f
chore: api url 변경
nan-noo Aug 16, 2022
c2c368c
Merge branch 'develop' of https://github.com/nan-noo/2022-moamoa into…
nan-noo Aug 16, 2022
8d8da06
refactor: AxiosError 타입 수정
nan-noo Aug 17, 2022
76317ca
refactor: Noop 타입 분리
nan-noo Aug 17, 2022
f9a6a67
refactor: linkHandler 수정
nan-noo Aug 17, 2022
723bbd5
refactor: CenterImage src 타입 수정
nan-noo Aug 17, 2022
0292e49
refactor: useForm onChange 함수 분리
nan-noo Aug 17, 2022
cca4fa6
refactor: list -> 복수형
nan-noo Aug 17, 2022
ad7a610
refactor: 상대경로 -> 절대경로
nan-noo Aug 17, 2022
26be97a
refactor: api 폴더 구조 변경
nan-noo Aug 17, 2022
b03607b
feat: 링크 클릭시 새 탭 열리게 수정
nan-noo Aug 17, 2022
4d11355
refactor: lint, ts 에러 수정
nan-noo Aug 17, 2022
fffdc0f
refactor: z-index 위치 수정
nan-noo Aug 17, 2022
68fc39c
refactor: css props에 tw 함수 적용
nan-noo Aug 17, 2022
0aa12da
Merge branch 'develop' of https://github.com/nan-noo/2022-moamoa into…
nan-noo Aug 17, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
37 changes: 19 additions & 18 deletions frontend/.storybook/main.js
@@ -1,4 +1,5 @@
const { resolve } = require('path');
const { ESBuildMinifyPlugin } = require('esbuild-loader');

module.exports = {
stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
Expand Down Expand Up @@ -34,27 +35,27 @@ module.exports = {
'@mocks': resolve(__dirname, '../src/mocks'),
};

config.module.rules[0].use[0].options.presets = [
require.resolve('@babel/preset-env'),
[
require.resolve('@babel/preset-react'),
{
runtime: 'automatic',
importSource: '@emotion/react',
config.module.rules = [
...config.module.rules,
{
test: /\.(ts|tsx)$/,
exclude: /node_modules/,
loader: 'esbuild-loader',
options: {
loader: 'tsx',
target: 'es2022',
},
],
},
{
test: /\.(png|jpg|jpeg)$/i,
type: 'asset/resource',
},
];

config.module.rules[0].use[0].options.plugins = [
[
require.resolve('@emotion/babel-plugin'),
{
sourceMap: true,
autoLabel: 'dev-only',
labelFormat: '[local]',
cssPropOptimization: true,
},
],
config.optimization.minimizer = [
new ESBuildMinifyPlugin({
target: 'es2020',
}),
];

return config;
Expand Down
2 changes: 2 additions & 0 deletions frontend/.storybook/preview-body.html
@@ -0,0 +1,2 @@
<div id="modal"></div>
<!-- 스토리북에서 Portal 사용을 위해 필요-->
26 changes: 14 additions & 12 deletions frontend/cypress/e2e/CreateStudyFormValidation.cy.tsx
Expand Up @@ -24,18 +24,20 @@ describe('스터디 개설 페이지 폼 유효성 테스트', () => {

const minText = 'a';
const maxText30 = 'abcdefghijklmnopqrstuvwxyzabcd';
const redOutlineCss = 'rgb(255, 0, 0) solid 2px';
const redBorderCss = '1px solid rgb(255, 0, 0)';
const border = 'border';

it(`스터디 제목은 최소 ${TITLE_LENGTH.MIN.VALUE}글자에서 최대 ${TITLE_LENGTH.MAX.VALUE}글자까지 입력할 수 있다.`, () => {
cy.get(`@${studyTitle}`).type(minText);
cy.get(`@${studyTitle}`).should('not.have.css', 'outline', redOutlineCss);
cy.get(`@${studyTitle}`).should('not.have.css', border, redBorderCss);

cy.get(`@${studyTitle}`).clear().type(maxText30);
cy.get(`@${studyTitle}`).should('not.have.css', 'outline', redOutlineCss);
cy.get(`@${studyTitle}`).should('not.have.css', border, redBorderCss);
});

it(`스터디 제목이 ${TITLE_LENGTH.MIN.VALUE}글자 미만이면 입력창 테두리가 빨갛게 된다.`, () => {
cy.get(`@${studyTitle}`).type(minText).clear();
cy.get(`@${studyTitle}`).should('have.css', 'outline', redOutlineCss);
cy.get(`@${studyTitle}`).should('have.css', border, redBorderCss);
});

it(`스터디 제목이 ${TITLE_LENGTH.MAX.VALUE}글자를 초과하면 초과한 글자는 입력되지 않는다.`, () => {
Expand All @@ -46,37 +48,37 @@ describe('스터디 개설 페이지 폼 유효성 테스트', () => {
it(`스터디 제목이 ${TITLE_LENGTH.MIN.VALUE}글자 미만이면 개설하기 버튼을 눌렀을 때 입력창 테두리가 빨갛게 된다.`, () => {
cy.get(`@${studyTitle}`).type(minText).clear();
cy.get(`@${submitButton}`).click();
cy.get(`@${studyTitle}`).should('have.css', 'outline', redOutlineCss);
cy.get(`@${studyTitle}`).should('have.css', border, redBorderCss);
});

it(`스터디 소개글은 최소 ${DESCRIPTION_LENGTH.MIN.VALUE}글자를 입력할 수 있다.`, () => {
cy.get(`@${description}`).type(minText);
cy.get(`@${description}`).should('not.have.css', 'outline', redOutlineCss);
cy.get(`@${description}`).should('not.have.css', border, redBorderCss);
});

it(`스터디 소개글이 ${DESCRIPTION_LENGTH.MIN.VALUE}글자 미만이면 입력창 테두리가 빨갛게 된다.`, () => {
cy.get(`@${description}`).type(minText).clear();
cy.get(`@${description}`).should('have.css', 'outline', redOutlineCss);
cy.get(`@${description}`).should('have.css', border, redBorderCss);
});

it(`스터디 소개글이 ${DESCRIPTION_LENGTH.MIN.VALUE}글자 미만이면 개설하기 버튼을 눌렀을 때 입력창 테두리가 빨갛게 된다.`, () => {
cy.get(`@${description}`).type(minText).clear();
cy.get(`@${submitButton}`).click();
cy.get(`@${description}`).should('have.css', 'outline', redOutlineCss);
cy.get(`@${description}`).should('have.css', border, redBorderCss);
});

const maxText50 = maxText30 + '12345678901234567890';
it(`스터디 한줄 소개는 최소 ${EXCERPT_LENGTH.MIN.VALUE}글자에서 최대 ${EXCERPT_LENGTH.MAX.VALUE}글자까지 입력할 수 있다.`, () => {
cy.get(`@${excerpt}`).type(minText);
cy.get(`@${excerpt}`).should('not.have.css', 'outline', redOutlineCss);
cy.get(`@${excerpt}`).should('not.have.css', border, redBorderCss);

cy.get(`@${excerpt}`).clear().type(maxText50);
cy.get(`@${excerpt}`).should('not.have.css', 'outline', redOutlineCss);
cy.get(`@${excerpt}`).should('not.have.css', border, redBorderCss);
});

it(`스터디 한줄 소개가 ${EXCERPT_LENGTH.MIN.VALUE}글자 미만이면 입력창 테두리가 빨갛게 된다.`, () => {
cy.get(`@${excerpt}`).type(minText).clear();
cy.get(`@${excerpt}`).should('have.css', 'outline', redOutlineCss);
cy.get(`@${excerpt}`).should('have.css', border, redBorderCss);
});

it(`스터디 한줄 소개가 ${EXCERPT_LENGTH.MAX.VALUE}글자를 초과하면 초과한 글자는 입력되지 않는다.`, () => {
Expand All @@ -87,7 +89,7 @@ describe('스터디 개설 페이지 폼 유효성 테스트', () => {
it(`스터디 소개글이 ${EXCERPT_LENGTH.MIN.VALUE}글자 미만이면 개설하기 버튼을 눌렀을 때 입력창 테두리가 빨갛게 된다.`, () => {
cy.get(`@${excerpt}`).type(minText).clear();
cy.get(`@${submitButton}`).click();
cy.get(`@${excerpt}`).should('have.css', 'outline', redOutlineCss);
cy.get(`@${excerpt}`).should('have.css', border, redBorderCss);
});

it('스터디 시작 날짜는 필수로 입력해야 한다.', () => {
Expand Down
3 changes: 2 additions & 1 deletion frontend/env/.env.dev
@@ -1,2 +1,3 @@
API_URL="https://dev.moamoa.ne.kr"
API_URL="https://api.dev.moamoa.space"
CLIENT_ID="cb83d95cd5644436b090"
LINK_PREVIEW_API_URL="https://api.og.moamoa.space"
1 change: 1 addition & 0 deletions frontend/env/.env.local
@@ -1,2 +1,3 @@
API_URL=""
CLIENT_ID="cb83d95cd5644436b090"
LINK_PREVIEW_API_URL="https://api.og.moamoa.space"
3 changes: 2 additions & 1 deletion frontend/env/.env.prod
@@ -1,2 +1,3 @@
API_URL="https://moamoa.ne.kr"
API_URL="https://api.moamoa.space"
CLIENT_ID="cb83d95cd5644436b090"
LINK_PREVIEW_API_URL="https://api.og.moamoa.space"