Skip to content

fix: keep the vote and undo buttons the same width while they work - #1211

Open
sulimanbenhalim wants to merge 1 commit into
dev-null-sh:productionfrom
sulimanbenhalim:fix/busy-button-widths
Open

sulimanbenhalim wants to merge 1 commit into
dev-null-sh:productionfrom
sulimanbenhalim:fix/busy-button-widths

Conversation

@sulimanbenhalim

@sulimanbenhalim sulimanbenhalim commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Vote and Undo swap to Voting… and Restoring… while their request runs and grow to fit it so the button jumps left by 21px and 40px
  • now both keep the width of their longer label like the frontend guideline asks for buttons whose labels change

Changes

  • min-w-19 on the poll's Vote button and min-w-30 on the Undo button in the deleted commit toast
  • each is the smallest step that fits the busy label as the app renders it (75.2px and 119.1px)

Validation

  • lint types type coverage build and the full pest suite pass (4529 tests with 100% coverage)
  • bun run test:unit has one failure that production already has since 80cca8f4 (fix: pooling) and it fails the same way without this change
  • held each request open in headless chrome while signed in and measured both buttons idle and busy at 1440x900 1366x650 390x844 375x667 and 360x780 in light and dark
  • before they grew by 20.8px and 39.7px and Vote logged a layout-shift each time
  • after both keep one width and one left edge and nothing logs a layout-shift
  • the held vote request was failed on purpose so nothing got posted and the undo one went through and restored the commit

Visual evidence

each image is the button at rest on top and while its request runs below

before after

Device verification

  • desktop chrome at 1440x900 and 1366x650 and chrome emulating 390x844 375x667 and 360x780 phones (no hardware) since this is a button width and not a touch interaction
  • the wider Undo still fits its toast without squeezing the text down to 360px

Independent review

  • read-only Claude agent: CODE PASS and VISUAL PASS on base e83d7c04 head 4493598b after a VISUAL FAIL round that caught Reply and Quote wrapping at rest on 390px and 375px phones so they were taken out

Limitations

  • widths were measured in chrome only
  • under about 352px (like a foldable cover screen) the countdown line next to Undo now wraps at rest instead of only while restoring and it stays inside the toast
  • Reply and Quote have the same jump but I left them out since reserving Replying… or Quoting… makes them wrap at rest in their footers on 390px and 375px phones

Summary by CodeRabbit

  • Style
    • Added minimum widths to the Vote and undo buttons for more consistent sizing.

@coderabbitai

coderabbitai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b9dbecd4-dd27-4be3-8fde-7da13dcf11c6
Commits

Reviewing files that changed from the base of the PR and between e83d7c0 and 4493598.

Files selected for processing: 2
  • resources/js/components/commit-poll.tsx
  • resources/js/components/commit-undo-toast.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

Walkthrough

The Vote button now has the min-w-19 class. The undo button now has the min-w-30 class.

Changes: Button widths

Layer / File(s) Summary
Set button minimum widths
resources/js/components/commit-poll.tsx, resources/js/components/commit-undo-toast.tsx
The Vote button uses min-w-19. The undo button uses min-w-30.

Priority: Low

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Bug fix

Possibly related PRs

Suggested reviewers: xheaven

Merge Risk: Minimal · up to 44935

The scoped presentation change introduces no actionable merge-blocking risk.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within survi… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly describes the main change: keeping the Vote and Undo buttons at a consistent width during their busy states.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 2 functions across 2 files.

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant