Skip to content

feat: add share profile button to dashboard#2457

Merged
Priyanshu-byte-coder merged 1 commit into
Umbrella-io:mainfrom
Srishti-Gupta74:add-share-profile-button
Jun 16, 2026
Merged

feat: add share profile button to dashboard#2457
Priyanshu-byte-coder merged 1 commit into
Umbrella-io:mainfrom
Srishti-Gupta74:add-share-profile-button

Conversation

@Srishti-Gupta74

Copy link
Copy Markdown
Contributor

Summary

Adds a Share Profile button to the dashboard header that allows users to quickly copy their public profile URL to the clipboard. The button provides visual feedback by switching from a Link icon to a Check icon and displays a success toast after copying.

Closes #2452


Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 💥 Breaking change (fix or feature that changes existing behavior)
  • 📝 Documentation update
  • ♻️ Refactor / code cleanup (no functional change)
  • ⚡ Performance improvement
  • 🔒 Security fix
  • 🧪 Tests only

What Changed

  • Added a new ShareProfileButton component (src/components/ShareProfileButton.tsx)
  • Implemented clipboard copy functionality for public profile URLs using navigator.clipboard.writeText()
  • Added success/error toast notifications and temporary icon switching (Link2 → Check) after copying
  • Replaced the existing profile link buttons in DashboardHeader.tsx with the new reusable component for both desktop and mobile views

How to Test

  1. Run the application locally using npm run dev
  2. Navigate to the dashboard with a public profile enabled
  3. Click the Share Profile button in the dashboard header

Expected result:

  • The public profile URL is copied to the clipboard
  • A "Link copied!" success toast is displayed
  • The button icon changes from Link2 to Check for 2 seconds before reverting
  • The functionality works in both desktop and mobile layouts

Screenshots / Recordings

Before After
Share Profile opened the public profile page in a new tab Share Profile copies the public profile URL to the clipboard with visual feedback

Checklist

  • Linked the related issue above
  • Self-reviewed my own diff
  • No unnecessary console.log, debug code, or commented-out blocks
  • npm run lint passes locally
  • No TypeScript errors (npm run type-check)
  • Added or updated tests where applicable
  • Updated documentation / comments if behavior changed

Accessibility (UI changes only)

  • Keyboard navigation works correctly
  • Color contrast meets WCAG AA standard
  • ARIA labels / roles added where needed
  • Tested on mobile / responsive layout

Additional Context

The copied URL uses NEXT_PUBLIC_APP_URL when available, with a fallback to the production DevTrack URL. The Share Profile functionality is implemented as a reusable component and integrated into both desktop and mobile dashboard header layouts.

@github-actions github-actions Bot added type:bug GSSoC type bonus: bug fix type:feature GSSoC type bonus: new feature type:design GSSoC type bonus: UI/design (+10 pts) type:performance GSSoC type bonus: performance (+15 pts) gssoc26 GSSoC 2026 contribution labels Jun 15, 2026
@github-actions

Copy link
Copy Markdown

GSSoC Label Checklist 🏷️

@Umbrella-io — please apply the appropriate labels before merging:

Difficulty (pick one):

  • level:beginner — 20 pts
  • level:intermediate — 35 pts
  • level:advanced — 55 pts
  • level:critical — 80 pts

Quality (optional):

  • quality:clean — ×1.2 multiplier
  • quality:exceptional — ×1.5 multiplier

Validation (required to score):

  • gssoc:approved — counts for points
  • gssoc:invalid / gssoc:spam / gssoc:ai-slop — does not score

Type labels (type:*) are auto-detected from files and title. Review and adjust if needed.
Points formula: (difficulty × quality_multiplier) + type_bonus

@Srishti-Gupta74

Copy link
Copy Markdown
Contributor Author

Hi @Priyanshu-byte-coder! I checked the failing CI jobs and they appear to be unrelated to the changes in this PR.

The failures are currently occurring in existing Playwright tests:

  • e2e/streak.spec.ts (streak widget shows the mocked longest streak value)
  • tests/visual/visual-regression.spec.js (visual regression screenshots)

This PR only adds the Share Profile button and clipboard copy functionality in the dashboard header.

Locally, all checks pass:

  • npm run lint
  • npm run type-check
  • npm run build

Please let me know if you'd like me to investigate and fix the Playwright failures as part of this PR.

@Priyanshu-byte-coder Priyanshu-byte-coder added the gssoc:approved GSSoC: PR approved for scoring label Jun 16, 2026
@Priyanshu-byte-coder Priyanshu-byte-coder merged commit 6d45f13 into Umbrella-io:main Jun 16, 2026
12 of 14 checks passed
@github-actions

Copy link
Copy Markdown

🎉 Merged! Thanks for contributing to DevTrack.

If the project has been useful to you, a ⭐ star on the repo is the easiest way to support it — it helps DevTrack get discovered by more developers.

Keep an eye on open issues for your next contribution!

@Priyanshu-byte-coder Priyanshu-byte-coder added level:intermediate GSSoC: Intermediate difficulty (35 pts) quality:clean GSSoC: Clean quality multiplier (×1.2) labels Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc:approved GSSoC: PR approved for scoring gssoc26 GSSoC 2026 contribution level:intermediate GSSoC: Intermediate difficulty (35 pts) quality:clean GSSoC: Clean quality multiplier (×1.2) type:bug GSSoC type bonus: bug fix type:design GSSoC type bonus: UI/design (+10 pts) type:feature GSSoC type bonus: new feature type:performance GSSoC type bonus: performance (+15 pts)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[GOOD FIRST ISSUE] Add "Copy Profile Link" button to dashboard for sharing public profile URL

2 participants