Skip to content

[2.1] fix(ui-core): keep the loading look on a disabled loading Button (backport 2.1 #38176) - #38182

Merged
shah-harshit merged 1 commit into
2.1from
shah-harshit/backport-2.1-38176
Nov 19, 2026
Merged

shah-harshit merged 1 commit into
2.1from
shah-harshit/backport-2.1-38176

Conversation

@shah-harshit

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

Copy link
Copy Markdown
Contributor

Backport of #38176 to 2.1 (clean cherry-pick of c907eff).

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/ on 2.1 → 67 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

Screenshots from #38176 (same component code on 2.1). 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

Keeps loading buttons readable when callers also disable them, without changing how presses are blocked.

  • Buttons keep their loading colors while requests are running.

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

Reviews (1) · 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:45
@shah-harshit
shah-harshit requested review from chirag-madlani and removed request for a team November 19, 2026 07:45
@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
@github-actions

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically.

Maintainers can bypass this check by adding the skip-pr-checks label.

@gitar-bot

gitar-bot Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Code Review ✅ Approved 🟢 Low risk

The shared Button changes only disabled-loading colors and decoration; its native disabled state remains intact, limiting impact to presentation.

Keeps the loading look on a disabled loading Button by gating core disabled: styles with not-data-loading:, so the Sign In button stays readable 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 1b96f0b into 2.1 Nov 19, 2026
42 of 43 checks passed
@shah-harshit
shah-harshit deleted the shah-harshit/backport-2.1-38176 branch November 19, 2026 10:07
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.

1 participant