Repository navigation
[2.1] fix(ui-core): keep the loading look on a disabled loading Button (backport 2.1 #38176) - #38182
Conversation
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.
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
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 |
Code Review ✅ Approved 🟢 Low riskThe 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 VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
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, …) passesisDisabled={loading}together withisLoading. The coreButton'sdisabled:styles then painted the disabled palette over the loading state — in dark modetext-fg-disabled(#7b7f86) onbg-disabled(#373a41), ~2.5:1 contrast.Fix: in
openmetadata-ui-core-componentsbutton.tsx, everydisabled:style is now gated with Tailwind'snot-data-loading:variant (compiles to:disabled:not([data-loading])). A loading button keeps its colour's existingdata-loadingfill, white label and spinner. The nativedisabledattribute is untouched, so behaviour (press/submit blocking,toBeDisabledassertions) does not change.Collate has no sign-in page of its own — it renders the OSS
SignInPageand coreButtonthrough 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:
High-level design:
N/A — small change.
Tests:
Use cases covered
ButtonwithisDisabled+isLoadingkeeps its loading colours; plain disabled buttons are unchanged.Unit tests
button.test.tsx: new test asserting a disabled+loading button stays natively disabled, carriesdata-loading, and has no ungateddisabled:class. Fails onmain, passes here.vitest run src/components/base/buttons/on2.1→ 67 passed.Backend integration tests
Playwright
Other checks
make ui-checkstyle-changedclean; prettier + eslint clean on changed files.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)Computed label colour while loading: dark
#7b7f86→#ffffffon#2e90fa; light#a4a7ae→#ffffffon#175cd3.🤖 Generated with Claude Code


Confidence 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.
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