Jiseoup/showmycodePublic
EN|KO
  • 코드
  • 커밋
  • 풀 리퀘스트
← 목록으로
Merged

feat: toggle file tree expand/collapse with state-aware button

#10
JiseoupJiseoup · 2026년 5월 8일feat/file-tree-expand-collapse-toggle → main
feat
개요커밋변경된 파일

Related Issue

N/A

Changes

  • File tree header button now toggles between Expand All (when all collapsed) and Collapse All (when any folder is open), with state-driven icon and aria-label.
  • Replaced the previous custom chevron icon with the VSCode collapse-all codicon for visual consistency.
  • Lifted folder open/close state from individual TreeNodeItem up to FileTree (openPaths: Set<string>) so the header button can drive bulk expand/collapse.
  • Added expandAll translation keys to locales/ko.json and locales/en.json; threaded expandAllLabel through Sidebar → FileTree.
  • Added key and explicit fallback={null} to the <Suspense> wrapping BranchSelector to satisfy React's child-key validation when the element is forwarded as a prop across the server/client boundary.

How to Verify

  1. npm run dev and open any repository page (/[lang]/repository/[owner]/[repo]).
  2. Confirm the sidebar header shows a + icon when the tree is fully collapsed.
  3. Click it — every directory expands and the icon switches to −.
  4. Click again — every directory collapses and the icon returns to +.
  5. Toggle a single folder manually and verify the header icon stays as − as long as at least one folder is open.
  6. Hover the button in both states and confirm the tooltip / aria-label shows the localized "Expand All" / "Collapse All" (KO and EN).
  7. Open DevTools console and verify there is no Each child in a list should have a unique "key" prop warning.

Checklist

  • npm run format:check passes
  • npm run lint passes
  • npm run typecheck passes
  • npm run build passes
  • PR title follows Conventional Commits (feat:, fix:, chore:, refactor:, docs:, test:, )
i18n:
  • New/updated strings added to both locales/ko.json and locales/en.json (if applicable)