From 01b47ab7f59a8dd9cf1c101133a066aa5f6011cf Mon Sep 17 00:00:00 2001 From: seonghobae <8172694+seonghobae@users.noreply.github.com> Date: Sat, 1 Aug 2026 21:09:03 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Palette:=20=EB=B9=88=20=EB=94=94?= =?UTF-8?q?=EB=A0=89=ED=86=A0=EB=A6=AC=20=EC=83=81=ED=83=9C=EC=9D=98=20?= =?UTF-8?q?=EC=8B=9C=EA=B0=81=EC=A0=81=20=EC=9D=BC=EA=B4=80=EC=84=B1=20?= =?UTF-8?q?=ED=96=A5=EC=83=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 빈 디렉토리 메시지에 열린 폴더 아이콘(`📂`) 추가 - `.empty-dir` 클래스에 flexbox 스타일을 적용하여 일반 목록 항목(`.dir-link`)과 시각적 레이아웃(정렬 및 간격)을 일치시킴 - MainTest.kt의 `testGoEmptyDir`에 해당 아이콘이 렌더링되는지 확인하는 어서션 추가 - `.jules/palette.md`에 관련된 UX 학습 기록(한국어) 추가 --- .jules/palette.md | 4 ++ empty_dir_test/empty_dir/index.html | 96 +++++++++++++++++++++++++++ empty_dir_test/index.html | 96 +++++++++++++++++++++++++++ src/main/kotlin/html4tree/main.kt | 5 +- src/test/kotlin/html4tree/MainTest.kt | 1 + 5 files changed, 201 insertions(+), 1 deletion(-) create mode 100644 empty_dir_test/empty_dir/index.html create mode 100644 empty_dir_test/index.html diff --git a/.jules/palette.md b/.jules/palette.md index 9a12c9de..ac74a030 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 - 빈 상태 시각적 일관성 향상 +**학습:** 디렉토리가 비어있을 때, 아이콘이 누락되고 텍스트 정렬이 다른 항목들과 다르면 사용자 경험에 일관성이 부족해지고 가독성이 떨어집니다. 빈 상태에서도 아이콘(예: 열린 폴더 아이콘 📂)을 제공하고 정렬을 맞춰주면 디렉토리 구조의 일관성을 유지할 수 있습니다. +**조치:** 빈 디렉토리 메시지를 표시할 때, 열린 폴더 아이콘(``)을 추가하고 CSS를 `display: flex;`로 업데이트하여 일반 파일/디렉토리 목록과 시각적 레이아웃을 일치시켰습니다. diff --git a/empty_dir_test/empty_dir/index.html b/empty_dir_test/empty_dir/index.html new file mode 100644 index 00000000..afba2560 --- /dev/null +++ b/empty_dir_test/empty_dir/index.html @@ -0,0 +1,96 @@ + + + + + + + + + + + empty_dir + + + + + +
+

empty_dir

+ +
+ + diff --git a/empty_dir_test/index.html b/empty_dir_test/index.html new file mode 100644 index 00000000..a8c0f54e --- /dev/null +++ b/empty_dir_test/index.html @@ -0,0 +1,96 @@ + + + + + + + + + + + empty_dir_test + + + + + +
+

empty_dir_test

+ +
+ + 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..067e2992 100644 --- a/src/test/kotlin/html4tree/MainTest.kt +++ b/src/test/kotlin/html4tree/MainTest.kt @@ -94,6 +94,7 @@ class MainTest { val htmlContent = indexFile.readText() assertTrue(htmlContent.contains("")) assertTrue(htmlContent.contains("이 디렉토리는 비어 있습니다.")) + assertTrue(htmlContent.contains("📂")) assertTrue(htmlContent.contains("role=\"list\"")) }