-
-
Notifications
You must be signed in to change notification settings - Fork 354
feat: experimental component API #3491
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 0b2d998 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 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 |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -0,0 +1,10 @@ | |||
--- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documentation Accordion/Avatar pages look like a great start. We just need to dress up the examples to be a bit closer to their legacy counterparts - that includes all relevant examples and API reference. We can probably get by without Anatomy for now. These will real docs used by actual end users leading up to the v4.x release.
Additionally, now that we have a stability
frontmatter key, we should update the page template to display an alert that further emphasizes the feature status. Here's my recommendations:
(tonal-warning alert color)
Beta Feature
This feature is currently in a beta status and not intended for production use. It should be mostly functional, but may receive breaking changes before the final stable release.
(tonal-error alert color)
Alpha Feature
This represents a cutting edge and experimental feature that should not be used in production. Expect major breaking changes before this graduates to beta status.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've done that now, I've specifically not used error
because the user isn't doing anything wrong and that would give them a sense of wrongdoing. It's merely a warning about a non stable API. So all stability warnings are of the warning color.
@@ -0,0 +1,27 @@ | |||
<script lang="ts"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed on GitHub, we'll need to experiment with how we handle animations for relevant components. I'm going test a few things after this review. Expect an update by EOD today.
@@ -0,0 +1,16 @@ | |||
import AccordionRoot from '../anatomy/accordion-root.svelte'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should implement at least one example test case for either component to verify how we'll handle these. We should not re-test Zag features. But we should test custom Skeleton changes - such as the inclusion of a new icon snippet. Or any similar change not inherent to Zag's implementation.
Linked Issue
Closes #3463
Also solves/closes:
Review the RFC
Description
This PR adds a
composed
folder with all of our components using the new component API described in #3463.API
These components will become available (when this PR is merged) under an alternative export path for users who want to test the new API.
Features:
restAttributes
support, components are now simply wrappers around HTML elements and allow you to define any attribute like a normal HTML element.base
styling system where we get rid of all the specific style props and introduce a singleclass
(orclassName
in React) prop that uses either thebase:
directive ortwMerge
(up for discussion).child
snippet pattern, see: https://bits-ui.com/docs/child-snippetCcomponents