Skip to content

Make sponsor button less annoying - #1173

Merged
saeedvaziry merged 2 commits into
4.xfrom
make-sponsor-button-less-annoy-u93rc
Jun 18, 2026
Merged

Make sponsor button less annoying#1173
saeedvaziry merged 2 commits into
4.xfrom
make-sponsor-button-less-annoy-u93rc

Conversation

@saeedvaziry

@saeedvaziry saeedvaziry commented Jun 18, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • New Features

    • Updated the sponsor button in the application header with a more refined, icon-only design and interactive tooltip, providing a cleaner and more streamlined header navigation experience.
  • Chores

    • Strengthened database migration safety and reliability by implementing additional validation checks to prevent potential errors during schema modifications and rollback operations.

@coderabbitai

coderabbitai Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Two unrelated fixes: the add_name_to_cron_jobs_table migration gains column-existence guards in both up() and down() to make it idempotent. The AppHeader sponsor button is replaced with an icon-only button wrapped in a Tooltip component.

Changes

Migration Idempotency Guards

Layer / File(s) Summary
Column-existence guards in up() and down()
database/migrations/2026_01_09_170832_add_name_to_cron_jobs_table.php
up() checks for the name column's presence and returns early if it already exists. down() checks for the column's absence and returns early before attempting to drop the index and column.

Sponsor Button UI Change

Layer / File(s) Summary
Tooltip-wrapped icon-only sponsor button
resources/js/components/app-header.tsx
The sm outline button with a responsive hidden text span is replaced by an icon outline button wrapped in a Tooltip. The button carries an aria-label="Sponsor" and the tooltip displays the Sponsor label.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~4 minutes

🚥 Pre-merge checks | ✅ 4
✅ 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 accurately reflects the main change: the sponsor button was modified to be less obtrusive by converting it from a text button to an icon-only button with a tooltip.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch make-sponsor-button-less-annoy-u93rc

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@saeedvaziry
saeedvaziry changed the base branch from 3.x to 4.x June 18, 2026 18:35

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@resources/js/components/app-header.tsx`:
- Line 61: The HeartIcon component uses a hard-coded color class text-pink-600
and is missing a size class for consistency with other icons in the header.
Replace the text-pink-600 class with a semantic token (such as text-sponsor)
that should be defined in your theme configuration, and add the size-4 class to
the HeartIcon to match the sizing of the WifiIcon and WifiOffIcon components
above it.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 9cd9a54b-cdd2-4657-833e-5eab49e48174

📥 Commits

Reviewing files that changed from the base of the PR and between ebe7d3a and a4a418e.

📒 Files selected for processing (2)
  • database/migrations/2026_01_09_170832_add_name_to_cron_jobs_table.php
  • resources/js/components/app-header.tsx

onClick={() => window.open('https://github.com/sponsors/saeedvaziry')}
aria-label="Sponsor"
>
<HeartIcon className="text-pink-600" />

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial | ⚡ Quick win

Use a semantic token instead of hard-coded colour; add size class for consistency.

The HeartIcon uses text-pink-600, which violates the guideline to avoid hard-coded colours. Additionally, the icon lacks a size class, whilst the WifiIcon and WifiOffIcon above use size-4.

Consider defining a custom semantic token (e.g., text-sponsor) in your theme for the sponsor heart, or use an existing semantic colour. Also add size-4 to match the sizing of other icons in this header.

♻️ Proposed fix
-              <HeartIcon className="text-pink-600" />
+              <HeartIcon className="size-4 text-pink-600" />

Then update your theme configuration to define a semantic token for sponsor/heart colour and replace text-pink-600 with that token.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@resources/js/components/app-header.tsx` at line 61, The HeartIcon component
uses a hard-coded color class text-pink-600 and is missing a size class for
consistency with other icons in the header. Replace the text-pink-600 class with
a semantic token (such as text-sponsor) that should be defined in your theme
configuration, and add the size-4 class to the HeartIcon to match the sizing of
the WifiIcon and WifiOffIcon components above it.

Source: Coding guidelines

@saeedvaziry
saeedvaziry merged commit bd49970 into 4.x Jun 18, 2026
4 checks passed
@saeedvaziry
saeedvaziry deleted the make-sponsor-button-less-annoy-u93rc branch June 18, 2026 19:43
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