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

design : Activities 페이지(seminar,challenge,community) 퍼블리싱 및 개발 #12

Open
wants to merge 13 commits into
base: dev
Choose a base branch
from

Conversation

JjungminLee
Copy link
Member

@JjungminLee JjungminLee commented Feb 1, 2025

1️⃣ 어떤 작업을 했나요? (Summary)

제가 탭으로 구성해서.. 하나의 브랜치에서 할수 밖에 없더라구요..ㅠ_ㅠ 원래 이슈별로 따로 브랜치를 파고 진행했어야했는데 빨리 작업을 끝내야할 것 같아 이렇게 된 점 정말 죄송합니다 ㅠ_ㅠ (머리 100번 조아리는중)

기존 코드에 영향을 미치지 않는 변경사항

  • x 하지만 밑에 알아두시면 좋아요 쪽 봐주시면 감사하겠습니다 :)

기존 코드에 영향을 미치는 변경사항

  • @sna0e 님과 색상 conflict가 있을것 같은데..! 어떻게 생각하시는지 궁금합니다.

버그 픽스

x

2️⃣ 알아두시면 좋아요!

Seminar 탭

  • [TabBar]
    라우팅이 되는것이 아닌 single page에서 화면이 바뀌어야 하기에 context-api를 통해 작업했습니다.
    components/TabBar에서 관련코드를 확인하실 수 있습니다.
  • [캐러셀]
    디자이너님께 추후 확인 후 작업할 예정입니다.
    -> 캐러셀이 맞는거 같은데 관련 데이터들을 추린 후 재작업 할 예정입니다
KakaoTalk_Video_2025-02-02-09-01-58.mp4

Challnege탭

  • 메인 이미지가 깨지는 감이 있어 이건 디자이너님과 조율후 교체할것 같습니다!
KakaoTalk_Video_2025-02-02-10-00-32.mp4

Community 탭

3️⃣ 추후 작업

[Seminar]

  • 세미나 데이터 받는대로 케러셀 작업을 할 예정입니다.
    [Challenge]
  • 프로젝트 탭에 데이터들을 받아서 적재할 예정입니다.
    [Community]
  • 커뮤니티에 들어갈 이미지들을 받고, 데이터를 적재할 예정입니다

4️⃣ 체크리스트 (Checklist)

  • main 브랜치의 최신 코드를 pull 받았나요?

@JjungminLee JjungminLee self-assigned this Feb 1, 2025
@JjungminLee JjungminLee requested review from sna0e and DevDAN09 February 1, 2025 23:16
@JjungminLee JjungminLee linked an issue Feb 1, 2025 that may be closed by this pull request
2 tasks
@JjungminLee JjungminLee changed the title [Design] Design/#4 seminar design : seminar 페이지 퍼블리싱 및 개발 Feb 1, 2025
@JjungminLee JjungminLee changed the title design : seminar 페이지 퍼블리싱 및 개발 design : Activities 페이지(seminar,challenge,community) 퍼블리싱 및 개발 Feb 2, 2025
@JjungminLee JjungminLee linked an issue Feb 2, 2025 that may be closed by this pull request
2 tasks
@JjungminLee JjungminLee linked an issue Feb 2, 2025 that may be closed by this pull request
2 tasks
@sna0e
Copy link

sna0e commented Feb 2, 2025

확인했습니다!! 수고 많으셨어요 ㅠㅠㅠ

저도 conflict 걱정했는데, 제가 tailwind.config 와 constant/color 만 수정하고 제 UI 에는 적용을 안 해놓은 상황이라, 정민님꺼로 덮어쓰는 게 더 효율적일 거 같아요!!
제 pr 먼저 merge 하고 정민님꺼 그 다음에 해주시는 거로 하면 어떨까요~?

@JjungminLee
Copy link
Member Author

확인했습니다!! 수고 많으셨어요 ㅠㅠㅠ

저도 conflict 걱정했는데, 제가 tailwind.config 와 constant/color 만 수정하고 제 UI 에는 적용을 안 해놓은 상황이라, 정민님꺼로 덮어쓰는 게 더 효율적일 거 같아요!! 제 pr 먼저 merge 하고 정민님꺼 그 다음에 해주시는 거로 하면 어떨까요~?

넵! 좋아요 저도 사실 그렇게 하면 좋을것 같다고 생각했어요! 머지 후 conflict나면 제가 수정해서 푸쉬해둘게요:)

@DevDAN09
Copy link
Collaborator

DevDAN09 commented Feb 4, 2025

image 디자인이랑 align이 안맞더라구요! 확인 한번 부탁드려요! 1번이랑 2번바뀔때 textArea height도 한번 확인하면 좋을 것 같아요! image 디자인 내용

