Skip to content
Open
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
30 changes: 17 additions & 13 deletions .jules/palette.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,29 +26,33 @@
**ν•™μŠ΅:** ν•˜λ“œμ½”λ”©λœ 인라인 색상(예: `color: #666`)은 CSS λ―Έλ””μ–΄ 쿼리λ₯Ό μš°νšŒν•˜λ©° `!important` μ—†μ΄λŠ” μ‰½κ²Œ μž¬μ •μ˜ν•  수 μ—†κΈ° λ•Œλ¬Έμ— 닀크 λͺ¨λ“œμ—μ„œ μ μ‘ν•˜μ§€ λͺ»ν•˜κ³ , μ–΄λ‘μš΄ λ°°κ²½μ—μ„œ ν…μŠ€νŠΈ 가독성 문제λ₯Ό μΌμœΌν‚΅λ‹ˆλ‹€.
**쑰치:** μ–΄λ‘μš΄ ν…μŠ€νŠΈμ— ν•˜λ“œμ½”λ”©λœ 16μ§„μˆ˜ κ°’ λŒ€μ‹  `opacity: 0.7`을 μ‚¬μš©ν•˜μ—¬ ν…Œλ§ˆ 색상을 λ™μ μœΌλ‘œ 상속받고 λͺ¨λ“  색상 κ΅¬μ„±ν‘œμ—μ„œ 가독성을 보μž₯ν•˜μ‹­μ‹œμ˜€.

## 2024-07-12 - Prevent icon misalignment on long file names
**Learning:** Very long file names in a fluid layout without explicit flexbox wrapping can cause text to wrap below preceding inline icons, breaking the visual hierarchy and alignment.
**Action:** Always wrap file/directory listings in a flex container with `align-items: flex-start` and isolate icons with `flex-shrink: 0` alongside text content wrapped in a `<span style="overflow-wrap: anywhere;">` (or a global `overflow-wrap` on the container) to ensure text wraps cleanly next to fixed-width icons on mobile devices.
## 2024-07-12 - κΈ΄ 파일 μ΄λ¦„μ—μ„œ μ•„μ΄μ½˜ μ •λ ¬ 어긋남 λ°©μ§€
**ν•™μŠ΅:** λͺ…μ‹œμ μΈ flexbox μ€„λ°”κΏˆμ΄ μ—†λŠ” μœ λ™μ μΈ λ ˆμ΄μ•„μ›ƒμ—μ„œ 파일 이름이 맀우 κΈΈλ©΄ ν…μŠ€νŠΈκ°€ μ„ ν–‰ν•˜λŠ” 인라인 μ•„μ΄μ½˜ μ•„λž˜λ‘œ μ€„λ°”κΏˆλ˜μ–΄ μ‹œκ°μ  계측 ꡬ쑰와 정렬이 깨질 수 μžˆμŠ΅λ‹ˆλ‹€.
**쑰치:** λͺ¨λ°”일 μž₯μΉ˜μ—μ„œ κ³ μ • λ„ˆλΉ„ μ•„μ΄μ½˜ μ˜†μ— ν…μŠ€νŠΈκ°€ κΉ”λ”ν•˜κ²Œ μ€„λ°”κΏˆλ˜λ„λ‘ ν•˜λ €λ©΄ 항상 파일/디렉토리 λͺ©λ‘μ„ `align-items: flex-start`κ°€ μžˆλŠ” flex μ»¨ν…Œμ΄λ„ˆλ‘œ 감싸고 `<span style="overflow-wrap: anywhere;">` (λ˜λŠ” μ»¨ν…Œμ΄λ„ˆμ˜ μ „μ—­ `overflow-wrap`)둜 감싼 ν…μŠ€νŠΈ μ½˜ν…μΈ μ™€ ν•¨κ»˜ `flex-shrink: 0`을 μ‚¬μš©ν•˜μ—¬ μ•„μ΄μ½˜μ„ λΆ„λ¦¬ν•˜μ‹­μ‹œμ˜€.

