-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Components: Remove "Experimental" designation #59418
Comments
I think we should be careful here. Experimental APIs were introduced indeed in a time where they were not considered stable and any new experimental APIs will be considered stable but there's still an exception for the old experimental APIs. We have more room there to think about each component in isolation, how much it's used, whether it has an alternative, whether we should keep it or deprecate it. In other words, I don't think we should be blindly renaming these components, we should only rename and stabilize the ones we're certain that we want to keep. |
Yes, we will be using some discretion on a per-component basis, taking into account any alternatives and current usage levels 👍 |
Thanks for sharing your thoughts, @youknowriad! I'll keep what you said in mind as I work through these, but could you clarify the following points?
What criterion do you have in mind here, and what would be the actions for each case? E.g for components that are not being used, should we just remove them or perhaps we should remove the How do we confidently gauge the usage frequency of components? We can check references in the GB app/repo, but there might be consumers in third-party packages we are not aware of.
Alternatives within our own library of components? How do we decide between one of another? I assume API design/simplicity, features, and code quality/maintainability (i.e., is it a newer version?). Thanks! |
In general I'd recommend using wpdirectory.net and check whether any plugins use the components (you have to dig through the results as some are false positives, plugins bundling Gutenberg). I would recommend a deprecation for all the components regardless of the results:
Before adding deprecations, we should first remove all existing usages from our own code base though. |
Can you expand on the
Makes sense. I think this is essentially what we're doing here: #60913 (for example). The only difference (apart from the lack of a dev note, see below) is that we're also deprecating using
How do I add a dev note? It's different from a changelog, right? |
There's a "version" argument you can add the "deprecated" function call to mark the version where the API is supposed to be removed. For instance 4 versions from now would be "6.9"
Yes, and we should be calling "deprecated" function as well to log the deprecation message in the console for plugin authors still using the API.
Changelog is targeted towards package users, Dev notes are targeted towards WP plugins developers using the APIs through the scripts in WP. They're published before every WP major release. For PRs that require dev notes, you don't have to write the dev notes today, but you should be adding a "Needs Dev Note" label and you'll get pinged later when it's time to write the dev note. |
@fullofcaffeine and I agreed on having some kind of prioritization here since there is a lot of work to be done. I attempted to group the experimental components into categories to help with priority and efficiency. Controls
Layout
Typography
Misc
I think a good order would be to start with the Controls, since those are pretty straightforward and high impact. There are some prop tweaks that I want to discuss, and I'll note them in the individual PRs. Next group would be Misc. Layout and Typography, we should to first discuss and align on a long-term vision (with @DaniGuardiola too) before we decide what to do with individual components. At the moment, there is not enough clarity to say whether we want these types of components at all, and even if we do, what the APIs should look like ideally. |
Related: Tracking: stabilization of @wordpress/components props
What problem does this address?
We used to designate a component as "Experimental" as a kind of backdoor to the back-compat policy, but since the policy was made more explicit and the Private API system was introduced, the "Experimental" has become meaningless. We will need to keep supporting them as regular, shipped components.
What is your proposed solution?
__experimental
prefixed exports. (We will still need to keep the prefixed versions for back-compat.)__experimental
in the import statements.Note
This particular issue is only for the components themselves, not the
__experimental
props, which should be addressed separately.PRs:
Navigator
Navigator
#60927ConfirmDialog
#61014;DimensionControl
#64951Divider
#61016;Elevation
#61017;Grid
#61018;HStack
#61019;Heading
#61020;InputControl
#61059;ItemGroup
#61060;NumberControl
#61061;ProgressBar
public #61062;Scrollable
#61063;Spacer
#61064;Surface
#61065;Text
#61066;ToggleGroupControl
#61067;ToolsPanel
#61068;TreeGrid
#61069;Truncate
#61070;UnitControl
#61071;Tabs
Tabs
#61072VStack
#61073;View
#61074;ZStack
#61075;DropdownMenuV2
#61076;Theme
#61077;CustomSelectControlV2
#61078.The text was updated successfully, but these errors were encountered: