Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
55241bf
chore: 패키지 이름 수정
hongggyelim Mar 11, 2025
8da8e2d
d.ts 파일 추가
hongggyelim Mar 11, 2025
a58d705
chore: 바닐라 익스트랙트 설치
hongggyelim Mar 11, 2025
1789b2e
feat: 스토리북 vanilla extract 적용
hongggyelim Mar 11, 2025
a6c974f
chore: 색상 변수 추가
hongggyelim Mar 11, 2025
bb908e1
feat: 유틸리티 타입 추가
hongggyelim Mar 11, 2025
7714904
chore: 스타일 정의
hongggyelim Mar 11, 2025
cfc8bca
feat: globalcss 적용(스토리북만)
hongggyelim Mar 12, 2025
8e1f00d
feat: 이미지 파일 선택 시 프리뷰 추가
hongggyelim Mar 12, 2025
5f32be9
feat: 프리뷰 삭제 기능 추가
hongggyelim Mar 12, 2025
73994f2
chore: 사진 등록 로직 일부 수정
hongggyelim Mar 12, 2025
35bc846
feat: 프리뷰 dnd
hongggyelim Mar 12, 2025
b80b419
fix: 파일 개수 선택 제한 수정
hongggyelim Mar 12, 2025
43353aa
chore: img 드래그 방지
hongggyelim Mar 12, 2025
e75107c
feat: 파일 드래그 업로드
hongggyelim Mar 12, 2025
7b6d916
feat: PR에서 크로매틱 배포
hongggyelim Mar 12, 2025
ee79de2
fix: storybook build script수정
hongggyelim Mar 12, 2025
ca16f42
fix: main.ts에 globalcss 삭제
hongggyelim Mar 12, 2025
37bee12
feat: yaml 수정 깃헙봇추가
hongggyelim Mar 12, 2025
a3153a0
chore: yml 원복
hongggyelim Mar 12, 2025
9148b04
feat: yml 수정
hongggyelim Mar 12, 2025
4eef9df
chore: 오타 수정 및 불필요한 스토리 삭제
hongggyelim Mar 12, 2025
23c762c
fix: PR 리뷰 반영
hongggyelim Mar 13, 2025
c40225d
delete: package/ui eslint.config.js 삭제
hongggyelim Mar 13, 2025
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
35 changes: 31 additions & 4 deletions .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
name: 'storybook Chromatic 배포'
name: "storybook Chromatic 배포"

on:
pull_request:
branches:
- main
push:
branches:
- main # 메인 브랜치에 푸시될 때 실행
paths:
- 'apps/storybook/**'
- "apps/storybook/**"

jobs:
storybook-deploy:
storybook-preview:
runs-on: ubuntu-latest
defaults:
run:
Expand Down Expand Up @@ -41,5 +44,29 @@ jobs:
with:
projectToken: ${{ secrets.CHROMATIC_TOKEN }}
onlyChanged: true
autoAcceptChanges: true
externals: apps/**
workingDir: apps/storybook
workingDir: apps/storybook

- name: 현재 시간 가져오기
uses: josStorer/get-current-time@v2
id: current-time
with:
format: "YYYY년 MM월 DD일 HH시 mm분 ss초"
utcOffset: "+09:00"

outputs:
storybook_url: ${{ steps.chromatic.outputs.storybookUrl }}
current_time: ${{ steps.current-time.outputs.formattedTime }}

github-bot-storybook:
runs-on: ubuntu-latest
needs: [storybook-preview]
steps:
- name: PR 코멘트 남기기
uses: thollander/actions-comment-pull-request@v2
with:
comment_tag: ${{github.event.number}}-storybook
message: |
💄 Storybook: ${{ needs.storybook-preview.outputs.storybook_url }}
🕖 Update: ${{ needs.storybook-preview.outputs.current_time }}
2 changes: 1 addition & 1 deletion apps/admin/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "admin",
"name": "@date-project/admin",
"version": "0.2.0",
"private": true,
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions apps/admin/src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { Metadata } from "next";
import { Geist, Geist_Mono } from "next/font/google";
import "./globals.css";
// import "@repo/ui/src/globalStyle/global.css.ts";
Copy link
Collaborator

Choose a reason for hiding this comment

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

이거 없어도 되는건가? 아니면 금욜에 추가하려는거?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

추가할건데 alias 안되서 우선 주석처리 해놨음!


const geistSans = Geist({
variable: "--font-geist-sans",
Expand Down
2 changes: 2 additions & 0 deletions apps/storybook/.storybook/addons.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import "@storybook/addon-actions/register";
import "@storybook/addon-links/register";
10 changes: 10 additions & 0 deletions apps/storybook/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { StorybookConfig } from "@storybook/react-vite";
import { vanillaExtractPlugin } from "@vanilla-extract/vite-plugin";

const config: StorybookConfig = {
stories: ["../../../packages/ui/src/**/*.stories.@(js|jsx|ts|tsx)"],
Expand All @@ -18,6 +19,15 @@ const config: StorybookConfig = {
docs: {
autodocs: true,
},
async viteFinal(config) {
config.plugins = config.plugins || [];
config.plugins.push(
vanillaExtractPlugin({
identifiers: ({ hash }) => `_${hash}`,
Copy link
Collaborator

Choose a reason for hiding this comment

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

이거 추가하면 어떻게 바뀌는거지?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

스토리북에서 바닐라 익스트랙트 사용하기 위해 추가했으

Copy link
Collaborator

Choose a reason for hiding this comment

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

indetifiers 요거 저거 어디에 쓰는지 궁금해서 저거없어도 돌아가긴 하거든

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

https://vanilla-extract.style/documentation/integrations/vite/#identifiers
음 지정안해도 기본값 설정이 있다고는 하네

}),
);
return config;
},
};

