Skip to content

fix: keep the embed copy button the same width once copied - #1207

Open
sulimanbenhalim wants to merge 1 commit into
dev-null-sh:productionfrom
sulimanbenhalim:fix/copy-embed-button-width
Open

sulimanbenhalim wants to merge 1 commit into
dev-null-sh:productionfrom
sulimanbenhalim:fix/copy-embed-button-width

Conversation

@sulimanbenhalim

@sulimanbenhalim sulimanbenhalim commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • clicking Copy Markdown under the activity graph embed shrinks the button to fit Copied so its hover box (and the keyboard focus ring) drops from 150px to 90px under the pointer and its left edge jumps 60px
  • two seconds later it grows back on its own which shows up as a layout shift with no input to excuse it
  • now the button keeps one width in both states and the label keeps the right edge it has today

Changes

  • min-w-38 justify-end on the copy button in activity-graph-embed.tsx
  • min-w-38 is the smallest step that fits Copy Markdown with its icon (152px vs 150px) like the commit button's min-w-30
  • justify-end keeps the shorter Copied label where it sits today instead of centering it

Validation

  • lint types JS tests and build pass locally plus the full pest suite with 100% coverage (4529 tests)
  • measured signed in at 1440x900 1366x650 and 390x844 in light and dark with the pointer resting on the button
  • before the button went from 150px to 90px and back and a layout-shift observer logged a shift without recent input every time Copied turned back into Copy Markdown
  • after it stays 152px in both states and the observer logs nothing

Visual evidence

before after

Device verification

  • desktop chrome at 1440x900 and 1366x650 and chrome emulating a 390x844 phone (no hardware)
  • phones have no hover box so there the only difference is the layout shift going away and the label looks the same as today

Independent review

  • read-only Claude agent: CODE PASS and VISUAL PASS on base 75c969e1 head 5dd8ebfd after a VISUAL FAIL round that caught the first captures missing the hover box and a centered label moving

Limitations

  • None

Summary by CodeRabbit

  • Style
    • The copy button now has a minimum width and right-aligned contents.

@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: a4b28254-df6d-4796-b6f1-65ca1906ad71
Commits

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

Files selected for processing: 1
  • resources/js/components/activity-graph-embed.tsx

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

Walkthrough

The copy button in the activity graph embed now has a minimum width of 38 and right-justified contents.

Changes: Copy button alignment

Layer / File(s) Summary
Copy button styling
resources/js/components/activity-graph-embed.tsx
The copy button gains min-w-38 and justify-end classes.

Priority: Low

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

Change: Bug fix

Suggested reviewers: mnapoli

Merge Risk: Minimal · up to 5dd8e

The copy button styling change is ready to merge.

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. Analyzed 1 functions across 1 files. 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 and concisely describes the main change: keeping the embed copy button width consistent after copying.
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.
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