Skip to content

Conversation

@CirnoV
Copy link
Member

@CirnoV CirnoV commented Oct 23, 2025

기존 PG(Payment Gateway) 특정 조건부 렌더링 로직을 더 확장 가능한 플래그 기반 시스템으로 리팩토링했습니다.

주요 변경사항:

  • pgSpecific → flagOptions로 변경
  • PG 전용 로직(pgSpecific.ts)을 범용 플래그 시스템(flags.ts)으로 대체
  • Condition 컴포넌트의 prop을 pgName에서 flag로 변경
  • browser-sdk.yml 스키마에 flags 섹션 추가 (nice, smartro, toss 등 32개 PG 정의)
  • 플래그 타입 자동 생성 기능 추가 (src/types/generated/flags.ts)

기존 PG(Payment Gateway) 특정 조건부 렌더링 로직을 더 확장 가능한 플래그 기반 시스템으로 리팩토링했습니다.

주요 변경사항:
- pgSpecific → flagOptions로 변경
- PG 전용 로직(pgSpecific.ts)을 범용 플래그 시스템(flags.ts)으로 대체
- Condition 컴포넌트의 prop을 pgName에서 flag로 변경
- browser-sdk.yml 스키마에 flags 섹션 추가 (nice, smartro, toss 등 32개 PG 정의)
- 플래그 타입 자동 생성 기능 추가 (src/types/__generated__/flags.ts)
@CirnoV CirnoV requested a review from a team as a code owner October 23, 2025 09:30
@vercel
Copy link

vercel bot commented Oct 23, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
developers Ready Ready Preview Comment Oct 27, 2025 8:49am

@gemini-code-assist
Copy link

Summary of Changes

Hello @CirnoV, 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!

이 Pull Request는 기존의 결제 게이트웨이(PG)에 특화된 조건부 렌더링 로직을 보다 유연하고 확장 가능한 범용 플래그 시스템으로 전환하는 것을 목표로 합니다. 이를 통해 특정 PG에 종속되지 않고 다양한 조건에 따라 UI 요소를 렌더링할 수 있는 기반을 마련하며, 관련 스키마 정의와 코드 생성 프로세스도 함께 업데이트하여 시스템의 일관성과 유지보수성을 향상시킵니다.

Highlights

  • 범용 플래그 시스템으로 리팩토링: 기존 PG(Payment Gateway) 특정 조건부 렌더링 로직을 더 확장 가능한 플래그 기반 시스템으로 리팩토링했습니다. pgSpecific 필드가 flagOptions로 변경되었고, PG 전용 로직(pgSpecific.ts)이 범용 플래그 시스템(flags.ts)으로 대체되었습니다.
  • Condition 컴포넌트 업데이트: 조건부 렌더링을 담당하는 Condition 컴포넌트의 prop이 pgName에서 flag로 변경되어, PG뿐만 아니라 다양한 플래그에 기반한 조건부 렌더링을 지원합니다.
  • 스키마 및 타입 정의 개선: browser-sdk.yml 스키마에 flags 섹션이 추가되어 32개의 PG 플래그가 정의되었으며, 이 플래그들을 기반으로 타입이 자동 생성(src/types/__generated__/flags.ts)되도록 기능이 추가되었습니다.
  • 코드 생성 로직 변경: 코드 생성 로직이 pgSpecific 대신 flagOptions를 사용하도록 업데이트되었으며, 새로운 플래그 시스템에 맞춰 parameter.ts 및 관련 파일들이 수정되었습니다.
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

@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

이 PR은 PG(결제 게이트웨이)에 특화된 조건부 렌더링 로직을 보다 일반적이고 확장 가능한 플래그 기반 시스템으로 리팩토링합니다. 코드베이스 전반에 걸쳐 pgSpecificflagOptions로 대체하고, 핵심 로직을 위해 새로운 flags.ts를 도입했으며, browser-sdk.yml 스키마로부터 플래그 타입을 자동 생성하도록 변경되었습니다. 이는 유지보수성과 확장성을 높이는 훌륭한 아키텍처 개선입니다. src/type.ts에서 PaymentGateway 목록을 수동으로 관리하는 부분에 대해 유지보수성을 더욱 향상시킬 수 있는 제안을 하나 드립니다.

@CirnoV
Copy link
Member Author

CirnoV commented Oct 27, 2025

/gemini review

Copy link

@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

이 Pull Request는 PG(결제 게이트웨이)에 특화된 조건부 렌더링 로직을 보다 범용적인 플래그 기반 시스템으로 개선하는 중요한 리팩토링을 수행합니다. 전반적으로 변경 사항은 명확하며 코드의 확장성과 유지보수성을 크게 향상시킬 것으로 보입니다. pgSpecificflagOptions로 변경하고 관련 로직을 flags.ts로 일반화한 것은 좋은 설계 결정입니다.

몇 가지 코드 개선을 위한 제안 사항을 리뷰 댓글로 남겼습니다. 변수명 일관성을 위한 작은 수정과 성능 향상을 위한 로직 변경에 대한 내용입니다. 이 제안들을 반영하면 코드가 더욱 견고해질 것입니다. 훌륭한 작업입니다!

@CirnoV CirnoV merged commit ad2126b into main Oct 27, 2025
2 of 3 checks passed
@CirnoV CirnoV deleted the feat/sdk-schema-flags branch October 27, 2025 08:29
@sonarqubecloud
Copy link

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.

2 participants