feat(button): migrate kol-button to Skeleton Blueprint architecture#9951
Draft
Copilot wants to merge 2 commits into
Draft
feat(button): migrate kol-button to Skeleton Blueprint architecture#9951Copilot wants to merge 2 commits into
Copilot wants to merge 2 commits into
Conversation
Contributor
|
Netlify Draft Deployment |
Agent-Logs-Url: https://github.com/public-ui/kolibri/sessions/c3485d7a-5862-4a5d-ae7e-f49f66f6e2e3 Co-authored-by: deleonio <6279703+deleonio@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Migrate button with new web component
feat(button): migrate kol-button to Skeleton Blueprint architecture
Apr 2, 2026
Contributor
|
🚀 MCP preview deployed to Vercel: https://kolibri-it4h5sbvk-public-ui-kolibri-mcp.vercel.app |
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.
Migrates
kol-buttonfrom the legacy dual-component pattern (shadow wrapper + internal WC) to the layered Skeleton Blueprint architecture, unifying it into a single shadow component with clean separation of concerns.New files
src/internal/props/— 13 new prop definitionsEach prop encapsulates normalization and validation via
createPropDefinition:access-key,alternative-button-link-role,aria-controls,aria-description,aria-expanded,aria-selected,button-type,button-variant,custom-class,disabled,inline,short-key,tab-indexsrc/internal/functional-components/button/api.tsx—buttonPropsConfig(PropsConfigShape) +ButtonApiderived viaApiFromConfig; declaresCallbacks,Methods, andRefs(includingtooltipFloatingfor type-safe tooltip ref wiring)controller.ts—ButtonController extends BaseController<ButtonApi>; receivesStateAccess<ButtonApi>; delegates tooltip lifecycle to an internalTooltipController; exposessetTooltipFloatingRefto avoid unsafe prop hackscomponent.tsx— statelessButtonFC; extendsFunctionalComponentProps<ButtonApi>with a localtooltipId?: stringintersection to replace the previousRecord<string, unknown>castModified files
src/components/button/component.tsx— replaces both old files; extendsBaseWebComponent<ButtonApi>; full prop triangle for all 18 props; form integration viaAssociatedInputControllersrc/components/button/snapshot.spec.tsx— co-located (moved fromtest/); expanded from 8 to 19 test cases covering_accessKey,_shortKey,_inline,_hideLabel,_icons,_customClass/customvariant, and all_typevaluesDeleted files
src/components/button/shadow.tsx— legacy wrapper component; superseded by the unified shadow WCsrc/components/button/test/— replaced by co-located testsArchitecture at a glance