Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .Jules/palette.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,7 @@
## 2024-06-26 - [Abbreviation Comprehension in ERD Nodes]
**Learning:** Users without deep database administration backgrounds may not immediately recognize domain-specific abbreviations like "PK" or "FK" rendered as minimalist badges inside dense ERD nodes.
**Action:** Always provide `title` attributes on technical acronym badges (like Primary Key / Foreign Key) to ensure clarity and improve accessibility without cluttering the space-constrained node UI.

## 2024-07-09 - 동적 λͺ©λ‘ λ‚΄μ˜ κ³ μœ ν•œ μ ‘κ·Όμ„± 이름 μ§€μ •
**Learning:** λ™μ μœΌλ‘œ μƒμ„±λ˜λŠ” 폼 μž…λ ₯ μš”μ†Œ λͺ©λ‘(예: `CardinalityModal.tsx`의 "Distinct" 컬럼 μž…λ ₯ 같은 ν‘œ/κ·Έλ¦¬λ“œ λ ˆμ΄μ•„μ›ƒ)μ—μ„œλŠ” μΈμ ‘ν•œ μ‹œκ°μ  λ ˆμ΄λΈ”μ΄ μ œλŒ€λ‘œ μ—°κ²°λ˜μ§€ μ•Šκ±°λ‚˜ 슀크린 λ¦¬λ”μ—μ„œ λͺ¨λ‘ λ™μΌν•œ μ œλ„€λ¦­ μ΄λ¦„μœΌλ‘œ μ½νžˆλŠ” λ¬Έμ œκ°€ λ°œμƒν•  수 μžˆμŠ΅λ‹ˆλ‹€. λ‹¨μˆœν•œ 컬럼λͺ… ν…μŠ€νŠΈ λ…Έλ“œμ— μ˜μ‘΄ν•˜λŠ” κ²ƒμœΌλ‘œλŠ” λΆ€μ‘±ν•©λ‹ˆλ‹€.
**Action:** 슀크린 리더 μ‚¬μš©μžκ°€ 각 행을 ν™•μ‹€νžˆ κ΅¬λ³„ν•˜μ—¬ 읽을 수 μžˆλ„λ‘ 각 `<input>` μš”μ†Œμ— ν–‰ μΈλ±μŠ€λ‚˜ νŠΉμ • μ•„μ΄ν…œ 이름을 ν¬ν•¨ν•œ λ™μ μœΌλ‘œ κ³ μœ ν•œ `aria-label` 속성을 λͺ…μ‹œμ μœΌλ‘œ μΆ”κ°€ν•΄μ•Ό ν•©λ‹ˆλ‹€.
3 changes: 3 additions & 0 deletions frontend/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@
- **ν…Œμ΄λΈ” 및 컬럼 νŽΈμ§‘ κΈ°λŠ₯**: UI νŒ¨λ„μ„ 톡해 λ…Έλ“œλ₯Ό μ„ νƒν•˜κ³ , ν…Œμ΄λΈ”μ˜ 이름/μ½”λ©˜νŠΈλ₯Ό μˆ˜μ •ν•˜λ©°, μ»¬λŸΌμ„ μΆ”κ°€/μˆ˜μ •/μ‚­μ œν•˜κ±°λ‚˜ ν…Œμ΄λΈ”μ„ μ‚­μ œν•  수 μžˆλŠ” κΈ°λŠ₯ μΆ”κ°€.
- **ν…ŒμŠ€νŠΈ μΆ”κ°€**: ν”„λ‘ νŠΈμ—”λ“œ ν…ŒμŠ€νŠΈ 컀버리지 100% λͺ©ν‘œ 달성을 μœ„ν•΄ `cardinality.ts`, `types.ts`, `export.ts` 의 미달성 λΆ„κΈ° 및 ν•¨μˆ˜ ν…ŒμŠ€νŠΈ μΆ”κ°€ (`cardinality_extra.test.ts` λ“±).
- `.gitignore` νŒŒμΌμ— `coverage/` 폴더λ₯Ό μΆ”κ°€ν•˜μ—¬ λΆˆν•„μš”ν•œ ν…ŒμŠ€νŠΈ μ•„ν‹°νŒ©νŠΈκ°€ μ»€λ°‹λ˜μ§€ μ•Šλ„λ‘ 보완.

## 2025-02-24
- `CardinalityModal.tsx`의 동적 컬럼 μž…λ ₯ 폼에 슀크린 λ¦¬λ”μ—μ„œ 각 행을 λͺ…ν™•νžˆ ꡬ별할 수 μžˆλ„λ‘ 동적 `aria-label` 속성을 μΆ”κ°€ν•˜μ—¬ 접근성을 κ°œμ„ .
5 changes: 4 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
"build": "tsc -b && vite build",
"typecheck": "tsc --noEmit",
"preview": "vite preview",
"test": "vitest run"
"test": "vitest run",
"lint": "tsc --noEmit",
"coverage": "vitest run --coverage",
"e2e": "echo 'No e2e framework configured'"
},
"dependencies": {
"@xyflow/react": "^12.11.1",
Expand Down
48 changes: 48 additions & 0 deletions frontend/src/components/modals/CardinalityModal.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import '@testing-library/jest-dom/vitest';
import { describe, it, expect, vi } from 'vitest';
import { render, screen } from '@testing-library/react';
import { CardinalityModal } from './CardinalityModal';

describe('CardinalityModal', () => {
it('renders a distinct count input with a dynamic aria-label', () => {
const mockNode = {
id: 'test-node',
type: 'tableNode',
position: { x: 0, y: 0 },
data: {
title: 'test_table',
columns: [
{ column_name: 'id', data_type: 'integer', is_not_null: true, is_pk: true }
]
}
};

render(
<CardinalityModal
isOpen={true}
cardinalityNode={mockNode as any}
nodes={[mockNode] as any}
cardinalityRowCount="1000"
setCardinalityRowCount={vi.fn()}
cardinalityRowCountNumber={1000}
cardinalityDistinctCounts={{}}
cardinalityColumnSelections={{}}
cardinalityRecommendations={[]}
appliedCardinalitySignatures={{ names: new Set(), columns: new Set() }}
onCloseCardinalityWizard={vi.fn()}
onCardinalityTableChange={vi.fn()}
onCardinalityColumnToggle={vi.fn()}
onCardinalityDistinctCountChange={vi.fn()}
onApplyCardinalityRecommendation={vi.fn()}
parsePositiveInteger={vi.fn()}
calculateCardinalityRatio={vi.fn()}
formatPercent={(val) => `${val}%`}
strengthLabel={vi.fn()}
/>
);

const input = screen.getByLabelText('1번째 컬럼 고유 κ°’(Distinct) 수');
expect(input).toBeInTheDocument();
expect(input).toHaveAttribute('type', 'number');
});
});
1 change: 1 addition & 0 deletions frontend/src/components/modals/CardinalityModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ export function CardinalityModal({
<td>
<input
id={inputId}
aria-label={`${index + 1}번째 컬럼 고유 κ°’(Distinct) 수`}
inputMode="numeric"
min="1"
type="number"
Expand Down
Loading