Skip to content

refactor(frontend): Create SubresourceRow wrapper to eliminate mobile/desktop duplication#123

Merged
enko merged 1 commit intomainfrom
refactor/subresource-row-wrapper
Mar 8, 2026
Merged

refactor(frontend): Create SubresourceRow wrapper to eliminate mobile/desktop duplication#123
enko merged 1 commit intomainfrom
refactor/subresource-row-wrapper

Conversation

@enko
Copy link
Copy Markdown
Member

@enko enko commented Mar 8, 2026

Summary

  • Extracts the repeated SwipeableRow (mobile) / hover-actions (desktop) wrapper pattern into a new SubresourceRow component
  • Refactors all 7 row components (PhoneRow, EmailRow, AddressRow, UrlRow, DateRow, SocialProfileRow, ProfessionalHistoryRow) to use SubresourceRow with a single children snippet
  • Removes ~250 lines of duplicated wrapper markup across the codebase

Test plan

  • Verify all subresource rows render correctly on desktop (hover to reveal edit/delete actions)
  • Verify all subresource rows work correctly on mobile (swipe left to delete, swipe right to edit)
  • Check AddressRow layout with multi-line addresses
  • Verify edit and delete actions still trigger correctly for each row type
  • Confirm isDeleting spinner state displays properly

Closes #115

🤖 Generated with Claude Code

…/desktop duplication

Extract the repeated SwipeableRow (mobile) / hover-actions (desktop) wrapper
pattern into a single SubresourceRow component. Each row component now provides
its unique content once via a children snippet instead of duplicating markup
for both breakpoints.

Closes #115

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 8, 2026

🔍 Automated Code Review

Commit `607fe85`
Reviewed 2026-03-08T00:00:00Z
Status ✅ Approved

Findings

No issues found.

AGENTS.md Compliance

  • ✅ Security requirements — no injection risks; external links retain rel="noopener noreferrer"
  • ✅ Architecture patterns — Svelte 5 runes ($props, $derived, $snippet) used correctly
  • ✅ Component guidelines — focused, single-responsibility component; reusable via children snippet

Summary

Excellent refactor. Eliminating the repeated mobile/desktop wrapper pattern across 7 components (-250 lines) is exactly the right call. SubresourceRow.svelte is clean and well-structured:

  • The {#snippet rowContent()} rendered twice (mobile + desktop) is idiomatic Svelte 5 and correct.
  • Props interface is minimal and sensible with safe defaults.
  • All callers pass explicit editLabel/deleteLabel strings so the generic defaults are never exposed to users.
  • External links in UrlRow/SocialProfileRow correctly carry over target="_blank" rel="noopener noreferrer".
  • The truncate block additions on email/URL anchors improve overflow handling compared to the original.

The test plan covers the right scenarios (desktop hover, mobile swipe, multi-line address, isDeleting state). No correctness, security, or maintainability concerns found.


🤖 Automated review by Claude Code • View CI Run

@enko enko merged commit 8d029a3 into main Mar 8, 2026
5 checks passed
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 8, 2026

🎉 This PR is included in version 2.65.6 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor(frontend): Create SubresourceRow wrapper to eliminate mobile/desktop duplication

1 participant