Skip to content

[Feature Request] Custom Widget Designs - Open for Contributions #82

@TejasS1233

Description

@TejasS1233

Custom Widget Designs

We're looking for creative widget designs to expand our collection! This is an ongoing issue that will remain open to accept multiple widget implementations.

Current Widgets

  • Card (300×180)
  • Full (495×195)
  • Score (600×420)
  • Skills (600×400)
  • Languages (500×320)
  • Activity (800×240)
  • Commits (700×280)
  • Stats (400×120)

Widget Ideas (Feel free to suggest your own!)

  • Streak widget (showing contribution streaks)
  • Trophy/Achievement widget
  • Top repositories showcase
  • Contribution calendar (GitHub-style)
  • Language timeline (language usage over time)
  • Follower growth chart
  • Pull request stats
  • Issue resolution stats
  • Code review stats
  • Repository health score

Guidelines for Contributors

Before starting:

  1. Comment on this issue with your widget idea
  2. Wait for approval/feedback to avoid duplicate work
  3. Check existing PRs to see what's already in progress

Implementation Requirements:

  • Widget function in server/src/controllers/widget.controller.js
  • Add widget type to switch case in generateWidget()
  • Update frontend widget list in client/src/pages/WidgetGenerator.jsx
  • Add widget size to widgetSizes object
  • Support both light and dark themes
  • Support custom colors (accent, success, purple)
  • Include proper caching headers
  • SVG format with proper viewBox
  • Responsive sizing

Code Structure:

async function generateYourWidget(username, theme, customColors = {}) {
  // 1. Get colors
  const isDark = theme === "dark";
  const accent = customColors.accent || (isDark ? "#58a6ff" : "#0969da");
  
  // 2. Fetch data from cache
  const WidgetCache = (await import("../models/widgetCache.model.js")).default;
  const cached = await WidgetCache.findOne({ username }).lean();
  
  // 3. Return SVG
  return `<svg width="..." height="...">...</svg>`;
}

PR Checklist:

  • Widget renders correctly in both themes
  • Custom colors work properly
  • No console errors
  • Widget size added to frontend
  • Tested with real data
  • Screenshot included in PR

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions