-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat #70 : 사이드바 제목(프로젝트 종합평가) 제거 => 아코디언 메뉴로 전환 * feat #70 : 사이드바의 아코디언 토글버튼 애니메이션 분리 후, 해당 props로 주입되는 버튼에 위임 * feat #70 : 아코디언 버튼 애니메이션 로직 분리, props로 주입하는 버튼에 위임 * refactor #70 : 사이드바및 아코디언에 사용되는 컴포넌트,props명을 도메인에 독립적인 이름으로 수정 * feat #70 : 아코디언 트리거, 컨텐트 버튼 색상 효과 적용 * feat #70 : 아코디언 내부 로직 수정 * refactor #70 : 재사용되는 범위를 제외한 Accordion.Item을 독립적인 컴포넌트로 분리 * feat #70 : 사이드바 선택 값 Context로 분리 및 불필요한 파일 삭제 * feat #70 : 세부 디자인 디테일 수정 * feat #70 : 로고 적용 * fix #70 : 사이드바가 닫힐 때 일부 UI가 보이는 문제 수정 * feat #70 : 사이드바가 닫힐 때 스크롤 영역에도 같은 애니메이션 적용 * test #70 : 토스트 스토리 파일명 공백 제거 * test #70 : 버튼 스토리 파일 위치 이동 * feat #70 : 변경된 피그마 상세 디자인 적용 * refactor #70 : props명 컨벤션에 맞게 수정 * test #70 : 사이드바 스토리 생성 * refactor #70 : 아이콘 컴포넌트 색상 적용 로직 수정 * feat #70 : 사이드바 열림 버튼 색상 및 위치 수정 * refactor #70 : 아코디언 버튼의 render props 옵셔널 타입 제거 * fix #70 : 사이드바가 닫혔을 때, 열리는 토글 버튼의 위치에 스크롤에 종속되는 문제 수정
- Loading branch information
Showing
35 changed files
with
5,198 additions
and
1,993 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions
4
...mmon/components/button/button.stories.tsx → src/common/stories/button.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { ThemeProvider } from '@emotion/react'; | ||
import { Meta, StoryObj } from '@storybook/react'; | ||
|
||
import { theme } from '@/assets/styles/theme'; | ||
import SelectedPageProvider from '@/features/total-evaluation/components/context/selected-page/selected-page-provider'; | ||
import SidebarProvider from '@/features/total-evaluation/components/context/sidebar/sidebar-provider'; | ||
import FeedbackSidebar from '@/features/total-evaluation/components/feedback-sidebar/feedback-sidebar'; | ||
|
||
const meta: Meta<typeof FeedbackSidebar> = { | ||
title: 'Components/FeedbackSidebar', | ||
component: FeedbackSidebar, | ||
}; | ||
|
||
export default meta; | ||
|
||
type Story = StoryObj<typeof FeedbackSidebar>; | ||
|
||
export const Default: Story = () => ( | ||
<SidebarProvider> | ||
<SelectedPageProvider> | ||
<ThemeProvider theme={theme}> | ||
<FeedbackSidebar /> | ||
</ThemeProvider> | ||
</SelectedPageProvider> | ||
</SidebarProvider> | ||
); | ||
|
||
Default.args = {}; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
src/features/total-evaluation/components/accordion-list/feedback-contents.styles.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import { css } from '@emotion/react'; | ||
|
||
export const container = css` | ||
margin-bottom: 0.8rem; | ||
font-size: 1.4rem; | ||
line-height: 1.68rem; | ||
`; | ||
|
||
export const wrapper = css` | ||
margin-top: 0.4rem; | ||
border-left: 0.2rem solid lightgray; | ||
margin-left: 2rem; | ||
padding-left: 1rem; | ||
display: flex; | ||
flex-direction: column; | ||
gap: 0.8rem; | ||
`; | ||
|
||
export const defaultAnimation = css` | ||
overflow: hidden; | ||
&[data-state='open'] { | ||
animation: slide-down 300ms ease-out; | ||
} | ||
&[data-state='closed'] { | ||
animation: slide-up 300ms ease-out; | ||
} | ||
@keyframes slide-down { | ||
from { | ||
max-height: 0; | ||
} | ||
to { | ||
max-height: var(--radix-accordion-content-height); | ||
} | ||
} | ||
@keyframes slide-up { | ||
from { | ||
max-height: var(--radix-accordion-content-height); | ||
} | ||
to { | ||
max-height: 0; | ||
} | ||
} | ||
`; |
43 changes: 43 additions & 0 deletions
43
src/features/total-evaluation/components/accordion-list/feedback-contents.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import * as Accordion from '@radix-ui/react-accordion'; | ||
|
||
import { | ||
RenderAccordionContentButtonType, | ||
RenderAccordionTriggerButtonType, | ||
} from '../../types/sidebar-Info-types'; | ||
|
||
import * as styles from './feedback-contents.styles'; | ||
|
||
type EvalutationDataType = { | ||
projectTitle: string; | ||
feedbackPages: string[]; | ||
}; | ||
|
||
interface AccordionItemProps { | ||
dataList: EvalutationDataType[]; | ||
renderTriggerButton: RenderAccordionTriggerButtonType; | ||
renderContentButton: RenderAccordionContentButtonType; | ||
} | ||
|
||
function FeedbackContents({ | ||
dataList, | ||
renderContentButton, | ||
renderTriggerButton, | ||
}: AccordionItemProps) { | ||
return dataList.map(({ projectTitle, feedbackPages }) => ( | ||
<Accordion.Item key={projectTitle} value={projectTitle} css={styles.container}> | ||
<Accordion.Header> | ||
<Accordion.Trigger asChild>{renderTriggerButton(projectTitle)}</Accordion.Trigger> | ||
</Accordion.Header> | ||
|
||
<Accordion.Content css={styles.defaultAnimation}> | ||
<div css={styles.wrapper}> | ||
{feedbackPages.map((page, buttonIndex) => ( | ||
<div key={page}>{renderContentButton(page, buttonIndex)}</div> | ||
))} | ||
</div> | ||
</Accordion.Content> | ||
</Accordion.Item> | ||
)); | ||
} | ||
|
||
export default FeedbackContents; |
105 changes: 0 additions & 105 deletions
105
src/features/total-evaluation/components/accordion-list/single-accordion-item.styles.ts
This file was deleted.
Oops, something went wrong.
59 changes: 0 additions & 59 deletions
59
src/features/total-evaluation/components/accordion-list/single-accordion-item.tsx
This file was deleted.
Oops, something went wrong.
11 changes: 11 additions & 0 deletions
11
src/features/total-evaluation/components/context/selected-page/selected-page-context.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { createContext, Dispatch, SetStateAction } from 'react'; | ||
|
||
interface SelectedPageContextProps { | ||
selectedPage: string | null; | ||
setSelectedPage: Dispatch<SetStateAction<string | null>>; | ||
} | ||
|
||
export const SelectedPageContext = createContext<SelectedPageContextProps>({ | ||
selectedPage: null, | ||
setSelectedPage: () => {}, | ||
}); |
Oops, something went wrong.