Consolidate contact displays into a unified parameterized component#61
Merged
Sparkier merged 1 commit intoJul 18, 2026
Conversation
Sparkier
deleted the
jules/unified-contact-component-js0-00a60be6-48a0-41a8-8c35-207f4cfc8c90
branch
July 18, 2026 09:36
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Previously, displaying contact details on the main portfolio page and the CV/resume page relied on two separate Svelte components. This duplication introduced a maintenance bottleneck, high risk of visual drift, and split control over how profile links were handled.
To address this, we consolidated the display logic into a single, unified, and highly configurable component. This ensures a single source of truth for user profile data while preserving distinct rendering behaviors across channels (e.g., standard web browsing vs. static PDF output).
Key Decisions & Architecture
$props):We introduced two parameters to control layout behaviors dynamically:
variant('icon-only'|'labeled'): Customizes layout structure and elements.showLinks(boolean): Dynamically deactivates interactive hyperlinks when printing or generating PDFs, ensuring clean, underline-free printed assets.icon-onlyMode: Geared toward web visitors. Renders standard social platforms in a tight, centered, label-free row.labeledMode: Geared toward employers and recruiters reading the resume. Renders with full text handles, a flexible wrapping container, and a restructured sequence that prioritizes mailing location first and academic portfolios last.When
showLinksis set tofalse, the component bypasses rendering anchor (<a>) wrappers entirely, preventing visual noise and broken links on generated PDF outputs while keeping the underlying text fully readable.What Changed
src/lib/components/Contact.svelte:variant,showLinks).src/routes/cv/+page.svelte:<Contact variant="labeled" {showLinks} />.src/lib/components/cv/Contact.svelte.