Skip to content

Swap the icon for the submit spinner on icon-only buttons - #33

Merged
AbdelrhmanSaid merged 1 commit into
masterfrom
icon-button-submit-spinner
Oct 28, 2026
Merged

AbdelrhmanSaid merged 1 commit into
masterfrom
icon-button-submit-spinner

Conversation

@AbdelrhmanSaid

Copy link
Copy Markdown
Contributor

Problem

When a form passes validation, the validator in runtime.js adds <span class="spinner-border spinner-border-sm me-2"> to the start of the submit button. On an icon-only .btn-icon button, such as a search button with just a magnifier icon, the spinner shows up next to the icon, and its me-2 margin squeezes the square button.

Change

Adds two rules to redot.css under Global Styles:

  • .btn-icon > .spinner-border drops the spinner's margin.
  • .btn-icon > .spinner-border ~ * hides everything after the spinner, so the spinner replaces the icon while the form submits.

Buttons with text are not affected; they still show the spinner before their label.

Verification

Checked in Chromium against Tabler's tabler.ltr.min.css. An icon button measures 34×34 both before and during submit, with only the spinner visible. A text button still shows the spinner and its label. npx prettier --check passes.


Generated by Claude Code

The validator prepends a spinner-border with me-2 to a form's submit
button. On a .btn-icon button that shows the spinner beside the icon
and adds a margin, so the spinner now replaces the icon instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RV6XWqMdQZF31RLBxt1G2B
@greptile-apps

greptile-apps Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge.

Summary

Updates redot.css so submitting icon-only buttons show the spinner in place of their icon.

  • Icon-only submit buttons show the spinner instead of their icon.

No actionable issues were found.

Reviews (1) · Last reviewed commit: "Swap the icon for the submit spinner on ..." · Reviewed by Greptile

@AbdelrhmanSaid
AbdelrhmanSaid merged commit 531c95a into master Oct 28, 2026
3 checks passed
@AbdelrhmanSaid
AbdelrhmanSaid deleted the icon-button-submit-spinner branch October 29, 2026 06:13
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.

2 participants