Skip to content

feat: Compare Diff 셀 클릭 시 상세 다이얼로그 표시#15

Merged
clroot merged 1 commit into
mainfrom
feat/compare-cell-detail-dialog
Feb 26, 2026
Merged

feat: Compare Diff 셀 클릭 시 상세 다이얼로그 표시#15
clroot merged 1 commit into
mainfrom
feat/compare-cell-detail-dialog

Conversation

@clroot
Copy link
Copy Markdown
Owner

@clroot clroot commented Feb 26, 2026

Summary

  • Compare 페이지 Diff 탭에서 셀 클릭 시 전체 값을 확인할 수 있는 상세 다이얼로그 추가
  • ADDED/REMOVED 셀: 전체 값을 diff 색상 배경으로 표시
  • CHANGED 셀: Old(-) / New(+) 값을 나란히 비교 표시
  • Unified View, Split View 양쪽 모두 지원

Test plan

  • Compare 페이지에서 Unified View의 셀 클릭 → 다이얼로그에 전체 값 표시 확인
  • Split View의 셀 클릭 → 다이얼로그에 전체 값 표시 확인
  • CHANGED 행의 셀 클릭 → Old/New 값이 나란히 표시되는지 확인
  • ADDED/REMOVED 행의 셀 클릭 → 단일 값이 올바른 색상으로 표시되는지 확인
  • 긴 텍스트 셀 클릭 → 다이얼로그에서 전체 내용 확인 가능한지 검증
  • 빈 행(Split View 패딩) 클릭 시 다이얼로그가 열리지 않는지 확인

truncate된 셀 값을 전체 확인할 수 있도록 셀 클릭 시 Modal을 표시한다.
- ADDED/REMOVED: 전체 값을 diff 색상 배경으로 표시
- CHANGED: Old/New 값을 나란히 비교 표시
- Unified View, Split View 양쪽 모두 지원
@clroot clroot merged commit 1a8d22b into main Feb 26, 2026
@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @clroot, 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은 Compare 페이지의 Diff 탭에서 사용자 경험을 개선하기 위해 셀 클릭 시 상세 내용을 보여주는 모달 다이얼로그를 도입합니다. 이를 통해 잘리거나 긴 텍스트를 가진 셀의 전체 내용을 쉽게 확인할 수 있으며, 변경된 값들을 명확하게 비교할 수 있도록 시각적인 피드백을 제공합니다.

Highlights

  • 상세 다이얼로그 추가: Compare 페이지의 Diff 탭에서 셀 클릭 시 전체 값을 확인할 수 있는 상세 다이얼로그가 추가되었습니다.
  • ADDED/REMOVED 셀 처리: ADDED 또는 REMOVED 타입의 셀을 클릭하면 해당 값이 Diff 색상 배경으로 표시됩니다.
  • CHANGED 셀 처리: CHANGED 타입의 셀을 클릭하면 Old(-) 값과 New(+) 값이 나란히 비교 표시됩니다.
  • 뷰 모드 지원: Unified View와 Split View 모두에서 셀 클릭 상세 다이얼로그 기능이 지원됩니다.
Changelog
  • frontend/src/components/compare/CompareDiffView.tsx
    • Modal 컴포넌트 및 관련 타입 정의가 추가되었습니다.
    • 셀 클릭 이벤트를 처리하고 상세 정보를 저장하는 상태(selectedCell)가 추가되었습니다.
    • UnifiedView 및 SplitView 컴포넌트에 onCellClick prop이 추가되어 셀 클릭 시 상세 다이얼로그를 열 수 있도록 연결되었습니다.
    • Diff 테이블의 각 셀에 클릭 이벤트 핸들러와 포인터 커서 스타일이 적용되었습니다.
    • 선택된 셀의 상세 정보를 표시하는 CellDetailModal 컴포넌트가 새로 구현되었습니다.
    • NULL, undefined, 객체 값을 문자열로 포맷팅하는 formatCellValue 유틸리티 함수가 추가되었습니다.
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

@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은 Compare Diff 뷰의 셀을 클릭했을 때 상세 정보를 보여주는 다이얼로그를 추가하는 기능을 성공적으로 구현했습니다. Unified와 Split 뷰를 모두 지원하며, ADDED, REMOVED, CHANGED 상태의 행을 올바르게 처리합니다. 새로운 CellDetailModal 컴포넌트를 도입하고 기존 뷰 컴포넌트들이 셀 클릭을 지원하도록 수정한 코드 구조가 좋습니다. 사소한 버그, 코드 일관성, 그리고 완성되지 않은 것으로 보이는 기능에 대해 몇 가지 개선 제안 사항이 있습니다. 전반적으로 훌륭한 기여입니다.

Comment on lines +565 to +568
const diffLabel =
cell?.diffType === "ADDED" ? "Added" :
cell?.diffType === "REMOVED" ? "Removed" :
"Changed"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

cellnull일 때 cell?.diffTypeundefined가 되어 diffLabel이 "Changed"로 잘못 설정됩니다. 이로 인해 modalLabel prop이 " · Changed"와 같은 의도하지 않은 값으로 설정될 수 있습니다. cellnull인 경우를 명시적으로 처리하여 이 문제를 해결하는 것이 좋습니다.

Suggested change
const diffLabel =
cell?.diffType === "ADDED" ? "Added" :
cell?.diffType === "REMOVED" ? "Removed" :
"Changed"
const diffLabel =
cell?.diffType === "ADDED" ? "Added" :
cell?.diffType === "REMOVED" ? "Removed" :
cell?.diffType === "CHANGED" ? "Changed" : ""

} & (
| { diffType: "ADDED"; value: unknown }
| { diffType: "REMOVED"; value: unknown }
| { diffType: "CHANGED"; leftValue: unknown; rightValue: unknown; isChanged: boolean }
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

SelectedCellInfo 타입의 CHANGED variant에 isChanged 속성을 추가하셨지만, CellDetailModal 컴포넌트 내에서 이 값을 사용하고 있지 않습니다. 이 속성은 CHANGED 행의 특정 셀이 실제로 변경되었는지를 나타내므로, 모달 내에서 변경 여부를 시각적으로 표시하는 데 사용하면 사용자 경험을 향상시킬 수 있습니다. 예를 들어, 값이 변경된 경우에만 특별한 스타일을 적용하거나 레이블을 추가할 수 있습니다.

Comment on lines +430 to 446
const handleCellClick = (sourceRow: DiffRow, colIndex: number) => {
const col = columns[colIndex]
if (sourceRow.diffType === "ADDED") {
onCellClick({ columnName: col.name, columnType: col.type, diffType: "ADDED", value: sourceRow.values[colIndex] })
} else if (sourceRow.diffType === "REMOVED") {
onCellClick({ columnName: col.name, columnType: col.type, diffType: "REMOVED", value: sourceRow.values[colIndex] })
} else {
onCellClick({
columnName: col.name,
columnType: col.type,
diffType: "CHANGED",
leftValue: sourceRow.left[colIndex],
rightValue: sourceRow.right[colIndex],
isChanged: sourceRow.changedColumns.includes(colIndex),
})
}
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

SplitViewhandleCellClick 함수에서 변경된 컬럼인지 확인할 때 Array.prototype.includes()를 사용하고 있습니다. UnifiedView에서는 Set을 사용하여 O(1) 시간 복잡도로 조회하는 것과 대조적입니다. 코드 일관성을 유지하고 (미미하지만) 성능을 개선하기 위해 handleCellClick 내부에서 Set을 생성하여 사용하는 것을 제안합니다.

Suggested change
const handleCellClick = (sourceRow: DiffRow, colIndex: number) => {
const col = columns[colIndex]
if (sourceRow.diffType === "ADDED") {
onCellClick({ columnName: col.name, columnType: col.type, diffType: "ADDED", value: sourceRow.values[colIndex] })
} else if (sourceRow.diffType === "REMOVED") {
onCellClick({ columnName: col.name, columnType: col.type, diffType: "REMOVED", value: sourceRow.values[colIndex] })
} else {
onCellClick({
columnName: col.name,
columnType: col.type,
diffType: "CHANGED",
leftValue: sourceRow.left[colIndex],
rightValue: sourceRow.right[colIndex],
isChanged: sourceRow.changedColumns.includes(colIndex),
})
}
}
const handleCellClick = (sourceRow: DiffRow, colIndex: number) => {
const col = columns[colIndex]
if (sourceRow.diffType === "ADDED") {
onCellClick({ columnName: col.name, columnType: col.type, diffType: "ADDED", value: sourceRow.values[colIndex] })
} else if (sourceRow.diffType === "REMOVED") {
onCellClick({ columnName: col.name, columnType: col.type, diffType: "REMOVED", value: sourceRow.values[colIndex] })
} else {
const changedCols = new Set(sourceRow.changedColumns)
onCellClick({
columnName: col.name,
columnType: col.type,
diffType: "CHANGED",
leftValue: sourceRow.left[colIndex],
rightValue: sourceRow.right[colIndex],
isChanged: changedCols.has(colIndex),
})
}
}

@clroot clroot deleted the feat/compare-cell-detail-dialog branch February 27, 2026 05:08
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