@DevDAN09
Copy link
Collaborator

DevDAN09 commented Feb 4, 2025

image image

해당 내용은 두가지 중 하나로 고쳐놓으면 좋을 것 같아요~!

  1. element 요소를 invisible 처리 해놓기 (이후에 슈몰세미나 업로드 되면 업데이트)
  2. 디자인 요소 Figma에서 다운 받아서 임시로 사용하기
  • 추가
    유튜브 링크 폰트 볼드 처리해주면 디자인이랑 맞을것 같아요!

Copy link
Collaborator

@DevDAN09 DevDAN09 left a comment

Choose a reason for hiding this comment

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

고생 많으셨습니다..! 코드리뷰를 남긴건, 정민님의 일정에 맞춰서 변경하시거나,, 반영하지 않으셔도 되셔요! 너무 수고해주셔서 LGTM하기엔 예의가 아니라고 생각해서 곱씹어서 코드 읽어 보았어요!
코드리뷰 = 정킹 노고를 위한 존경의 표시

고생많았습니다 LGTM👍

const activeIndex = items.findIndex((item) => item.isActive);
const totalTabs = items.length;

const getUnderlineWidth = (index: number) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

type TabPosition = 'left' | 'center' | 'right';

const getUnderlineWidth = (index: number, totalTabs: number): string => {
  const position: TabPosition = index === 0 
    ? 'left' 
    : index === totalTabs - 1 
    ? 'right' 
    : 'center';

  const widthMap = {
    left: '33.33%',   // 왼쪽 탭
    center: '35%',    // 가운데 탭
    right: '33.33%'   // 오른쪽 탭
  };

  return widthMap[position];
};

Copy link
Collaborator

Choose a reason for hiding this comment

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

TabPosition은 정적으로 바뀌지 않는 값이 3개로 결정적이니,
Type 정의를 해 놓는것도 하나의 방법이에요!

해당 함수에 전달된 인덱스와 totalTab 인자(Tab을 파라미터로 넣을지는 취향에 따라서..!)에 따라서 인자를 우선 받구요!
if문을 삼항연산자로 정리한 후 정의 된 타입에 따라서 넓이를 반환해주는 매핑작업 코드영역을 만들어 주면 코드 영역이 분리되어 읽기 좋아진답니당

Copy link
Member Author

Choose a reason for hiding this comment

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

유지보수성이 좋은 코드네요!_! 타입 정의하는 방식으로 고쳐놨습니다!
const widthMap = { left: '33.33%', // 왼쪽 탭 center: '35%', // 가운데 탭 right: '33.33%' // 오른쪽 탭 };
이 부분은
image
Record로 빼서 좀 더 유연성을 줘봤습니닷

Copy link
Collaborator

Choose a reason for hiding this comment

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

헤더, 이미지 섹션, 내용을 컴포넌트로 분리해서 작업하면 좋을 것 같아요!
한 파일에 모여있는 내용을 컴포넌트로 분리해서 작업하면 조금 더 가독성이 높을 것 같습니다 😃

setEndX(e.clientX);
};

// 포인터 종료 시 스와이프 방향에 따라 슬라이드 변경
Copy link
Collaborator

Choose a reason for hiding this comment

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

제스처 구현에 고생 많으셨네요..
이후에 시간이 된다면
https://use-gesture.netlify.app/docs/options/
해당 라이브러리 사용해보는 것도 방법입니다! 👀

@@ -8,7 +8,7 @@ import Community from "../Community";
const TabContent = () => {
const { items } = useContext(TabBarContext);
const activeTab = items.find((item) => item.isActive);
console.log(activeTab?.label);

Copy link
Collaborator

Choose a reason for hiding this comment

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

@@ -73,7 +72,7 @@ const Challenge = () => {

<section className="flex justify-center pb-12">
<Image
src={ChallengeMainImg}
src="/challenge_main.webp"
Copy link
Collaborator

Choose a reason for hiding this comment

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

@JjungminLee
Copy link
Member Author

image 디자인이랑 align이 안맞더라구요! 확인 한번 부탁드려요! 1번이랑 2번바뀔때 textArea height도 한번 확인하면 좋을 것 같아요! image 디자인 내용

이것은 저의 실수입니다. 위치 고정해두었습니닷

@JjungminLee
Copy link
Member Author

image image
해당 내용은 두가지 중 하나로 고쳐놓으면 좋을 것 같아요~!

  1. element 요소를 invisible 처리 해놓기 (이후에 슈몰세미나 업로드 되면 업데이트)
  2. 디자인 요소 Figma에서 다운 받아서 임시로 사용하기
  • 추가
    유튜브 링크 폰트 볼드 처리해주면 디자인이랑 맞을것 같아요!

image
-> 바꿨놨습니다!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants