refactor(button): collapse pending into a single PendingMixin#6440
Draft
Rajdeepc wants to merge 1 commit into
Draft
refactor(button): collapse pending into a single PendingMixin#6440Rajdeepc wants to merge 1 commit into
Rajdeepc wants to merge 1 commit into
Conversation
Replaces the three-piece design from #6439 (PendingController + PendingMixin + renderPendingSpinner) with two pieces: - PendingMixin (core/mixins) — owns all pending state directly: 1-second-delayed pendingActive via @State(), inline-size freeze, accessible-name derivation, and click suppression. Uses Lit's changedProperties.has('pending') instead of a _wasPending tracker. - renderPendingSpinner (core/directives/pending-spinner) — relocated from the button package so non-button components can reuse it. ButtonBase is fully pending-agnostic. swc-button and swc-action-button opt in via PendingMixin. No public API change — pending, pending-label, and busy behavior are identical to before. Key differences vs. #6439: - No PendingController or PendingControllerHost (phantom abstraction that delegated entirely to the mixin anyway). - pendingActive restored as @State() (idiomatic Lit; no manual requestUpdate calls needed). - Pending+disabled guard uses 'disabled' in this instead of a type cast. - Changeset is minor (additive public API surface). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: 8aa0539 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
18 tasks
Collaborator
Coverage Report for CI Build 28007154291Warning No base build found for commit Coverage: 96.246%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsRequires a base build to compare against. How to fix this → Coverage Stats💛 - Coveralls |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces the three-piece design from #6439 (PendingController + PendingMixin + renderPendingSpinner) with two pieces:
ButtonBase is fully pending-agnostic. swc-button and swc-action-button opt in via PendingMixin. No public API change — pending, pending-label, and busy behavior are identical to before.
Key differences vs. #6439: