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
3 changes: 3 additions & 0 deletions .Jules/palette.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,6 @@
## 2024-07-14 - Native Keyboard Submission with Forms for Modals
**Learning:** Modals designed with plain `<div>` elements as wrappers instead of `<form>` lack native keyboard submission support, forcing users to switch from keyboard to mouse to confirm actions like "Save".
**Action:** When designing modals or popups containing inputs, always use a `<form>` element to wrap the content, handle the `onSubmit` event (calling `e.preventDefault()`), and set the primary confirmation button to `type="submit"` to enable seamless Enter-key submission for keyboard users.
## 2024-07-18 - Native Keyboard Submission for Inline Forms
**Learning:** Refactoring interactive input groups from `<div>` wrappers to `<form>` tags is a crucial accessibility fix that enables native keyboard submission (e.g., submitting a project name via Enter key). However, doing so requires updating associated React Testing Library queries to trigger `fireEvent.submit(form)` instead of just `fireEvent.click(button)` to properly verify the form submission lifecycle.
**Action:** When migrating inline creation inputs to `<form>` elements, ensure `onSubmit` prevents default (`e.preventDefault()`) and that test suites are updated to fire submit events on the form node, capturing native keyboard workflows.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@
- [FE] `autoInfer.ts`์— ๋Œ€ํ•œ ๋‹จ์œ„ ํ…Œ์ŠคํŠธ ๋ฐ UI ์ปดํฌ๋„ŒํŠธ ๋‹จ์œ„ ํ…Œ์ŠคํŠธ๋ฅผ ์ถ”๊ฐ€ํ•˜์—ฌ 100% ํ…Œ์ŠคํŠธ ์ปค๋ฒ„๋ฆฌ์ง€๋ฅผ ์œ ์ง€ํ•ฉ๋‹ˆ๋‹ค.
- [FE] โฌ‡๏ธ **DBML Export**: ERD ๋‹ค์ด์–ด๊ทธ๋žจ์„ DBML (Database Markup Language) ํ˜•์‹์œผ๋กœ ๋‚ด๋ณด๋‚ผ ์ˆ˜ ์žˆ๋Š” ๊ธฐ๋Šฅ์„ ์ถ”๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค. ์ƒ๋‹จ์˜ DBML ๋ฒ„ํŠผ์„ ํด๋ฆญํ•˜์—ฌ ๋‹ค์šด๋กœ๋“œํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
- [FE] ๐Ÿ“š **Data Dictionary Export**: ERD ํ…Œ์ด๋ธ”/์ปฌ๋Ÿผ ๋ฉ”ํƒ€๋ฐ์ดํ„ฐ๋ฅผ CSV ๋ฐ Markdown์œผ๋กœ ๋‚ด๋ณด๋‚ด๋ฉฐ, CSV formula injection๊ณผ Markdown ๋ Œ๋”๋ง escape๋ฅผ ์ ์šฉํ–ˆ์Šต๋‹ˆ๋‹ค.

## [Unreleased]
### Added
- ํ‚ค๋ณด๋“œ ๋„ค๋น„๊ฒŒ์ด์…˜ ๊ฐœ์„ : ํ”„๋กœ์ ํŠธ ์ƒ์„ฑ ์‹œ ์—”ํ„ฐ ํ‚ค ์ž…๋ ฅ์œผ๋กœ ์ œ์ถœํ•  ์ˆ˜ ์žˆ๋„๋ก `form` ์š”์†Œ ์ ์šฉ (App.tsx).
12 changes: 10 additions & 2 deletions frontend/src/App.coverage.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -344,11 +344,19 @@ describe('App orchestration coverage', () => {

it('creates projects, validates and creates connections, and starts a snapshot', async () => {
await renderReadyApp()

// Switch to projects view to test the new inlineCreate form submission
fireEvent.click(screen.getByRole('button', { name: 'ํ”„๋กœ์ ํŠธ' }))
fireEvent.change(screen.getByLabelText('์ƒˆ ํ”„๋กœ์ ํŠธ ์ด๋ฆ„'), { target: { value: ' New ' } })
fireEvent.submit(screen.getByLabelText('์ƒˆ ํ”„๋กœ์ ํŠธ ์ด๋ฆ„').closest('form')!)
await waitFor(() => expect(api.createProject).toHaveBeenCalledWith('New'))

// Switch back to editor to test the rest
fireEvent.click(screen.getByRole('button', { name: 'ํŽธ์ง‘๊ธฐ' }))

fireEvent.change(screen.getByLabelText('New project'), { target: { value: ' New ' } })
fireEvent.change(screen.getByLabelText('New project'), { target: { value: ' Another New ' } })
fireEvent.click(screen.getByRole('button', { name: 'Create' }))
await waitFor(() => expect(api.createProject).toHaveBeenCalledWith('New'))
await waitFor(() => expect(api.createProject).toHaveBeenCalledWith('Another New'))

const dsn = screen.getByLabelText('Connection DSN')
fireEvent.change(dsn, { target: { value: 'postgresql://[' } })
Expand Down
13 changes: 9 additions & 4 deletions frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1304,20 +1304,25 @@ export default function App() {
<h1 id="projects-title">ํ”„๋กœ์ ํŠธ</h1>
<p>ํ”„๋กœ์ ํŠธ๋ฅผ ์„ ํƒํ•˜๋ฉด ํ•ด๋‹น ๋‹ค์ด์–ด๊ทธ๋žจ ๋ชฉ๋ก์„ ๋ณผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.</p>
</div>
<div className="inlineCreate">
<form
className="inlineCreate"
onSubmit={(e) => {
e.preventDefault();
onCreateProject();
}}
>
<input
aria-label="์ƒˆ ํ”„๋กœ์ ํŠธ ์ด๋ฆ„"
value={projectName}
onChange={(event) => setProjectName(event.currentTarget.value)}
/>
<button
type="button"
onClick={onCreateProject}
type="submit"
disabled={!projectName.trim() || isCreatingProject}
>
{isCreatingProject ? "์ƒ์„ฑ ์ค‘" : "์ƒˆ ํ”„๋กœ์ ํŠธ"}
</button>
</div>
</form>
</div>
<div className="dataTable" role="table" aria-label="ํ”„๋กœ์ ํŠธ ๋ชฉ๋ก">
<div className="dataTable__row dataTable__row--projects dataTable__row--head" role="row">
Expand Down
Loading