## 2024-08-01 - 파일 μ•„μ΄μ½˜ 메타포
**ν•™μŠ΅:** 일반 νŒŒμΌμ„ λ‚˜νƒ€λ‚Ό λ•Œ λ°©ν–₯ μ§€μ‹œ μ•„μ΄μ½˜(우츑 μ‚Όκ°ν˜• λ“±)을 μ‚¬μš©ν•˜λ©΄ ν΄λ”λ‚˜ ν™•μž₯ κ°€λŠ₯ν•œ μš”μ†Œλ‘œ μ˜€ν•΄ν•  수 μžˆμ–΄ μ‹œκ°μ μΈ λͺ¨ν˜Έν•¨μ„ μ΄ˆλž˜ν•©λ‹ˆλ‹€. λ¬Έμ„œλ‚˜ νŽ˜μ΄μ§€ ν˜•νƒœμ˜ μ•„μ΄μ½˜μ΄ νŒŒμΌμ΄λΌλŠ” 것을 μ§κ΄€μ μœΌλ‘œ μ•Œ 수 있게 ν•΄μ€λ‹ˆλ‹€.
**쑰치:** 일반 파일 μ˜†μ— ν‘œμ‹œλ˜λŠ” μž₯μ‹μš© μ•„μ΄μ½˜μ„ 우츑 μ‚Όκ°ν˜• λ“±μ—μ„œ νŽ˜μ΄μ§€ μ•„μ΄μ½˜(예: `&#128196;`)으둜 κ΅μ²΄ν•˜μ—¬ μ‹œκ°μ  메타포λ₯Ό 일관성 있게 μœ μ§€ν•˜μ‹­μ‹œμ˜€.

## 2024-05-24 - [a νƒœκ·Έμ— λΆ€λ“œλŸ¬μš΄ νŠΈλžœμ§€μ…˜ μΆ”κ°€ 및 μ‚¬μš©μžμ˜ λͺ¨μ…˜ μ„€μ • 쑴쀑]
**Learning:** CSS νŠΈλžœμ§€μ…˜(`transition: all`)을 μΆ”κ°€ν•˜λ©΄ μ˜λ„μΉ˜ μ•Šμ€ μ• λ‹ˆλ©”μ΄μ…˜κ³Ό μ„±λŠ₯ 문제λ₯Ό μΌμœΌν‚¬ 수 μžˆμŠ΅λ‹ˆλ‹€. λ˜ν•œ, μ• λ‹ˆλ©”μ΄μ…˜μ€ μ „μ • μš΄λ™ μž₯μ• κ°€ μžˆλŠ” μ‚¬μš©μžμ—κ²Œ 문제λ₯Ό μœ λ°œν•  수 μžˆμŠ΅λ‹ˆλ‹€.
**Action:** CSS νŠΈλžœμ§€μ…˜μ„ μΆ”κ°€ν•  λ•Œ `transition: all` λŒ€μ‹  속성(`background-color`, `outline-color` λ“±)을 λͺ…μ‹œμ μœΌλ‘œ μ§€μ •ν•˜μ‹­μ‹œμ˜€. 접근성을 μœ„ν•΄ 항상 `@media (prefers-reduced-motion: reduce)` μ˜€λ²„λΌμ΄λ“œλ₯Ό ν¬ν•¨ν•˜μ—¬ `transition: none`으둜 μ„€μ •ν•˜μ‹­μ‹œμ˜€.
## 2024-05-24 - a νƒœκ·Έμ— λΆ€λ“œλŸ¬μš΄ νŠΈλžœμ§€μ…˜ μΆ”κ°€ 및 μ‚¬μš©μžμ˜ λͺ¨μ…˜ μ„€μ • 쑴쀑
**ν•™μŠ΅:** CSS νŠΈλžœμ§€μ…˜(`transition: all`)을 μΆ”κ°€ν•˜λ©΄ μ˜λ„μΉ˜ μ•Šμ€ μ• λ‹ˆλ©”μ΄μ…˜κ³Ό μ„±λŠ₯ 문제λ₯Ό μΌμœΌν‚¬ 수 μžˆμŠ΅λ‹ˆλ‹€. λ˜ν•œ, μ• λ‹ˆλ©”μ΄μ…˜μ€ μ „μ • μš΄λ™ μž₯μ• κ°€ μžˆλŠ” μ‚¬μš©μžμ—κ²Œ 문제λ₯Ό μœ λ°œν•  수 μžˆμŠ΅λ‹ˆλ‹€.
**쑰치:** CSS νŠΈλžœμ§€μ…˜μ„ μΆ”κ°€ν•  λ•Œ `transition: all` λŒ€μ‹  속성(`background-color`, `outline-color` λ“±)을 λͺ…μ‹œμ μœΌλ‘œ μ§€μ •ν•˜μ‹­μ‹œμ˜€. 접근성을 μœ„ν•΄ 항상 `@media (prefers-reduced-motion: reduce)` μ˜€λ²„λΌμ΄λ“œλ₯Ό ν¬ν•¨ν•˜μ—¬ `transition: none`으둜 μ„€μ •ν•˜μ‹­μ‹œμ˜€.

## 2024-07-10 - 닀크 λͺ¨λ“œ 지원 및 μ§€μ—­ν™” 일관성 확보
**Learning:** `html4tree` CLI둜 μƒμ„±λ˜λŠ” 정적 HTMLμ—μ„œ μ‚¬μš©μžλŠ” λ„€μ΄ν‹°λΈŒ 닀크 λͺ¨λ“œλ₯Ό κΈ°λŒ€ν•˜λ©°(μ ‘κ·Όμ„±, 가독성 문제), `<nav>` λ ˆμ΄λΈ”("Directory listing")이 λ‹€λ₯Έ UI와 λ‹€λ₯΄κ²Œ 영문으둜 λ˜μ–΄ μžˆμ–΄ 슀크린 리더 ν™˜κ²½ λ“±μ—μ„œ μ§€μ—­ν™”(Localization) 일관성을 ν•΄μΉ©λ‹ˆλ‹€.
**Action:** `prefers-color-scheme: dark` λ―Έλ””μ–΄ 쿼리λ₯Ό CSS에 μΆ”κ°€ν•˜μ—¬ λ„€μ΄ν‹°λΈŒ 닀크 λͺ¨λ“œλ₯Ό μ§€μ›ν•˜κ³ , `<nav aria-label="Directory listing">`을 `<nav aria-label="디렉토리 λͺ©λ‘">`으둜 μˆ˜μ •ν•˜μ—¬ UIλ₯Ό ν•œκ΅­μ–΄λ‘œ ν†΅μΌν–ˆμŠ΅λ‹ˆλ‹€.
## 2026-07-13 - Add title attributes for parity with aria-labels
**Learning:** Relying solely on icons or technical symbols (like `..`) without native tooltips can confuse sighted users who don't use screen readers. `title` attributes matching `aria-label` provide parity.
**Action:** Add `title` attributes to icon-only links to ensure visual tooltips match screen reader text.
**ν•™μŠ΅:** `html4tree` CLI둜 μƒμ„±λ˜λŠ” 정적 HTMLμ—μ„œ μ‚¬μš©μžλŠ” λ„€μ΄ν‹°λΈŒ 닀크 λͺ¨λ“œλ₯Ό κΈ°λŒ€ν•˜λ©°(μ ‘κ·Όμ„±, 가독성 문제), `<nav>` λ ˆμ΄λΈ”("Directory listing")이 λ‹€λ₯Έ UI와 λ‹€λ₯΄κ²Œ 영문으둜 λ˜μ–΄ μžˆμ–΄ 슀크린 리더 ν™˜κ²½ λ“±μ—μ„œ μ§€μ—­ν™”(Localization) 일관성을 ν•΄μΉ©λ‹ˆλ‹€.
**쑰치:** `prefers-color-scheme: dark` λ―Έλ””μ–΄ 쿼리λ₯Ό CSS에 μΆ”κ°€ν•˜μ—¬ λ„€μ΄ν‹°λΈŒ 닀크 λͺ¨λ“œλ₯Ό μ§€μ›ν•˜κ³ , `<nav aria-label="Directory listing">`을 `<nav aria-label="디렉토리 λͺ©λ‘">`으둜 μˆ˜μ •ν•˜μ—¬ UIλ₯Ό ν•œκ΅­μ–΄λ‘œ ν†΅μΌν–ˆμŠ΅λ‹ˆλ‹€.
## 2026-07-13 - aria-labels와 λ™μΌν•œ title 속성 μΆ”κ°€
**ν•™μŠ΅:** λ„€μ΄ν‹°λΈŒ 툴팁 없이 μ•„μ΄μ½˜μ΄λ‚˜ 기술적인 기호(예: `..`)μ—λ§Œ μ˜μ‘΄ν•˜λ©΄ ν™”λ©΄ νŒλ…κΈ°λ₯Ό μ‚¬μš©ν•˜μ§€ μ•ŠλŠ” μ‹œκ° μž₯μ• κ°€ μ—†λŠ” μ‚¬μš©μžμ—κ²Œ ν˜Όλž€μ„ 쀄 수 μžˆμŠ΅λ‹ˆλ‹€. `aria-label`κ³Ό μΌμΉ˜ν•˜λŠ” `title` 속성은 동일성을 μ œκ³΅ν•©λ‹ˆλ‹€.
**쑰치:** μ‹œκ°μ  툴팁이 ν™”λ©΄ νŒλ…κΈ° ν…μŠ€νŠΈμ™€ μΌμΉ˜ν•˜λ„λ‘ μ•„μ΄μ½˜ μ „μš© 링크에 `title` 속성을 μΆ”κ°€ν•˜μ‹­μ‹œμ˜€.

## 2024-08-01 - λ„€μ΄ν‹°λΈŒ λΈŒλΌμš°μ € UI의 닀크 λͺ¨λ“œ 지원 κ°•μ œ
**ν•™μŠ΅:** CSS λ―Έλ””μ–΄ 쿼리(`@media (prefers-color-scheme: dark)`)λ₯Ό 톡해 닀크 λͺ¨λ“œλ₯Ό μ§€μ›ν•˜λ”λΌλ„, λΈŒλΌμš°μ €μ˜ λ„€μ΄ν‹°λΈŒ UI μš”μ†Œ(μŠ€ν¬λ‘€λ°”, κΈ°λ³Έ 폼 컨트둀, κΈ°λ³Έ λ°±κ·ΈλΌμš΄λ“œ λ“±)λŠ” ν…Œλ§ˆ 변경을 μΈμ‹ν•˜μ§€ λͺ»ν•΄ μ–΄λ‘μš΄ ν…Œλ§ˆ ν™˜κ²½μ—μ„œ 밝은 μŠ€ν¬λ‘€λ°”κ°€ ν‘œμ‹œλ˜λŠ” λ“± μ‹œκ°μ  뢈일치λ₯Ό μ΄ˆλž˜ν•©λ‹ˆλ‹€.
**쑰치:** 항상 HTML λ¬Έμ„œμ˜ `<head>` μ˜μ—­μ— `<meta name="color-scheme" content="light dark">` 메타 νƒœκ·Έλ₯Ό λͺ…μ‹œμ μœΌλ‘œ μΆ”κ°€ν•˜μ—¬ λΈŒλΌμš°μ € μˆ˜μ€€μ—μ„œ μ‚¬μš©μžμ˜ μ‹œμŠ€ν…œ ν…Œλ§ˆ(닀크 λͺ¨λ“œ λ“±)λ₯Ό μ™„μ „νžˆ 상속받아 일관성 μžˆλŠ” λ„€μ΄ν‹°λΈŒ UIλ₯Ό λ Œλ”λ§ν•˜λ„λ‘ 보μž₯ν•˜μ‹­μ‹œμ˜€.

## 2024-07-13 - 빈 디렉토리 μƒνƒœμ˜ μ ‘κ·Όμ„±(Accessibility) κ°œμ„ 
**Learning:** 정적 파일 μ„œλ²„μ˜ 빈 디렉토리 μƒνƒœλŠ” 슀크린 리더 μ‚¬μš©μžμ—κ²Œ 컨텐츠 λˆ„λ½μœΌλ‘œ μ˜€ν•΄λ°›μ„ 수 있으며, μ‹œκ°μ μœΌλ‘œλ„ 일반 리슀트 μ•„μ΄ν…œκ³Ό 정렬이 λ§žμ§€ μ•ŠλŠ” λ¬Έμ œκ°€ μžˆμ—ˆμŠ΅λ‹ˆλ‹€.
**Action:** 빈 μƒνƒœλ₯Ό λ‚˜νƒ€λ‚΄λŠ” μš”μ†Œμ— `role="status"`λ₯Ό μΆ”κ°€ν•˜μ—¬ 슀크린 리더가 λͺ…ν™•ν•˜κ²Œ 인지할 수 μžˆλ„λ‘ ν•˜κ³ , μ•„μ΄μ½˜κ³Ό flex λ ˆμ΄μ•„μ›ƒμ„ 톡해 λ‹€λ₯Έ 리슀트 μ•„μ΄ν…œκ³Ό μΌκ΄€λœ μ‹œκ°μ  흐름을 μ œκ³΅ν•˜λ„λ‘ ν•©λ‹ˆλ‹€.
**ν•™μŠ΅:** 정적 파일 μ„œλ²„μ˜ 빈 디렉토리 μƒνƒœλŠ” 슀크린 리더 μ‚¬μš©μžμ—κ²Œ 컨텐츠 λˆ„λ½μœΌλ‘œ μ˜€ν•΄λ°›μ„ 수 있으며, μ‹œκ°μ μœΌλ‘œλ„ 일반 리슀트 μ•„μ΄ν…œκ³Ό 정렬이 λ§žμ§€ μ•ŠλŠ” λ¬Έμ œκ°€ μžˆμ—ˆμŠ΅λ‹ˆλ‹€.
**쑰치:** 빈 μƒνƒœλ₯Ό λ‚˜νƒ€λ‚΄λŠ” μš”μ†Œμ— `role="status"`λ₯Ό μΆ”κ°€ν•˜μ—¬ 슀크린 리더가 λͺ…ν™•ν•˜κ²Œ 인지할 수 μžˆλ„λ‘ ν•˜κ³ , μ•„μ΄μ½˜κ³Ό flex λ ˆμ΄μ•„μ›ƒμ„ 톡해 λ‹€λ₯Έ 리슀트 μ•„μ΄ν…œκ³Ό μΌκ΄€λœ μ‹œκ°μ  흐름을 μ œκ³΅ν•˜λ„λ‘ ν•©λ‹ˆλ‹€.

## 2024-08-09 - λͺ¨λ°”일 ν™˜κ²½μ„ μœ„ν•œ ν„°μΉ˜ νƒ€κ²Ÿ 크기 μ΅œμ ν™”
**ν•™μŠ΅:** λͺ¨λ°”일 κΈ°κΈ° λ“± ν„°μΉ˜ μΈν„°νŽ˜μ΄μŠ€μ—μ„œ λ§ν¬λ‚˜ λ²„νŠΌμ˜ μƒν•˜ νŒ¨λ”©μ΄ μΆ©λΆ„ν•˜μ§€ μ•ŠμœΌλ©΄(예: `0.5rem`) ν„°μΉ˜ νƒ€κ²Ÿ 크기가 μž‘μ•„μ Έ μ‚¬μš©μžκ°€ μ‹€μˆ˜λ‘œ λ‹€λ₯Έ ν•­λͺ©μ„ νƒ­ν•˜κΈ° 쉽고 μ‘°μž‘μ„±μ΄ λ–¨μ–΄μ§‘λ‹ˆλ‹€. WCAGλŠ” μ΅œμ†Œ 44x44 CSS ν”½μ…€μ˜ ν„°μΉ˜ νƒ€κ²Ÿμ„ ꢌμž₯ν•©λ‹ˆλ‹€.
**쑰치:** 클릭 κ°€λŠ₯ν•œ μš”μ†Œ(예: `a` νƒœκ·Έ 및 `.empty-dir` λ“±)의 μƒν•˜ νŒ¨λ”©μ„ 늘렀(예: `padding: 0.75rem 0.5rem;`) ν„°μΉ˜ νƒ€κ²Ÿ 크기λ₯Ό ν™•λ³΄ν•˜κ³  λͺ¨λ°”일 μ‚¬μš©μ„±μ„ κ°œμ„ ν•˜μ‹­μ‹œμ˜€.
4 changes: 2 additions & 2 deletions src/main/kotlin/html4tree/main.kt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ a.dir-link {
text-align: center;
}
a {
padding: 0.5rem;
padding: 0.75rem 0.5rem;
text-decoration: none;
color: #0969da;
border-radius: 4px;
Expand All @@ -68,7 +68,7 @@ li + li {
display: flex;
align-items: flex-start;
gap: 0.5rem;
padding: 0.5rem;
padding: 0.75rem 0.5rem;
color: #656d76;
font-style: italic;
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/kotlin/html4tree/GeneratedIndexReadabilityTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class GeneratedIndexReadabilityTest {
display: flex;
align-items: flex-start;
gap: 0.5rem;
padding: 0.5rem;
padding: 0.75rem 0.5rem;
color: #656d76;
font-style: italic;
}
Expand Down
Loading