From 2578136ffddbead7bdab33cd34f5f6bc3c099b33 Mon Sep 17 00:00:00 2001 From: seonghobae <8172694+seonghobae@users.noreply.github.com> Date: Thu, 30 Jul 2026 21:12:30 +0000 Subject: [PATCH] feat: add visual polish to empty directory state - Added flexbox alignment and an open folder icon to `.empty-dir` class - Added `aria-hidden="true"` to the decorative icon for accessibility - Appended learning to `.jules/palette.md` - Ensured 100% test coverage for the new icon in `MainTest.kt` --- .jules/palette.md | 4 ++++ src/main/kotlin/html4tree/main.kt | 5 ++++- src/test/kotlin/html4tree/MainTest.kt | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.jules/palette.md b/.jules/palette.md index 9a12c9de..0274bc06 100644 --- a/.jules/palette.md +++ b/.jules/palette.md @@ -48,3 +48,7 @@ ## 2024-08-01 - 네이티브 브라우저 UI의 다크 모드 지원 강제 **학습:** CSS 미디어 쿼리(`@media (prefers-color-scheme: dark)`)를 통해 다크 모드를 지원하더라도, 브라우저의 네이티브 UI 요소(스크롤바, 기본 폼 컨트롤, 기본 백그라운드 등)는 테마 변경을 인식하지 못해 어두운 테마 환경에서 밝은 스크롤바가 표시되는 등 시각적 불일치를 초래합니다. **조치:** 항상 HTML 문서의 `` 영역에 `` 메타 태그를 명시적으로 추가하여 브라우저 수준에서 사용자의 시스템 테마(다크 모드 등)를 완전히 상속받아 일관성 있는 네이티브 UI를 렌더링하도록 보장하십시오. + +## 2024-08-01 - [Empty State Visual Polish] +**Learning:** 빈 디렉토리 안내 메시지에 열린 폴더 아이콘(📂)과 플렉스 박스 레이아웃을 추가하여 시각적 일관성을 확보하고 사용자 경험을 개선했습니다. +**Action:** 다음 작업 시에도 빈 상태(empty state)에 적절한 아이콘과 구조적 레이아웃을 적용하여 시각적인 완성도를 높이는 패턴을 유지할 것입니다. diff --git a/src/main/kotlin/html4tree/main.kt b/src/main/kotlin/html4tree/main.kt index b4558624..59093659 100644 --- a/src/main/kotlin/html4tree/main.kt +++ b/src/main/kotlin/html4tree/main.kt @@ -304,6 +304,9 @@ fun process_dir(curr_dir: File, excludeSet: Set? = null, dirFiles: Array } } .empty-dir { + display: flex; + align-items: flex-start; + gap: 0.5rem; padding: 0.5rem; opacity: 0.7; font-style: italic; @@ -370,7 +373,7 @@ ${cssContent} } if(l.isEmpty()){ - l.append("""
  • 이 디렉토리는 비어 있습니다.
  • """) + l.append("""
  • 이 디렉토리는 비어 있습니다.
  • """) l.append('\n') } diff --git a/src/test/kotlin/html4tree/MainTest.kt b/src/test/kotlin/html4tree/MainTest.kt index 13494714..d4941391 100644 --- a/src/test/kotlin/html4tree/MainTest.kt +++ b/src/test/kotlin/html4tree/MainTest.kt @@ -95,6 +95,7 @@ class MainTest { assertTrue(htmlContent.contains("")) assertTrue(htmlContent.contains("이 디렉토리는 비어 있습니다.")) assertTrue(htmlContent.contains("role=\"list\"")) + assertTrue(htmlContent.contains("📂")) } @Test