feat(react): add progressive composability - #513
Open
harishsundar-okta wants to merge 1 commit into
Open
harishsundar-okta wants to merge 1 commit into
harishsundar-okta wants to merge 1 commit into
Conversation
Contributor
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #513 +/- ##
==========================================
+ Coverage 90.87% 91.10% +0.22%
==========================================
Files 242 253 +11
Lines 18308 19477 +1169
Branches 2675 2241 -434
==========================================
+ Hits 16638 17744 +1106
- Misses 1670 1733 +63 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
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.
Summary
Adds a four-tier progressive-composability layer across all nine block components, letting hosts adopt composition incrementally with zero breaking changes to existing usage.
Why
Today the block components are all-or-nothing: hosts either use the default component with props, or fork it. There is no supported way to replace a single action, restructure the layout, or drive a fully custom UI while reusing the component's data/logic. This adds a graduated path from "just works" to "fully headless" without breaking the current API.
What
Introduces four tiers of adoption, each opt-in and backwards compatible:
<Component {...props} />— unchanged, fully backwards compatible.renderprop (mergeRenderPropchains the hostonClick, then the component's command; hostpreventDefault()/disabledskips it).Root/Header/Content/ action /Refreshparts freely and interleave host UI — all parts share one model created once byRoot(no duplicate fetch/render).use*Modelaliases for fully custom UIs.Key changes:
packages/react/src/lib/composability(createComponentContext,mergeRenderProp)..composable.tsxwith its compound parts; the paired*Viewis re-exported from the base module.actionSlot/hideRefreshseams added to the sharedHeaderand views.Per-component capabilities are intentionally not uniform:
SsoProviderTableDomainTableOrganizationMemberManagementUserPasskeyManagementUserMFAManagementOrganizationMemberDetailOrganizationDetailsEditSsoProviderCreateSsoProviderEditTesting: composability suites 43/43 pass; full suite 1887/1887 (zero regressions);
tsc --noEmit, lint, andpnpm buildall green.Packages
packages/corepackages/reactTesting
Member Management - Tier 1
Member Management - Tier 2
Member Management - Tier 3
Member Management - Tier4