export default config;
9 changes: 5 additions & 4 deletions apps/storybook/.storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import type { Preview } from '@storybook/react'
import type { Preview } from "@storybook/react";
import "../../../packages/ui/src/globalStyle/global.css"; // alias 설정해도 안됨

const preview: Preview = {
parameters: {
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i,
color: /(background|color)$/i,
date: /Date$/i,
},
},
},
};

export default preview;
export default preview;
11 changes: 7 additions & 4 deletions apps/storybook/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "storybook",
"name": "@date-project/storybook",
"version": "0.2.0",
"private": true,
"scripts": {
Expand All @@ -12,23 +12,26 @@
},
"devDependencies": {
"@chromatic-com/storybook": "3.2.5",
"@storybook/addon-actions": "^8.6.4",
"@storybook/addon-essentials": "8.6.4",
"@storybook/addon-interactions": "8.6.4",
"@storybook/addon-links": "8.6.4",
"@storybook/addon-links": "^8.6.4",
"@storybook/blocks": "8.6.4",
"@storybook/core-common": "8.6.4",
"@storybook/manager-api": "8.6.4",
"@storybook/preview-api": "^8.3.3",
"@storybook/react": "8.6.4",
"@storybook/react": "^8.6.4",
"@storybook/react-vite": "8.6.4",
"@storybook/theming": "8.6.4",
"@types/node": "^20",
"@types/react": "^19",
"@types/react-dom": "^19",
"@vanilla-extract/vite-plugin": "^5.0.1",
"@vitejs/plugin-react-swc": "^3.8.0",
"@repo/ui": "workspace:*",
"chromatic": "^11.27.0",
"postcss": "^8",
"storybook": "0.2.0",
"storybook": "8.6.4",
"typescript": "^5",
"vite": "^6.2.1"
}
Expand Down
19 changes: 19 additions & 0 deletions apps/storybook/stories/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import React from "react";

import { storiesOf } from "@storybook/react";
import { action } from "@storybook/addon-actions";
import { linkTo } from "@storybook/addon-links";

import { Button, Welcome } from "@storybook/react/demo";

storiesOf("Welcome", module).add("to Storybook", () => (
<Welcome showApp={linkTo("Button")} />
));

storiesOf("Button", module)
.add("with text", () => (
<Button onClick={action("clicked")}>Hello Button</Button>
))
.add("with some emoji", () => (
<Button onClick={action("clicked")}>😀 😎 👍 💯</Button>
));
4 changes: 3 additions & 1 deletion apps/storybook/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"baseUrl": ".", // alias 기준 설정
"paths": {
"@/*": ["./src/*"]
"@/*": ["./src/*"],
"@repo/ui/*": ["../../../packages/ui/*"] // alias 설정
Copy link
Collaborator

Choose a reason for hiding this comment

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

이것도 삭제

}
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
Expand Down
7 changes: 7 additions & 0 deletions apps/storybook/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
import react from "@vitejs/plugin-react-swc";
import path from "path";
import { defineConfig } from "vite";

// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
// alias 설정 추가
resolve: {
alias: {
"@repo/ui": path.resolve(__dirname, "../../../packages/ui"),
},
},
Comment on lines +8 to +13
Copy link
Collaborator

Choose a reason for hiding this comment

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

이것도 삭제

});
2 changes: 1 addition & 1 deletion apps/user/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "user",
"name": "@date-project/user",
"version": "0.2.0",
"private": true,
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions apps/user/src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { Metadata } from "next";
import { Geist, Geist_Mono } from "next/font/google";
import "./globals.css";
// import "@repo/ui/src/globalStyle/global.css";

const geistSans = Geist({
variable: "--font-geist-sans",
Expand Down
168 changes: 0 additions & 168 deletions apps/user/src/app/page.module.css

This file was deleted.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,8 @@
"*.{json,css,md}": [
"prettier --write"
]
},
"dependencies": {
"zustand": "^5.0.3"
}
}
2 changes: 2 additions & 0 deletions packages/eslint-config/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ export const config = [
"turbo/no-undeclared-env-vars": "warn",
"prettier/prettier": "warn",
"react/button-has-type": "error",
"prefer-const": "off",
"@typescript-eslint/consistent-type-imports": "error",
},
},
{
Expand Down
Binary file added packages/ui/assets/addImage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added packages/ui/assets/imageFile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading