Skip to content

Commit

Permalink
Merge pull request #37 from JUNGYUN-Daegu/FE-dev
Browse files Browse the repository at this point in the history
[Team05 - Q, eve] issue-tracker 2주차 PR
  • Loading branch information
crongro authored Jun 25, 2021
2 parents 0871325 + 3b6ea99 commit 6e277ee
Show file tree
Hide file tree
Showing 68 changed files with 3,821 additions and 24,758 deletions.
1 change: 1 addition & 0 deletions FE/issue-tracker/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

# misc
.DS_Store
.env
.env.local
.env.development.local
.env.test.local
Expand Down
25,125 changes: 929 additions & 24,196 deletions FE/issue-tracker/package-lock.json

Large diffs are not rendered by default.

24 changes: 13 additions & 11 deletions FE/issue-tracker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,16 @@
"@chakra-ui/react": "^1.6.3",
"@emotion/react": "^11.4.0",
"@emotion/styled": "^11.3.0",
"@testing-library/jest-dom": "^5.13.0",
"@testing-library/react": "^11.2.7",
"@testing-library/user-event": "^12.8.3",
"@types/jest": "^26.0.23",
"@types/node": "^12.20.14",
"@types/react": "^17.0.9",
"@types/react-dom": "^17.0.6",
"@types/react-router-dom": "^5.1.7",
"@types/styled-components": "^5.1.9",
"axios": "^0.21.1",
"framer-motion": "^4.1.17",
"jwt-decode": "^3.1.2",
"query-string": "^7.0.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-router-dom": "^5.2.0",
"react-scripts": "4.0.3",
"recoil": "^0.3.1",
"styled-components": "^5.3.0",
"typescript": "^4.3.2",
"web-vitals": "^1.1.2"
},
"scripts": {
Expand Down Expand Up @@ -52,6 +44,16 @@
},
"devDependencies": {
"react-app-rewire-alias": "^1.0.3",
"react-app-rewired": "^2.1.8"
"react-app-rewired": "^2.1.8",
"@testing-library/jest-dom": "^5.13.0",
"@testing-library/react": "^11.2.7",
"@testing-library/user-event": "^12.8.3",
"@types/jest": "^26.0.23",
"@types/node": "^12.20.14",
"@types/react": "^17.0.9",
"@types/react-dom": "^17.0.6",
"@types/react-router-dom": "^5.1.7",
"typescript": "^4.3.2",
"@types/styled-components": "^5.1.9"
}
}
19 changes: 11 additions & 8 deletions FE/issue-tracker/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Suspense } from 'react';
import { BrowserRouter, Switch, Route } from 'react-router-dom';
import styled, { ThemeProvider } from 'styled-components';

