Skip to content

fix(ui): 4 filled Buttons hand-roll a loading state with an uncolored nested Text #471

Open

Description

@thinkclay

Found while fixing #444, which fixed the two reported black-on-black buttons.

I swept for the same defect shape rather than assuming there were only two. 65 call sites nest <Text>/<Row> inside a <Button>. Only 6 sit on a filled background, and 2 of those already hardcode #ffffff. The remaining 4 are all the same pattern — a hand-rolled loading state on variant="filled" color="primary" whose nested <Text> carries no color, so it renders colors.text[theme].primary on colors.primary[600]:

  • packages/scf-core/features/profile/profile-general-left.tsx:411
  • packages/scf-core/features/profile/components/GeneralProfileSection.tsx:433
  • packages/scf-core/features/profile/components/EducationEntryEditModal.tsx:552
  • packages/scf-core/features/profile/profile-experience-left.tsx:641 (the isSyncing branch; its Saved! branch deliberately uses green and is fine)

All four look like:

<Button variant="filled" color="primary" ...>
  {isLoading ? (
    <Row gap={8} align="center">
      <Spinner variant="ios" size="sm" />
      <Text>Saving...</Text>
    </Row>
  ) : (
    "Save Changes"
  )}
</Button>

Lower severity than the reported bug — poor contrast in a transient loading state, not black-on-black — which is why I did not fold a refactor of four unrelated profile forms into #444.

Fix: use Button's own loading prop, which exists for exactly this and is what its docblock recommends ("Loading state (use the prop, not a Spinner in children)"):

<Button variant="filled" color="primary" loading={isLoading} ...>
  Save Changes
</Button>

That removes the nested <Text> entirely, so Button colors its own label and the spinner picks up resolvedIconColor.

Activity

  1. added
    bug
    agent-ready
    on Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readybugtype: frontend

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions