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
24 changes: 14 additions & 10 deletions .jules/palette.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,25 +26,29 @@
**ν•™μŠ΅:** ν•˜λ“œμ½”λ”©λœ 인라인 색상(예: `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`으둜 μ„€μ •ν•˜μ‹­μ‹œμ˜€.
**ν•™μŠ΅:** 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-labelκ³Ό λ™μΌν•˜κ²Œ 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-26 - 빈 디렉토리 μƒνƒœμ˜ μ‹œκ°μ  일관성 κ°œμ„ 
**ν•™μŠ΅:** 빈 디렉토리 μƒνƒœμ—μ„œ 폴더가 μ—΄λ € μžˆλŠ” μ•„μ΄μ½˜(`&#128194;`)을 μΆ”κ°€ν•˜λ©΄ μ‚¬μš©μžκ°€ μƒνƒœλ₯Ό μ§κ΄€μ μœΌλ‘œ μ΄ν•΄ν•˜κΈ° μ’‹μŠ΅λ‹ˆλ‹€. μ΄λ•Œ μ•„μ΄μ½˜μ€ μž₯μ‹μš©μ΄λ―€λ‘œ 슀크린 리더가 λΆˆν•„μš”ν•˜κ²Œ 읽지 μ•Šλ„λ‘ `aria-hidden="true"`λ₯Ό μ μš©ν•΄μ•Ό ν•©λ‹ˆλ‹€.
**쑰치:** ν–₯ν›„ μž₯μ‹μš© 이λͺ¨μ§€λ‚˜ μ•„μ΄μ½˜μ„ μΆ”κ°€ν•  λ•ŒλŠ” λ°˜λ“œμ‹œ `aria-hidden="true"`λ₯Ό μ μš©ν•˜κ³ , μ‹œκ°μ  계측이 λ¬΄λ„ˆμ§€μ§€ μ•Šλ„λ‘ Flexboxλ₯Ό μ‚¬μš©ν•˜μ—¬ ν…μŠ€νŠΈμ™€ 정렬을 맞μΆ₯λ‹ˆλ‹€.
5 changes: 4 additions & 1 deletion src/main/kotlin/html4tree/main.kt
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,9 @@ fun process_dir(curr_dir: File, excludeSet: Set<String>? = null, dirFiles: Array
}
}
.empty-dir {
display: flex;
align-items: flex-start;
gap: 0.5rem;
padding: 0.5rem;
opacity: 0.7;
font-style: italic;
Expand Down Expand Up @@ -370,7 +373,7 @@ ${cssContent} </style>
}

if(l.isEmpty()){
l.append(""" <li><div class="empty-dir">이 λ””λ ‰ν† λ¦¬λŠ” λΉ„μ–΄ μžˆμŠ΅λ‹ˆλ‹€.</div></li>""")
l.append(""" <li><div class="empty-dir"><span class="icon" aria-hidden="true">&#128194;</span> <span>이 λ””λ ‰ν† λ¦¬λŠ” λΉ„μ–΄ μžˆμŠ΅λ‹ˆλ‹€.</span></div></li>""")
l.append('\n')
}

Expand Down
1 change: 1 addition & 0 deletions src/test/kotlin/html4tree/MainTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ class MainTest {
val htmlContent = indexFile.readText()
assertTrue(htmlContent.contains("<html lang=\"ko\">"))
assertTrue(htmlContent.contains("이 λ””λ ‰ν† λ¦¬λŠ” λΉ„μ–΄ μžˆμŠ΅λ‹ˆλ‹€."))
assertTrue(htmlContent.contains("&#128194;"))
assertTrue(htmlContent.contains("role=\"list\""))
}

Expand Down
Loading