Expand All @@ -18,24 +19,26 @@ function App() {
<Background>
<BrowserRouter>
<Switch>
<Route path="/" exact>
<Login />
<Route path="/issues/new">
<NewIssue />
</Route>
<Route path="/issues/detail/:id">
<Suspense fallback={<div>이슈를 불러오는 중 입니다.</div>}>
<IssueDetail />
</Suspense>
</Route>
<Route path="/issues">
<Issues />
</Route>
<Route path="/new-issue">
<NewIssue />
</Route>
<Route path="/issue-detail">
<IssueDetail />
</Route>
<Route path="/labels">
<Labels />
</Route>
<Route path="/milestones">
<Milestones />
</Route>
<Route path="/">
<Login />
</Route>
</Switch>
</BrowserRouter>
</Background>
Expand Down
51 changes: 51 additions & 0 deletions FE/issue-tracker/src/components/common/CommonTextArea.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import styled from 'styled-components';

import { Textarea } from '@chakra-ui/textarea';
import { contentsInputStyle } from '@components/newIssue/style';
import { ReactComponent as FileIcon } from '@assets/file.svg';

function CommonTextArea() {
return (
<Description>
<Textarea {...contentsInputStyle} />
<Span>띄어쓰기 포함 \d\d 자</Span>
<ImageUploadWrap>
<FileIcon />
<span>파일 첨부하기</span>
</ImageUploadWrap>
</Description>
);
}

export default CommonTextArea;

const Description = styled.div`
width: 880px;
position: relative;
background: ${({ theme }) => theme.colors.gr_inputBackground};
border-radius: ${({ theme }) => theme.radii['2xl']};
`;

const Span = styled.div`
right: 30px;
bottom: 72px;
font-size: ${({ theme }) => theme.fontSizes.xs};
font-weight: ${({ theme }) => theme.fontWeights.medium};
color: ${({ theme }) => theme.colors.label};
position: absolute;
`;

const ImageUploadWrap = styled.div`
display: flex;
align-items: center;
padding: 16px 24px;
height: 52px;
color: ${({ theme }) => theme.colors.label};
font-weight: ${({ theme }) => theme.fontWeights.bold};
border-top: 1px dotted ${({ theme }) => theme.colors.gr_line};
cursor: pointer;
span {
padding-left: 10px;
}
`;
2 changes: 1 addition & 1 deletion FE/issue-tracker/src/components/common/CompleteBtn.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function CompleteBtn() {

export default CompleteBtn;

const completeButton = {
export const completeButton = {
width: '120px',
fontSize: 'xs',
background: 'bl_initial',
Expand Down
9 changes: 7 additions & 2 deletions FE/issue-tracker/src/components/common/EditMiniButton.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
import styled from 'styled-components';

import { ReactComponent as Edit } from '@assets/edit.svg';
import { Dispatch, SetStateAction } from 'react';

interface Props {
children: string;
margin?: string;
setState: Dispatch<SetStateAction<boolean>>;
}

function EditMiniButton({ children, margin }: Props) {
function EditMiniButton({ children, margin, setState }: Props) {
const handleClickEdit = (): void => setState((state) => !state);

return (
<EditButton margin={margin}>
<EditButton margin={margin} onClick={handleClickEdit}>
<Edit className="btn_edit" />
<span>{children}</span>
</EditButton>
Expand Down
1 change: 1 addition & 0 deletions FE/issue-tracker/src/components/common/Label.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ interface LabelTagType {
}

const LabelTag = styled.span<LabelTagType>`
margin-right: 4px;
padding: 4px 16px;
font-size: ${({ theme }) => theme.fontSizes.xs};
border-radius: 30px;
Expand Down
103 changes: 102 additions & 1 deletion FE/issue-tracker/src/components/common/Skeleton.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,108 @@
import styled from 'styled-components';

import { Skeleton, SkeletonCircle } from '@chakra-ui/skeleton';
import { Avatar } from '@chakra-ui/avatar';

// 프로필 이미지 스켈레톤
export const ProfileSkeleton = <SkeletonCircle size="10" isLoaded={false} />;

// 라벨 스켈레톤
export const LabelSkeleton = <Skeleton height="20px" borderRadius="16px" />;
export function LabelSkeleton() {
return <Skeleton height="20px" width="40px" borderRadius="16px" />;
}

export function IssueSkeleton() {
return (
<IssueWrap>
<IssueContainer>
<StyledDiv>
<CheckBox type="checkbox" name="issueCheckBox" />
<IssueTitle>
<Skeleton height="20px" width="100px" />
<Skeleton height="20px" width="60px" />
<Skeleton height="20px" width="60px" />
</IssueTitle>
</StyledDiv>
<Description>
<Skeleton height="20px" width="30px" />
<Skeleton height="20px" width="80px" />
<Skeleton height="20px" width="80px" />
</Description>
</IssueContainer>
<AvatarContainer>
<AvatarBox>
<Avatar className="avatar" size="sm" src="./janmang.jpeg" />
</AvatarBox>
</AvatarContainer>
</IssueWrap>
);
}

interface AvatarPos {
pos?: string | undefined;
}

const IssueWrap = styled.div`
display: flex;
justify-content: space-between;
align-items: center;
background: ${({ theme }) => theme.colors.gr_offWhite};
`;

const IssueContainer = styled.div`
display: flex;
flex-direction: column;
justify-content: center;
width: 878;
height: 100px;
padding: 16px 0 16px 32px;
position: relative;
`;

const AvatarContainer = styled.div`
display: flex;
justify-content: flex-end;
margin-right: 30px;
width: 76px;
height: 32px;
position: relative;
`;

const AvatarBox = styled.div<AvatarPos>`
width: auto;
position: absolute;
right: ${({ pos }) => pos || '32px'};
`;

const IssueTitle = styled.div`
display: flex;
align-items: center;
height: 32px;
div {
margin: 0 4px 0 12px;
}
`;

const StyledDiv = styled.div`
display: flex;
width: 100%;
justify-content: flex-start;
align-items: center;
`;

const CheckBox = styled.input`
width: 16px;
height: 16px;
`;

const Description = styled.div`
margin: 8px 0 0 28px;
display: flex;
justify-content: flex-start;
align-items: center;
div {
margin-right: 16px;
}
`;
Loading

0 comments on commit 6e277ee

Please sign in to comment.