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

[SP2] 메인페이지 뒤집히는 카드 효과 만들기 #294

Merged
merged 7 commits into from
Dec 10, 2023

Conversation

SeojinSeojin
Copy link
Member

@SeojinSeojin SeojinSeojin commented Nov 24, 2023

Summary

메인페이지에 뒤집히는 카드 효과를 제작합니다.

Screenshot

flip card

Comment

추후에 해야 하는 작업

  • 모바일 사이즈 대응
  • 사진 교체 (border-radius 없는 사진을 받으면 교체하겠습니다!)

다른 카드들도 일단 이런 식으로만 작업한 후에 -> 전체 레이아웃 관한 작업하면 어떨까 싶은데 어떠신가요?

@SeojinSeojin SeojinSeojin requested review from solar3070 and f0rever0 and removed request for solar3070 November 24, 2023 12:08
@SeojinSeojin SeojinSeojin self-assigned this Nov 24, 2023
Copy link
Contributor

@f0rever0 f0rever0 left a comment

Choose a reason for hiding this comment

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

고생하셨습니당~!
말씀해주신 내용에 동의합니다!
전에 회의했던데로 일단 반응형이 나오기 전까지 데탑 버전만 작업해서 합치고 레이아웃 작업을 하면 될 것 같아요!
저희 사진은 피그마 사진이 픽스된 것이 아닌가요?!

backContent: React.ReactNode;
};

function FlippableCard({ frontContent, backContent }: FlippableCardProps) {
Copy link
Contributor

Choose a reason for hiding this comment

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

export default function FlippableCard; 컨벤션으로 수정 부탁드려요!

Copy link
Member Author

Choose a reason for hiding this comment

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

감사합니다!!!

return (
<S.Wrapper>
{OWN_ORGANIZATION_LIST.map((organization) => (
<OwnOrganizationCard key={organization.nameEng} {...organization} />
Copy link
Contributor

Choose a reason for hiding this comment

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

{...organization} 이렇게 풀면은 OwnOrganizationCardProps 값들이 nameKor(nameKor={nameKor}에서 nameKor가 같은 단어라서 생략?) 이런식으로 바로 넘겨지는 건가요?!
코드가 깔끔하네요!!

Copy link
Member Author

Choose a reason for hiding this comment

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

아마 이것이 계속 새 객체를 생성한다는 논란이 있었던 것 같은데 일단 이렇게 하였습니다 ..!!!!


export default function OwnOrganizationCard(props: OwnOrganizationCardProps) {
return (
<FlippableCard
Copy link
Contributor

Choose a reason for hiding this comment

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

FlippableCard를 main의 내부의 컴포넌트가 아니라 공통 컴포넌트로 분리한 이유가 무엇인가요?

제가, 작업한 코드 구조를 폴더화 했다면
OwnOragnization/FilppableCard/FrontContent , OwnOragnization/FilppableCard/BackContent 이렇게 폴더구조로 짜서 FilppableCard에서 FrontContent, BackContent 컴포넌트를 불러왔을 것 같아요!
그래서 이유가 궁금합니다!!

Copy link
Member Author

Choose a reason for hiding this comment

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

혹시 다른 페이지에서도 FlippableCard를 쓰고 싶을 까봐 입니다 ..!!
그래서 prop으로 받는 값도 최대한 단순하게 해두었어용

);
}

export default function OwnOrganizationCard(props: OwnOrganizationCardProps) {
Copy link
Contributor

Choose a reason for hiding this comment

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

props 전개하는 코드로 수정해야할 것 같아요!

Copy link
Member Author

Choose a reason for hiding this comment

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

감사합니다!!!!

backSideBg: string;
};

function Footer(props: Pick<OwnOrganizationCardProps, 'nameKor' | 'nameEng'>) {
Copy link
Contributor

Choose a reason for hiding this comment

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

props 전개하는 코드로 수정해야할 것 같아요!

Copy link
Member Author

Choose a reason for hiding this comment

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

감사합니다!!!!

@SeojinSeojin
Copy link
Member Author

저희 사진은 피그마 사진이 픽스된 것이 아닌가요?!

피그마 사진이 픽스되었으나 border-radius 없는걸로 쓰고 싶어서 요청을 해둔 상태입니다!!

Copy link
Member

@solar3070 solar3070 left a comment

Choose a reason for hiding this comment

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

모바일의 경우에는 재클릭했을 때 다시 뒤집히도록 하면 좋을 것 같네요!!

수고 많으셨습니다~! 👍👍

Comment on lines 19 to 24
color: ${colors.white};
border: 1px solid rgba(255, 255, 255, 0.5);
background: rgba(117, 97, 79, 0.33);
backdrop-filter: blur(2.949289321899414px);
border-radius: 14px;
color: #fff;
Copy link
Member

Choose a reason for hiding this comment

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

color가 중복되어 있습니다!

Copy link
Member Author

Choose a reason for hiding this comment

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

꼼꼼히 봐주셔서 감사합니다!!!

Comment on lines +5 to +8
type FlippableCardProps = {
frontContent: React.ReactNode;
backContent: React.ReactNode;
};
Copy link
Member

Choose a reason for hiding this comment

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

저희 Props 정의할 때 type, interface도 통일하면 좋을 것 같네요!

backContent: React.ReactNode;
};

const useFlippableCard = () => {
Copy link
Member Author

Choose a reason for hiding this comment

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

@solar3070
이런 식으로 훅으로 빼서, desktop이 아니면 다 click으로 작동하도록 하였습니다!!!

Copy link
Member

Choose a reason for hiding this comment

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

앗 아뇨 한 번 클릭해서 뒤집은 후에 다시 클릭하면 앞면으로 돌아오면 좋을 것 같아서요..!

Copy link
Member Author

Choose a reason for hiding this comment

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

toggle 로 넣어줘서 다시 클릭하면 앞면으로 뒤집힙니다..!!

Copy link
Member

@solar3070 solar3070 Dec 5, 2023

Choose a reason for hiding this comment

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

아아 코드 수정하셨군요!! 위 커밋을 놓쳤네요.. 확인했습니다!!!

@SeojinSeojin
Copy link
Member Author

12/8 작업이 덜 된 부분

  • 1440px부터 유사 정사각형 모양이 되는데, 이 때 등장하는 이미지가 달라야 함

Comment on lines +23 to +26
@media (max-width: 768px) {
width: max(416px, min(100vw - 200px, 512px));
height: calc(max(432px, min(100vw - 200px, 512px)) * 0.84);
}
Copy link
Member Author

Choose a reason for hiding this comment

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

내맘대로 디자인 ..........
시험끝난후 그린언니와 진중한 대화가 필요합니다..

@SeojinSeojin
Copy link
Member Author

SeojinSeojin commented Dec 8, 2023

@f0rever0 @solar3070 일단 (피그마 상의) 작업은 모두 하였고, 레이아웃 세밀한 조정은 추후에 그리드 속에 폭 넣어진 후에 해야 할 듯합니다..!!

@f0rever0
Copy link
Contributor

f0rever0 commented Dec 8, 2023

알겠습니다! 세심한 디자인은 레이아웃에 넣고 해야할 것 같네요!! 고생하셨어요~!!

@f0rever0 f0rever0 merged commit 3792f7e into develop Dec 10, 2023
1 check passed
@f0rever0 f0rever0 deleted the feat/#293_main-flip-card branch December 10, 2023 05:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants