Skip to content

LC-2845 USER 마이페이지 가이드북 카드 구현#2159

Merged
yeji424 merged 5 commits intoLC-2838-Sprint-17from
LC-2845-USER-마이페이지-가이드북-카드-구현
Mar 6, 2026

Hidden character warning

The head ref may contain hidden characters: "LC-2845-USER-\ub9c8\uc774\ud398\uc774\uc9c0-\uac00\uc774\ub4dc\ubd81-\uce74\ub4dc-\uad6c\ud604"
Merged

LC-2845 USER 마이페이지 가이드북 카드 구현#2159
yeji424 merged 5 commits intoLC-2838-Sprint-17from
LC-2845-USER-마이페이지-가이드북-카드-구현

Conversation

@yeji424
Copy link
Copy Markdown
Collaborator

@yeji424 yeji424 commented Mar 6, 2026

연관 작업

yeji424 added 3 commits March 6, 2026 15:55
- 리펙토링 이유: 무료 자료집 등 비프로그램 타입도 동일 카드 레이아웃으로 확장 가능하도록 구조 정비
- CareerGrowthItem: 뷰모델로 데이터 구조 정리
- 카드용 Config 및 매퍼 유틸(careerGrowthCard) 분리
- CareerGrowthList: config 기반 렌더링으로 변경
- toGuidebookCardConfig 추가
- 변수명 추가 정리: CareerGrowthItem에 맞게 program → item, programs → items
@yeji424 yeji424 self-assigned this Mar 6, 2026
@github-actions github-actions Bot changed the title Lc 2845 user 마이페이지 가이드북 카드 구현 LC-2845 USER 마이페이지 가이드북 카드 구현 Mar 6, 2026
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 PR은 마이페이지의 커리어 성장 섹션에서 프로그램과 가이드북 같은 다양한 콘텐츠를 일관된 카드 형태로 표시할 수 있도록 시스템을 개선합니다. 기존의 프로그램 중심 데이터 처리 방식을 일반화된 아이템 및 카드 설정 방식으로 전환하여, UI 컴포넌트의 재사용성을 높이고 새로운 콘텐츠 유형을 쉽게 통합할 수 있는 기반을 마련했습니다.

Highlights

  • 마이페이지 가이드북 카드 구현: 마이페이지 커리어 성장 섹션에 가이드북 카드를 표시하기 위한 로직이 추가되었습니다.
  • 데이터 구조 및 UI 컴포넌트 리팩토링: 다양한 콘텐츠 유형(프로그램, 가이드북)을 유연하게 처리하기 위해 CareerGrowthItemCareerGrowthCardConfig와 같은 새로운 데이터 구조가 도입되었으며, CareerGrowthList 컴포넌트가 이를 활용하도록 리팩토링되었습니다.
  • 재사용 가능한 카드 설정 유틸리티: 콘텐츠 카테고리(프로그램, 가이드북)에 따라 적절한 카드 설정을 생성하는 유틸리티 함수가 careerGrowthCard.ts 파일에 추가되어 UI 로직과 데이터 변환 로직이 분리되었습니다.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • src/domain/career-board/sections/CareerGrowthSection.tsx
    • 기존 CareerGrowthProgram 관련 import를 toCareerGrowthItemstoCareerGrowthCardConfigs로 변경했습니다.
    • 프로그램 목록을 items로, 화면에 표시될 아이템 목록을 visibleItems로 이름을 변경하고, cardConfigs를 사용하여 CareerGrowthList에 전달하도록 로직을 수정했습니다.
    • 데이터 존재 여부 확인 로직을 cardConfigs의 길이를 기준으로 변경했습니다.
  • src/domain/career-board/ui/CareerGrowthList.tsx
    • 컴포넌트가 CareerGrowthCardConfig 타입의 items 배열을 prop으로 받도록 변경했습니다.
    • 내부적으로 MypageApplication을 처리하던 로직과 ProgramCard 컴포넌트를 제거하고, CareerGrowthItemCard 컴포넌트를 사용하여 config prop을 통해 데이터를 렌더링하도록 리팩토링했습니다.
    • DashboardButton 컴포넌트를 ActionButton으로 일반화하고, CareerGrowthCardConfigactionButton 속성을 활용하도록 변경했습니다.
  • src/domain/career-board/utils/careerGrowth.ts
    • CareerGrowthProgram 인터페이스를 CareerGrowthItem으로 이름을 변경하고, programStatusTypecreateDate 필드를 추가했습니다.
    • convertApplicationToProgram 함수를 applicationToCareerGrowthItem으로 이름을 변경하고, toCareerGrowthPrograms 함수를 toCareerGrowthItems로 변경했습니다.
    • 변환 로직에 programStatusTypecreateDate를 포함하도록 업데이트했습니다.
  • src/domain/career-board/utils/careerGrowthCard.ts
    • 새로운 파일이 추가되었습니다.
    • CareerGrowthCardConfig 인터페이스를 정의하여 카드 뷰모델의 표준을 제공합니다.
    • toProgramCardConfig 함수를 정의하여 CareerGrowthItem을 프로그램 탭용 CareerGrowthCardConfig로 변환합니다.
    • toGuidebookCardConfig 함수를 정의하여 CareerGrowthItem을 가이드북 탭용 CareerGrowthCardConfig로 변환합니다.
    • toCareerGrowthCardConfigs 함수를 정의하여 주어진 카테고리에 따라 적절한 카드 설정 목록을 생성합니다.
Activity
  • 이 PR은 LC-2845 Jira 티켓과 연관되어 있습니다.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

안녕하세요. LC-2845 티켓의 'USER 마이페이지 가이드북 카드 구현' PR에 대한 리뷰입니다.

전반적으로 커리어 성장 섹션의 아이템들을 CareerGrowthCardConfig라는 뷰 모델을 통해 렌더링하도록 리팩터링하신 점이 인상 깊습니다. 이로 인해 UI 컴포넌트와 데이터 로직의 분리가 명확해졌고, 코드의 재사용성과 테스트 용이성이 향상되었습니다. 특히 가이드북 카드 구현을 위해 기존 구조를 확장 가능하게 변경하신 점이 좋습니다.

리뷰에서는 몇 가지 개선점을 제안했습니다.

  • UX 개선: 현재는 기능이 구현되지 않은 버튼이 활성화되어 있어 사용자에게 혼란을 줄 수 있습니다. 기능 구현 전까지는 비활성화하는 것을 제안합니다.
  • 가독성 및 유지보수성: 매직 스트링을 상수(constant)로 대체하고, if 문을 switch 문으로 변경하여 코드의 명확성을 높이는 방안을 제안했습니다.
  • 잠재적 버그 수정: null일 수 있는 ID에 기본값 0을 할당하는 부분은 React에서 중복 key 문제로 이어질 수 있어 수정이 필요합니다.

자세한 내용은 각 파일의 리뷰 코멘트를 참고해 주세요. 좋은 코드를 작성해주셔서 감사합니다.

Comment thread src/domain/career-board/sections/CareerGrowthSection.tsx
Comment thread src/domain/career-board/ui/CareerGrowthList.tsx
Comment thread src/domain/career-board/utils/careerGrowthCard.ts
Comment on lines +79 to +90
export const toCareerGrowthCardConfigs = (
items: CareerGrowthItem[],
category: ApplicationCategory,
): CareerGrowthCardConfig[] => {
if (category === 'PROGRAM') {
return items.map((p) => toProgramCardConfig(p));
}
if (category === 'GUIDEBOOK') {
return items.map((p) => toGuidebookCardConfig(p));
}
return [];
};
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

toCareerGrowthCardConfigs 함수에서 if 문을 연속으로 사용하여 카테고리별로 분기하고 있습니다. 가이드라인의 '가독성 - 눈의 이동 줄이기' 섹션에서 권장하는 switch 문을 사용하면 코드를 더 구조적이고 간결하게 만들 수 있습니다. 이는 각 케이스를 명확하게 구분하여 가독성을 높여줍니다.

export const toCareerGrowthCardConfigs = (
  items: CareerGrowthItem[],
  category: ApplicationCategory,
): CareerGrowthCardConfig[] => {
  switch (category) {
    case 'PROGRAM':
      return items.map(toProgramCardConfig);
    case 'GUIDEBOOK':
      return items.map(toGuidebookCardConfig);
    default:
      return [];
  }
};
References
  1. 관련 있는 로직은 한곳에 모아두어 코드의 컨텍스트를 파악하기 위해 시선이 여러 곳으로 이동하는 것을 최소화해야 합니다. switch 문이나 정책 객체(policy object)를 사용하여 분기 로직을 인라인으로 배치하면 코드의 흐름을 위에서 아래로 자연스럽게 읽을 수 있어 가독성이 향상됩니다. (link)

yeji424 added 2 commits March 6, 2026 18:39
- S3 사용 시 직접 다운로드 불가 → 새 탭으로 열리도록 처리
- 가이드북 다운로드 PATCH 기록 연동 및 409만 무시
@yeji424 yeji424 merged commit 7998668 into LC-2838-Sprint-17 Mar 6, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant