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
31 changes: 18 additions & 13 deletions .jules/palette.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,29 +26,34 @@
**ν•™μŠ΅:** ν•˜λ“œμ½”λ”©λœ 인라인 색상(예: `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 - κΈ΄ 파일 μ΄λ¦„μ—μ„œ μ•„μ΄μ½˜ μ •λ ¬ 어긋남 λ°©μ§€
**ν•™μŠ΅:** λͺ…μ‹œμ μΈ ν”Œλ ‰μŠ€λ°•μŠ€ μ€„λ°”κΏˆμ΄ μ—†λŠ” μœ λ™μ  λ ˆμ΄μ•„μ›ƒμ—μ„œ 맀우 κΈ΄ 파일 이름은 μ•žμ˜ 인라인 μ•„μ΄μ½˜ μ•„λž˜λ‘œ ν…μŠ€νŠΈλ₯Ό μ€„λ°”κΏˆν•˜μ—¬ μ‹œκ°μ  계측과 정렬을 깨뜨릴 수 μžˆμŠ΅λ‹ˆλ‹€.
**쑰치:** 파일/디렉토리 λͺ©λ‘μ„ `align-items: flex-start`κ°€ μžˆλŠ” ν”Œλ ‰μŠ€ μ»¨ν…Œμ΄λ„ˆλ‘œ 항상 감싸고, `<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-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-13 - 빈 디렉토리 μƒνƒœμ˜ μ ‘κ·Όμ„±(Accessibility) κ°œμ„ 
**Learning:** 정적 파일 μ„œλ²„μ˜ 빈 디렉토리 μƒνƒœλŠ” 슀크린 리더 μ‚¬μš©μžμ—κ²Œ 컨텐츠 λˆ„λ½μœΌλ‘œ μ˜€ν•΄λ°›μ„ 수 있으며, μ‹œκ°μ μœΌλ‘œλ„ 일반 리슀트 μ•„μ΄ν…œκ³Ό 정렬이 λ§žμ§€ μ•ŠλŠ” λ¬Έμ œκ°€ μžˆμ—ˆμŠ΅λ‹ˆλ‹€.
**Action:** 빈 μƒνƒœλ₯Ό λ‚˜νƒ€λ‚΄λŠ” μš”μ†Œμ— `role="status"`λ₯Ό μΆ”κ°€ν•˜μ—¬ 슀크린 리더가 λͺ…ν™•ν•˜κ²Œ 인지할 수 μžˆλ„λ‘ ν•˜κ³ , μ•„μ΄μ½˜κ³Ό flex λ ˆμ΄μ•„μ›ƒμ„ 톡해 λ‹€λ₯Έ 리슀트 μ•„μ΄ν…œκ³Ό μΌκ΄€λœ μ‹œκ°μ  흐름을 μ œκ³΅ν•˜λ„λ‘ ν•©λ‹ˆλ‹€.
**ν•™μŠ΅:** 정적 파일 μ„œλ²„μ˜ 빈 디렉토리 μƒνƒœλŠ” 슀크린 리더 μ‚¬μš©μžμ—κ²Œ 컨텐츠 λˆ„λ½μœΌλ‘œ μ˜€ν•΄λ°›μ„ 수 있으며, μ‹œκ°μ μœΌλ‘œλ„ 일반 리슀트 μ•„μ΄ν…œκ³Ό 정렬이 λ§žμ§€ μ•ŠλŠ” λ¬Έμ œκ°€ μžˆμ—ˆμŠ΅λ‹ˆλ‹€.
**쑰치:** 빈 μƒνƒœλ₯Ό λ‚˜νƒ€λ‚΄λŠ” μš”μ†Œμ— `role="status"`λ₯Ό μΆ”κ°€ν•˜μ—¬ 슀크린 리더가 λͺ…ν™•ν•˜κ²Œ 인지할 수 μžˆλ„λ‘ ν•˜κ³ , μ•„μ΄μ½˜κ³Ό flex λ ˆμ΄μ•„μ›ƒμ„ 톡해 λ‹€λ₯Έ 리슀트 μ•„μ΄ν…œκ³Ό μΌκ΄€λœ μ‹œκ°μ  흐름을 μ œκ³΅ν•˜λ„λ‘ ν•©λ‹ˆλ‹€.

## 2024-08-05 - 빈 디렉토리 μ•„μ΄μ½˜ 메타포
**ν•™μŠ΅:** 빈 디렉토리λ₯Ό λ‚˜νƒ€λ‚Ό λ•Œ 정보 μ•„μ΄μ½˜(`&#8505;`)을 μ‚¬μš©ν•˜λ©΄ 일반적인 파일 디렉토리 μ•„μ΄μ½˜ 메타포와 μ‹œκ°μ μΈ 뢈일치λ₯Ό λ°œμƒμ‹œν‚¬ 수 μžˆμŠ΅λ‹ˆλ‹€. μ—΄λ¦° 폴더 μ•„μ΄μ½˜(`&#128194;`)을 μ‚¬μš©ν•˜λ©΄ μ‚¬μš©μžκ°€ ν•΄λ‹Ή μƒνƒœκ°€ 디렉토리와 관련됨을 더 μ§κ΄€μ μœΌλ‘œ 인식할 수 μžˆμŠ΅λ‹ˆλ‹€.
**쑰치:** 빈 디렉토리 μƒνƒœλ₯Ό ν‘œμ‹œν•  λ•Œ κΈ°μ‘΄ 정보 μ•„μ΄μ½˜(`&#8505;`) λŒ€μ‹  μ—΄λ¦° 폴더λ₯Ό μ˜λ―Έν•˜λŠ” μ•„μ΄μ½˜(`&#128194;`)을 μ‚¬μš©ν•˜μ—¬ 일반 디렉토리(`&#128193;`)와 μ‹œκ°μ  일관성을 μœ μ§€ν•˜κ³  의미λ₯Ό λͺ…ν™•νžˆ ν•˜μ‹­μ‹œμ˜€.
2 changes: 1 addition & 1 deletion src/main/kotlin/html4tree/main.kt
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ fun process_dir(curr_dir: File, excludeSet: Set<String>? = null, dirFiles: Array
}

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

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 @@ -62,7 +62,7 @@ class GeneratedIndexReadabilityTest {

val generatedHtml = generatedHtml()
val expectedEmptyRow =
"""<li><div class="empty-dir" role="status"><span class="icon" aria-hidden="true">&#8505;</span> <span>이 λ””λ ‰ν† λ¦¬λŠ” λΉ„μ–΄ μžˆμŠ΅λ‹ˆλ‹€.</span></div></li>"""
"""<li><div class="empty-dir" role="status"><span class="icon" aria-hidden="true">&#128194;</span> <span>이 λ””λ ‰ν† λ¦¬λŠ” λΉ„μ–΄ μžˆμŠ΅λ‹ˆλ‹€.</span></div></li>"""

assertTrue(generatedHtml.contains(expectedEmptyRow))
assertTrue(generatedHtml.indexOf(expectedEmptyRow) == generatedHtml.lastIndexOf(expectedEmptyRow))
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 @@ -96,6 +96,7 @@ class MainTest {
assertTrue(htmlContent.contains("이 λ””λ ‰ν† λ¦¬λŠ” λΉ„μ–΄ μžˆμŠ΅λ‹ˆλ‹€."))
assertTrue(htmlContent.contains("role=\"status\""))
assertTrue(htmlContent.contains("role=\"list\""))
assertTrue(htmlContent.contains("&#128194;"))
}

@Test
Expand Down
Loading