-
Notifications
You must be signed in to change notification settings - Fork 6
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: 콜렉션 상세페이지 및 폴더 이름 변경, 삭제 기능 개발 #260
Merged
ParkSohyunee
merged 20 commits into
8-Sprinters:dev
from
ParkSohyunee:feature/collection-detail-page
Oct 27, 2024
Merged
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
696a116
Rename: 콜렉션 상세페이지 Ver2.0 파일 구분을 위해 이름 수정
ParkSohyunee 81e1dde
Feat: 콜렉션 폴더 Link 태그로 변경 및 href 설정
ParkSohyunee c4e1774
Feat: 콜렉션 리스트조회 API 연동 및 폴더 상세페이지 레이아웃 구현
ParkSohyunee 2d5defa
Design: 콜렉션 상세페이지 퍼블리싱
ParkSohyunee 0c9a5a4
Design: 배경이미지 유무에 따른 스타일 variants 적용
ParkSohyunee 4e93d94
Feat: Header 수정버튼 클릭시 공통 BottomSheet 나오도록 적용
ParkSohyunee a036988
Refactor: BottomSheet 컴포넌트 Compound Component 패턴으로 리팩토링
ParkSohyunee ba2e859
Fix: unauthorized 에러일때 로그인 모달 대신 토스트 메세지로 변경
ParkSohyunee 293dd41
Feat: 폴더 이름 수정하기 기능 구현
ParkSohyunee f34e116
Feat: BottomSheet Button 이름을 children으로 받도록 수정 및 삭제일때 폰트색상 수정
ParkSohyunee 506f30b
Feat: 폴더 삭제하기 기능 구현
ParkSohyunee c70188f
Feat: 폴더페이지에서 뒤로가기 클릭시 경로 수정
ParkSohyunee 1c90379
Fix: 폴더 콜렉션 리스트 배경이미지 url 값 수정
ParkSohyunee fcc6738
Design: 콜렉션 페이지 스타일 수정
ParkSohyunee 0abbd6e
Chore: 빌드 에러 수정 (기존 폴더 rename으로 인한 import 경로 오류)
ParkSohyunee 9a135bd
Design: (코드리뷰 반영) 콜렉션 리스트 스타일 수정
ParkSohyunee 50d4ea7
Refactor: 콜렉션 심플 리스트 공통 컴포넌트로 리팩토링
ParkSohyunee 5e23041
Rename: BottomSheet 컴포넌트 Ver3.0 공통컴포넌트로 분리
ParkSohyunee d8d77fc
Refactor: BottomSheet 컴포넌트에 Content 부분 추가
ParkSohyunee 49abc5e
Refactor: BottomSheet 컴포넌트 버튼 children prop 타입 수정
ParkSohyunee File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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,113 @@ | ||
import { createVar, style, styleVariants } from '@vanilla-extract/css'; | ||
import { vars } from '@/styles/theme.css'; | ||
import { Label, LabelSmall } from '@/styles/font.css'; | ||
|
||
export const imageUrl = createVar(); | ||
|
||
export const container = style({ | ||
padding: '2.4rem 1.6rem', | ||
display: 'grid', | ||
gridTemplateColumns: '1fr 1fr', | ||
gridTemplateRows: 'max-content', | ||
gridGap: 12, | ||
alignContent: 'flex-start', | ||
justifyItems: 'center', | ||
backgroundColor: vars.color.bggray, | ||
}); | ||
|
||
const content = style({ | ||
width: 173, | ||
height: 173, | ||
display: 'flex', | ||
flexDirection: 'column', | ||
justifyContent: 'center', | ||
alignItems: 'center', | ||
|
||
backgroundImage: imageUrl, | ||
backgroundPosition: 'center', | ||
backgroundColor: vars.color.white, | ||
}); | ||
|
||
export const contentVariant = styleVariants({ | ||
round: [content, { borderRadius: '100%' }], | ||
square: [content, { borderRadius: 20 }], | ||
}); | ||
|
||
export const category = style([ | ||
LabelSmall, | ||
{ | ||
padding: '2px 6px', | ||
backgroundColor: vars.color.blue, | ||
borderRadius: 20, | ||
color: vars.color.white, | ||
}, | ||
]); | ||
|
||
export const info = style({ | ||
paddingTop: '0.6rem', | ||
paddingBottom: '0.5rem', | ||
display: 'flex', | ||
flexDirection: 'column', | ||
alignItems: 'center', | ||
gap: 4, | ||
}); | ||
|
||
// 배경이미지 유무에 따른 스타일 variants | ||
const fontColor = { | ||
white: vars.color.white, | ||
black: vars.color.black, | ||
}; | ||
|
||
export const title = styleVariants(fontColor, (color) => [ | ||
Label, | ||
{ | ||
color, | ||
fontWeight: 600, | ||
}, | ||
]); | ||
|
||
export const owner = styleVariants(fontColor, (color) => [ | ||
LabelSmall, | ||
{ | ||
color, | ||
fontWeight: 400, | ||
}, | ||
]); | ||
|
||
export const items = style({ | ||
display: 'flex', | ||
flexDirection: 'column', | ||
alignItems: 'center', | ||
gap: 5, | ||
}); | ||
|
||
const item = style({ | ||
padding: '0.45rem 0.62rem', | ||
borderRadius: 18, | ||
display: 'flex', | ||
gap: 2, | ||
alignItems: 'center', | ||
}); | ||
|
||
export const itemVariant = styleVariants({ | ||
white: [ | ||
item, | ||
{ | ||
backgroundColor: '#F5FAFF', | ||
color: vars.color.blue, | ||
}, | ||
], | ||
blue: [ | ||
item, | ||
{ | ||
backgroundColor: 'rgba(245, 250, 255, 0.30)', | ||
color: vars.color.white, | ||
}, | ||
], | ||
}); | ||
|
||
export const date = styleVariants(fontColor, (color) => ({ | ||
paddingTop: '0.8rem', | ||
fontSize: '0.9rem', | ||
color, | ||
})); |
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,42 @@ | ||
import Link from 'next/link'; | ||
import { assignInlineVars } from '@vanilla-extract/dynamic'; | ||
|
||
import * as styles from './ShapeSimpleList.css'; | ||
|
||
import formatDate from '@/lib/utils/dateFormat'; | ||
import { CollectionListType } from '@/lib/types/listType'; | ||
|
||
interface ShapeSimpleListProps { | ||
list: CollectionListType; | ||
hasImage: boolean; | ||
} | ||
|
||
export default function ShapeSimpleList({ list, hasImage }: ShapeSimpleListProps) { | ||
return ( | ||
<Link | ||
href={`/list/${list.id}`} | ||
className={styles.contentVariant[hasImage ? 'round' : 'square']} | ||
style={assignInlineVars({ | ||
[styles.imageUrl]: `url(${hasImage ? list.representativeImageUrl : ''})`, | ||
})} | ||
> | ||
<div className={styles.category}>{list.category}</div> | ||
<div className={styles.info}> | ||
<h3 className={styles.title[hasImage ? 'white' : 'black']}>{list.title}</h3> | ||
<p className={styles.owner[hasImage ? 'white' : 'black']}>{list.ownerNickname}</p> | ||
</div> | ||
<ul className={styles.items}> | ||
{list.listItems.map((item) => ( | ||
<li key={item.id} className={styles.itemVariant[hasImage ? 'blue' : 'white']}> | ||
<span> | ||
{item.rank} | ||
{`.`} | ||
</span> | ||
<span>{item.title}</span> | ||
</li> | ||
))} | ||
</ul> | ||
<p className={styles.date[hasImage ? 'white' : 'black']}>{formatDate(list.updatedDate)}</p> | ||
</Link> | ||
); | ||
} | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kanglocal 현지님, 콜렉션 리스트 및 검색페이지에서도 사용하는 Simple리스트를 ShapeSimpleList 공통 컴포넌트로 만들어 두었습니다. 검색페이지 작업하실 때 참고 부탁드립니다~!!