Skip to content

fix(ui-core): keep the loading look on a disabled loading Button - #38176

Merged
shah-harshit merged 1 commit into
mainfrom
shah-harshit/sign-in-button-unreadable-fix
Nov 19, 2026
Merged

shah-harshit merged 1 commit into
mainfrom
shah-harshit/sign-in-button-unreadable-fix

Conversation

@shah-harshit

@shah-harshit shah-harshit commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Describe your changes:

In dark mode the Sign In button became unreadable after clicking it.

Root cause: SignInPage (and ~30 other call sites: Sign Up, Forgot Password, delete modals, SSO form, …) passes isDisabled={loading} together with isLoading. The core Button's disabled: styles then painted the disabled palette over the loading state — in dark mode text-fg-disabled (#7b7f86) on bg-disabled (#373a41), ~2.5:1 contrast.

Fix: in openmetadata-ui-core-components button.tsx, every disabled: style is now gated with Tailwind's not-data-loading: variant (compiles to :disabled:not([data-loading])). A loading button keeps its colour's existing data-loading fill, white label and spinner. The native disabled attribute is untouched, so behaviour (press/submit blocking, toBeDisabled assertions) does not change.

Collate has no sign-in page of its own — it renders the OSS SignInPage and core Button through the OSS submodule, so it picks this up on the next submodule bump.

Note: in light mode, buttons that are disabled and loading now also show the brand loading fill instead of grey — the loading look the core Button already defines.

Type of change:

  • Bug fix

High-level design:

N/A — small change.

Tests:

Use cases covered

  • Clicking Sign In (basic auth) in dark mode shows a readable loading button.
  • Any core Button with isDisabled + isLoading keeps its loading colours; plain disabled buttons are unchanged.

Unit tests

  • button.test.tsx: new test asserting a disabled+loading button stays natively disabled, carries data-loading, and has no ungated disabled: class. Fails on main, passes here.
  • vitest run src/components/base/buttons/ → 87 passed.

Backend integration tests

  • Not applicable (no backend API changes).

Playwright

  • No spec change. Affected specs (login flows) pending in CI.

Other checks

  • make ui-checkstyle-changed clean; prettier + eslint clean on changed files.
  • Generated CSS for tw:disabled:not-data-loading:* verified with @tailwindcss/node.

Screenshots

Sign In clicked (login request held open so the button stays loading). Captured on the Vite dev server with the auth config mocked.

main (before) this PR (after)
Dark before-dark after-dark
Light before-light after-light

Computed label colour while loading: dark #7b7f86 → #ffffff on #2e90fa; light #a4a7ae → #ffffff on #175cd3.

🤖 Generated with Claude Code

RetriggerView in GreptileConfidence Score: 5/5

This PR appears safe to merge.

Summary

Loading buttons keep their existing loading colors when callers also disable them.

  • Loading buttons keep their colors while remaining disabled.

No actionable issues found. Tests were not run during this review.

Reviews (9) · Last reviewed commit: "fix(ui-core): keep the loading look on a..." · Reviewed by Greptile

Callers pass isDisabled={loading} with isLoading, so the disabled palette
painted over the loading fill; in dark mode the Sign In label dropped to
~2.5:1 contrast. Gate every disabled style on not-data-loading. Native
disabled stays, so behaviour is unchanged.
@shah-harshit
shah-harshit requested a review from a team as a code owner November 19, 2026 07:10
@shah-harshit shah-harshit added UI UI specific issues safe to test Add this label to run secure Github workflows on PRs skip-pr-checks Bypass PR metadata validation check labels Nov 19, 2026
@shah-harshit shah-harshit added UI UI specific issues safe to test Add this label to run secure Github workflows on PRs skip-pr-checks Bypass PR metadata validation check labels Nov 19, 2026
@shah-harshit shah-harshit self-assigned this Nov 19, 2026
@gitar-bot

gitar-bot Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Code Review ✅ Approved 🟡 Medium risk

Gating disabled styles during loading changes the shared Button’s appearance across variants; unintended styling differences could affect loading states throughout the UI.

Gates core Button disabled: styles behind not-data-loading: so a disabled loading button keeps its loading fill, white label, and spinner instead of the low-contrast disabled palette in dark mode. No issues found.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Display: compact → Showing compact verification results.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@shah-harshit
shah-harshit merged commit 281be86 into main Nov 19, 2026
51 checks passed
@shah-harshit
shah-harshit deleted the shah-harshit/sign-in-button-unreadable-fix branch November 19, 2026 07:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test Add this label to run secure Github workflows on PRs skip-pr-checks Bypass PR metadata validation check UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants