Repository navigation
Collections sidenav folder icon should reflect expanded/collapsed state - #943
Conversation
…denav (closes #939) Conditionally render open/closed folder SVG in the Collections Collapsible.Trigger based on collectionsExpanded state. Open variant adds a horizontal line across the folder body (Lucide folder-open style) using the same stroke/dimensions. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Code Review SummaryReview Type: Initial Review This is a single-file, single-commit change with a clear, scoped purpose: making the Collections folder icon reflect the expanded/collapsed state. The implementation is correct and the change is a net improvement. There are two findings worth noting — one minor improvement opportunity and one nit. Requirements Check
All acceptance criteria are met. Code Review FindingsSuggested Improvements
A more DRY approach renders a single SVG and conditionally includes the extra path: <svg class="nav-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z" />
{#if collectionsExpanded}
<path d="M2 10h20" />
{/if}
</svg>This is functionally equivalent and aligns with the DRY principle, which is more important to enforce early when the icon style may still be evolving. NitpicksNit: RecommendationAPPROVE — The change correctly implements all acceptance criteria with reactive, persisted state. The duplication finding is a legitimate improvement but not a blocker given the project's no-users, greenfield status. The fix is straightforward and can be addressed in a follow-up or inline before merge at the author's discretion. |
malibio
left a comment
There was a problem hiding this comment.
All acceptance criteria met. See inline comment for two minor findings (one DRY improvement, one accessibility nit). Neither is a blocker. Recommendation: APPROVE.
…gger - Merged duplicate <svg> elements into one with a conditional inner <path> - Added dynamic aria-label to Collapsible.Trigger reflecting expanded/collapsed state, consistent with existing sidebar interactive elements Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Review Feedback AddressedBoth recommendations from the initial review have been addressed in commit 0b13487: ✅ SVG duplication (🟡 Important) ✅ Missing aria-label (🟢 Suggestion) No items were skipped. |
…te (#943) * Fix folder icon to reflect expanded/collapsed state in collections sidenav (closes #939) Conditionally render open/closed folder SVG in the Collections Collapsible.Trigger based on collectionsExpanded state. Open variant adds a horizontal line across the folder body (Lucide folder-open style) using the same stroke/dimensions. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * Address review: deduplicate SVG and add aria-label to collections trigger - Merged duplicate <svg> elements into one with a conditional inner <path> - Added dynamic aria-label to Collapsible.Trigger reflecting expanded/collapsed state, consistent with existing sidebar interactive elements Co-Authored-By: Claude Sonnet 4.6 <[email protected]> --------- Co-authored-by: Claude Sonnet 4.6 <[email protected]>
Closes #939