Flagsmith / Flagsmith/flagsmith
Button: add isLoading state to consolidate async-action pattern
- Dominant language
- Python
- Stars
- 6.6k
- Forks
- 567
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 121
Description
`Button` has `isLoading` (spinner + auto-disable, shipped). #8126 adds `aria-busy`/`aria-live` and an optional `loadingLabel`.
Remaining: replace the hand-rolled `isSaving ? 'Updating' : ...` + manual `disabled` pattern with `isLoading` at these sites (grep `{isSaving ?`):
`CreateGroup`, `CreateProject`, `CreateWebhook`, `CreateAuditLogWebhook`, `CreateSegmentRulesTabForm`, `CreateRole`, `FeatureSettingsTab`, `SegmentOverridesTab`, `IdentitySaveFooter`, `FeatureUpdateSummary`, `CreateEnvironmentPage`, `EnvironmentSettingsPage`, `OrganisationInformation`, `ProjectInformation`
Open question: Button-as-link. 30 sites pass `href`, and `isLoading`/`disabled` mean nothing on an anchor. Candidate answer: split a `LinkButton` and drop `href` from `Button`.
Contributor guide
Assessment
This issue has not been assessed yet.