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

[Feat] Pnpm Workspace를 통한 모노레포 도입 #332

Merged
merged 61 commits into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
49abb3b
init: pnpm workspace setting, 기존 project -> apps/client
wuzoo Nov 25, 2024
526c632
docs: @tiki/tsconfig package setting
wuzoo Nov 26, 2024
fb78649
docs: root dependencies에 따른 하위 패키지 디펜던시 정리
wuzoo Nov 26, 2024
808fdb0
feat: icon package
wuzoo Nov 26, 2024
b69f4ac
docs: common hook directory
wuzoo Nov 26, 2024
f6e4427
refactor: import error 해결, lib 생성
wuzoo Nov 26, 2024
8f92e94
refactor: utils package 필요한 훅, 함수 이전
wuzoo Nov 26, 2024
adf17ac
feat: 기존 project @common/component 를 제공하는 ui package 세팅
wuzoo Nov 26, 2024
9c1c7de
chore: readme root로
wuzoo Nov 28, 2024
4cf235b
refactor: composition 컴포넌트 default export, index 파일 생성
wuzoo Nov 29, 2024
a201122
feat: tsup config 작성
wuzoo Nov 29, 2024
928a548
chore: client story ui package 반영
wuzoo Nov 29, 2024
7092a3b
docs: theme, type export 추가
wuzoo Nov 29, 2024
c88be36
feat: 모든 기존 코드 @tiki package 반영
wuzoo Nov 29, 2024
c197078
init: landing next project setting
wuzoo Nov 29, 2024
f218371
chore: svg 수정
wuzoo Nov 30, 2024
229ea55
chore: cachedImage common으로 이동
wuzoo Dec 2, 2024
1177ba9
refactor: navbar Item 컴포넌트 구조 수정 (svg는 icon 패키지로만 사용)
wuzoo Dec 2, 2024
1e762a4
refactor: svgr option no-index 추가
wuzoo Dec 2, 2024
61a1c88
refactor: noEmit 제거 및 tsconfig 수정
wuzoo Dec 2, 2024
9b91d78
docs: tsconfig 수정
wuzoo Dec 2, 2024
37177a0
fix: item 컴포넌트 prop type 반영
wuzoo Dec 2, 2024
c12374e
docs: pnpm version match
wuzoo Dec 2, 2024
ad68d9c
docs: ci script 수정
wuzoo Dec 2, 2024
5b6c4a7
docs: storybook deploy workflow command 수정
wuzoo Dec 2, 2024
f8c1dcd
docs: ci build-storybook scripts 추가
wuzoo Dec 2, 2024
a32eb3e
docs: install frozen-lockfile 추가
wuzoo Dec 3, 2024
bfa3ec4
chore: ui tsconfig composite 제거
wuzoo Dec 3, 2024
f9d7e76
fix: package resolve 문제 alias 추가
wuzoo Dec 3, 2024
ba947d6
fix: main.ts @tiki/ui alias 추가
wuzoo Dec 3, 2024
33adf33
chore: icon, utils package 추가
wuzoo Dec 3, 2024
ea974d1
fix: preview @tiki/ui/dist 로부터 import
wuzoo Dec 3, 2024
9c5ff3b
fix: preview resolve package issue try 1
wuzoo Dec 3, 2024
60c5aeb
fix: preview resolve package issue try 2
wuzoo Dec 3, 2024
506eced
fix: preview resolve package issue try 3
wuzoo Dec 3, 2024
cc09d57
fix: preview resolve package issue try 4
wuzoo Dec 3, 2024
09b4c9a
fix: preview resolve package issue try 5 (optimizeDeps)
wuzoo Dec 3, 2024
7a1252d
fix: preview resolve package issue try 6
wuzoo Dec 3, 2024
89245f1
docs: ui, icon package.json exports 추가
wuzoo Dec 3, 2024
113e78c
fix: preview resolve package issue try 7
wuzoo Dec 3, 2024
003f1fd
fix: preview resolve package issue try 8
wuzoo Dec 3, 2024
66010f5
fix: preview resolve package issue try 9
wuzoo Dec 3, 2024
48bd42f
chore: .npmrc를 통한 symlink 추가
wuzoo Dec 3, 2024
a7f4b78
chore: getAbsolutePath, mergeConfig 적용
wuzoo Dec 3, 2024
992c65e
fix: preview resolve package issue try 10
wuzoo Dec 3, 2024
6e125bd
fix: preview resolve package issue try 11
wuzoo Dec 3, 2024
534c4ee
fix: preview resolve package issue try 12
wuzoo Dec 3, 2024
9c2809f
fix: preview resolve package issue try 13
wuzoo Dec 3, 2024
cef4e7d
fix: preview resolve package issue try 14
wuzoo Dec 3, 2024
df9aa9b
fix: preview resolve package issue try 15
wuzoo Dec 3, 2024
4024f4f
chore: resolve alias 적용, ui package exports 다시 세팅
wuzoo Dec 3, 2024
6fee654
chore: relative path 수정
wuzoo Dec 3, 2024
b4a8fdb
chore: icon build script 추가
wuzoo Dec 3, 2024
a4e2e25
chore: alias 제거
wuzoo Dec 3, 2024
c2a281a
chore: hoisting pattern 추가
wuzoo Dec 3, 2024
af9df14
docs: ui, icon build caching
wuzoo Dec 3, 2024
3d240cd
fix: version 오타 수정
wuzoo Dec 3, 2024
3831dd9
chore: node modules caching setting
wuzoo Dec 3, 2024
181df11
docs: storybook deploy workflow 수정
wuzoo Dec 3, 2024
85ac958
chore: 불필요 파일 제거 및 git ignore
wuzoo Dec 3, 2024
dfbc8b7
chore: next tsconfig 임시 설정
wuzoo Dec 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/client/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="ko">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/src/common/asset/svg/favicon.svg" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel='preload' href="/font/subset-PretendardVariable.woff2" />
<link rel='preload' href="/font/subset-PretendardVariable.woff" />
Expand Down
4 changes: 1 addition & 3 deletions apps/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,8 @@
"axios": "^1.7.2",
"framer-motion": "^11.11.11",
"mime": "^4.0.4",
"react-dom": "^18.3.1",
"react-hook-form": "^7.53.1",
"react-router-dom": "^6.24.1",
"zustand": "^5.0.0"
"react-router-dom": "^6.24.1"
},
"devDependencies": {
"@chromatic-com/storybook": "^1.6.1",
Expand Down
5 changes: 0 additions & 5 deletions apps/client/src/common/asset/svg/ic_add.svg

This file was deleted.

5 changes: 0 additions & 5 deletions apps/client/src/common/asset/svg/ic_avatar.svg

This file was deleted.

10 changes: 0 additions & 10 deletions apps/client/src/common/asset/svg/ic_global.svg

This file was deleted.

38 changes: 0 additions & 38 deletions apps/client/src/common/style/animation.ts

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { IcDefaultProfile } from '@tiki/icon';
import { Heading, Text } from '@tiki/ui';

import CachedImage from '@/common/component/CachedImage/CachedImage';

import {
containerStyle,
descriptionStyle,
detailStyle,
imageStyle,
} from '@/page/showcase/index/component/ClubProfileCard/ClubProfileCard.style';

import CachedImage from '@/shared/component/CachedImage/CachedImage';

interface ClubProfileCardProps {
title: string;
detail: string;
Expand Down
31 changes: 0 additions & 31 deletions apps/client/src/shared/component/CachedImage/CachedImage.tsx

This file was deleted.

41 changes: 36 additions & 5 deletions apps/client/src/shared/component/SideNavBar/Item/Item.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { IcAdd, IcGlobal } from '@tiki/icon';
import { Flex, ToolTip } from '@tiki/ui';
import { motion } from 'framer-motion';

Expand All @@ -11,13 +12,43 @@ import {
} from '@/shared/component/SideNavBar/Item/Item.style';

interface ItemProps extends HTMLAttributes<HTMLDivElement> {
hoverMessage: string;
logoUrl: string | null;
variant:
| {
type: 'add';
hoverMessage: string;
}
| {
type: 'dashboard';
hoverMessage: string;
}
| {
type: 'team';
logoUrl: string | null;
hoverMessage: string;
};
isClicked: boolean;
onLogoClick: () => void;
}

const Item = ({ logoUrl = '', isClicked, onLogoClick, hoverMessage, ...props }: ItemProps) => {
const getItemsInfo = (variant: Required<ItemProps['variant']>) => {
switch (variant?.type) {
case 'add': {
return <IcAdd width={16} height={16} />;
}
case 'dashboard': {
return <IcGlobal width={20} height={20} />;
}
case 'team': {
return variant.logoUrl ? (
<img src={variant.logoUrl} alt="팀 프로필 이미지" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

스크린 리더기가 이미 img 태그를 이미지로 인식하고 있기 때문에 alt 메시지에 -이미지 라는 워딩은 불필요하다고 합니다 ! 참고해서 수정해주심 좋을 것 같아요

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

좋습니다 !!

) : (
<span css={firstSpellStyle}>{variant.hoverMessage[0]}</span>
);
}
}
};

const Item = ({ variant, isClicked, onLogoClick, ...props }: ItemProps) => {
const [isHover, setIsHover] = useState(false);

const handleMouseEnter = () => {
Expand All @@ -39,7 +70,7 @@ const Item = ({ logoUrl = '', isClicked, onLogoClick, hoverMessage, ...props }:
{isClicked && (
<motion.div layoutId="snb_indicator" css={[pageIndicatorStyle(isClicked, isHover), indicatorStyle]} />
)}
<ToolTip message={hoverMessage} position="right" gap={0.8}>
<ToolTip message={variant.hoverMessage} position="right" gap={0.8}>
<div
role="button"
tabIndex={0}
Expand All @@ -48,7 +79,7 @@ const Item = ({ logoUrl = '', isClicked, onLogoClick, hoverMessage, ...props }:
onKeyDown={handleEnterKeyDown}
onMouseEnter={handleMouseEnter}
onMouseLeave={handleMouseLeave}>
{logoUrl ? <img src={logoUrl} alt="버튼 아이콘" /> : <span css={firstSpellStyle}>{hoverMessage[0]}</span>}
{getItemsInfo(variant)}
</div>
</ToolTip>
</Flex>
Expand Down
17 changes: 5 additions & 12 deletions apps/client/src/shared/component/SideNavBar/SideNavBar.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
import { IcTikiLogo } from '@tiki/icon';
import { IcAvatar, IcTikiLogo } from '@tiki/icon';
import { Divider, Flex, ToolTip, theme } from '@tiki/ui';

import { useState } from 'react';
import { useNavigate } from 'react-router-dom';

import addUrl from '@/common/asset/svg/ic_add.svg';
import avatarUrl from '@/common/asset/svg/ic_avatar.svg';
import globalUrl from '@/common/asset/svg/ic_global.svg';

import Item from '@/shared/component/SideNavBar/Item/Item';
import { containerStyle, settingStyle, tikiLogoStyle } from '@/shared/component/SideNavBar/SideNavBar.style';
import { PATH } from '@/shared/constant/path';
Expand Down Expand Up @@ -45,28 +41,25 @@ const SideNavBar = () => {
<IcTikiLogo css={tikiLogoStyle} />
<Flex tag="ul" styles={{ direction: 'column', align: 'center' }}>
<Item
logoUrl={globalUrl}
variant={{ type: 'dashboard', hoverMessage: 'showcase' }}
isClicked={selectedId === 'showcase'}
onLogoClick={() => handleItemClick('showcase', PATH.SHOWCASE)}
hoverMessage={'showcase'}
/>
<Divider type="horizontal" size={56.78} color={theme.colors.gray_300} />
{data?.belongTeamGetResponses.map((data: Team) => {
return (
<Item
key={data.id}
isClicked={selectedId === String(data.id)}
logoUrl={data.iconImageUrl}
variant={{ type: 'team', logoUrl: data.iconImageUrl, hoverMessage: data.name }}
onLogoClick={() => handleItemClick(String(data.id), `${PATH.DASHBOARD}?teamId=${data.id}`)}
hoverMessage={data.name}
/>
);
})}
<Item
logoUrl={addUrl}
variant={{ type: 'add', hoverMessage: '새로운 워크스페이스 생성' }}
isClicked={false}
onLogoClick={handleWorkspaceClick}
hoverMessage={'새로운 워크스페이스 생성'}
/>
<Flex css={settingStyle}>
<ToolTip message={'내 정보 수정하기'} position="right" gap={0.8}>
Expand All @@ -79,7 +72,7 @@ const SideNavBar = () => {
onKeyDown={() => {
alert('현재 준비중인 기능입니다.');
}}>
<img src={avatarUrl} alt="버튼 아이콘" />
<IcAvatar width={32} height={32} />
</div>
</ToolTip>
</Flex>
Expand Down
28 changes: 11 additions & 17 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.