Skip to content

fix(ui): standardize action button sizes (#1440)#2199

Open
VIDYANKSHINI wants to merge 2 commits into
Priyanshu-byte-coder:mainfrom
VIDYANKSHINI:fix-button-sizing
Open

fix(ui): standardize action button sizes (#1440)#2199
VIDYANKSHINI wants to merge 2 commits into
Priyanshu-byte-coder:mainfrom
VIDYANKSHINI:fix-button-sizing

Conversation

@VIDYANKSHINI
Copy link
Copy Markdown
Contributor

@VIDYANKSHINI VIDYANKSHINI commented Jun 8, 2026

Summary

Standardized action button sizes and styles across the dashboard to resolve visual alignment jitter and inconsistent padding/heights.

Closes #1440


Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Refactor / code cleanup

Changes Made

  • Updated the core Button component (src/components/ui/button.tsx) to explicitly use a h-10 default height, rounded-xl border radius, and unified styling.
  • Refactored DashboardHeader.tsx to use the standard Button variants for the share profile link and mobile menu toggle.
  • Replaced inline styled buttons in GoalTracker.tsx (refresh, "+1", trash, and submit buttons) with standard semantic Button components.
  • Standardized confirmation and cancellation buttons in ConfirmModal.tsx and SignOutButton.tsx.
  • Updated action links and buttons in RepoCard.tsx to use uniform padding and heights.
  • Ran and updated Playwright visual snapshot tests for the dashboard header to catch any future layout regressions.

How to Test

Steps for the reviewer to verify this works:

  1. Open the dashboard and check the header buttons (Hamburger menu, Share Profile).
  2. Look at the GoalTracker widget and verify the "+1", delete, refresh, and submit buttons have consistent heights and hover states.
  3. Open a ConfirmModal (e.g., attempt to delete a goal) or trigger the SignOutButton to ensure the modal action buttons are aligned and styled consistently.
  4. Verify the RepoCard buttons have uniform padding.

Screenshots (if UI change)


Checklist

  • Linked issue in summary
  • npm run lint passes locally
  • No TypeScript errors (npm run type-check)
  • Self-reviewed the diff
  • Added/updated tests if applicable (Visual snapshot tests updated)

Accessibility Checklist

  • Proper keyboard navigation tested (all buttons are reachable via Tab and show focus rings)
  • Responsive UI verified
  • Accessibility labels added where needed (aria-label used correctly on icon buttons)

Additional Notes

By centralizing the action buttons around the core UI Button component, future additions to the dashboard should automatically inherit the correct spacing, sizing, and premium visual aesthetic.

Copilot AI review requested due to automatic review settings June 8, 2026 07:57
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 8, 2026

@VIDYANKSHINI is attempting to deploy a commit to the PRIYANSHU DOSHI's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added gssoc26 GSSoC 2026 contribution type:bug GSSoC type bonus: bug fix type:design GSSoC type bonus: UI/design (+10 pts) type:testing GSSoC type bonus: tests (+10 pts) labels Jun 8, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 8, 2026

GSSoC Label Checklist 🏷️

@Priyanshu-byte-coder — 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

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR standardizes button styling across the UI by adopting the shared Button component / buttonVariants utility and updates the base button design tokens (radius, typography, focus rings, transitions).

Changes:

  • Updated base button variant styles (radius, font weight, focus ring, sizing, and variant-specific classes).
  • Replaced bespoke <button> styling in multiple components with the shared Button component.
  • Replaced bespoke link/button styles with buttonVariants() where a real button component isn’t used.

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/components/ui/button.tsx Updates global button styling and variant/size class definitions.
src/components/repo-analytics/RepoCard.tsx Uses buttonVariants for link styling and Button for actions.
src/components/SignOutButton.tsx Replaces custom sign-out buttons with shared Button variants.
src/components/GoalTracker.tsx Replaces multiple custom buttons (sync, +1, delete, copy link, submit) with Button.
src/components/DashboardHeader.tsx Uses buttonVariants for links and Button for mobile menu toggle.
src/components/ConfirmModal.tsx Converts modal actions to shared Button variants.
src/app/dashboard/page.tsx Normalizes the first import line (likely removes stray BOM/formatting).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/components/ui/button.tsx Outdated

const buttonVariants = cva(
"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-[var(--ring)] disabled:pointer-events-none disabled:opacity-50",
"inline-flex items-center justify-center whitespace-nowrap rounded-xl text-sm font-semibold transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-[var(--accent)] disabled:pointer-events-none disabled:opacity-50 gap-2 active:scale-[0.98]",
Comment thread src/components/ui/button.tsx Outdated

const buttonVariants = cva(
"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-[var(--ring)] disabled:pointer-events-none disabled:opacity-50",
"inline-flex items-center justify-center whitespace-nowrap rounded-xl text-sm font-semibold transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-[var(--accent)] disabled:pointer-events-none disabled:opacity-50 gap-2 active:scale-[0.98]",
Comment thread src/components/ui/button.tsx Outdated
"bg-[var(--accent)] text-[var(--accent-foreground)] shadow hover:opacity-90",
destructive:
"bg-[var(--destructive)] text-white shadow-sm hover:opacity-90",
"border border-[var(--destructive)]/50 bg-[var(--destructive)]/80 text-[var(--foreground)] shadow hover:bg-[var(--destructive)]",
Comment on lines +584 to +595
<Button
variant="ghost"
size="icon"
onClick={() => setConfirmingId(goal.id)}
disabled={isDeleting}
className="text-[var(--muted-foreground)] hover:text-[var(--destructive)] transition-colors disabled:opacity-50"
aria-label={`Delete goal: ${goal.title}`}
title="Delete goal"
>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" className="w-4 h-4" aria-hidden="true">
<path fillRule="evenodd" d="M8.75 1A2.75 2.75 0 006 3.75v.443c-.795.077-1.584.176-2.365.298a.75.75 0 10.23 1.482l.149-.022.841 10.518A2.75 2.75 0 007.596 19h4.807a2.75 2.75 0 002.742-2.53l.841-10.52.149.023a.75.75 0 00.23-1.482A41.03 41.03 0 0014 4.193V3.75A2.75 2.75 0 0011.25 1h-2.5zM10 4c.84 0 1.673.025 2.5.075V3.75c0-.69-.56-1.25-1.25-1.25h-2.5c-.69 0-1.25.56-1.25 1.25v.325C8.327 4.025 9.16 4 10 4zM8.58 7.72a.75.75 0 00-1.5.06l.3 7.5a.75.75 0 101.5-.06l-.3-7.5zm4.34.06a.75.75 0 10-1.5-.06l-.3 7.5a.75.75 0 101.5.06l.3-7.5z" clipRule="evenodd" />
</svg>
</button>
</Button>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc26 GSSoC 2026 contribution type:bug GSSoC type bonus: bug fix type:design GSSoC type bonus: UI/design (+10 pts) type:testing GSSoC type bonus: tests (+10 pts)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Inconsistent action button sizes across dashboard causing alignment jitter

2 participants