-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Flatten nested imports and add deprecation notice #8901
Labels
Comments
For deprecation notices, we may need to do something like: function deprecateOnField(object, field, Component) {
Object.defineProperty(object, field, {
enumerable: true,
get() {
// Add deprecation notice here
return Component;
},
});
}
// ...
deprecateOnField(TextInput, 'ControlledPasswordInput', ControlledPasswordInput); |
I think these are the only components exported as a field on another component:
With proposed export name in the normalized approach
|
@tay1orjones I think that tracks! For the ErrorBoundary stuff, I think you're right. That should stay as consumer/provider |
tay1orjones
added a commit
to tay1orjones/carbon
that referenced
this issue
Jun 23, 2021
kodiakhq bot
added a commit
that referenced
this issue
Jul 23, 2021
* feat(project): add flat exports for namespaced components, #8901 * feat(exports): add deprecation notice for namespaced exports * chore: update snaps * test: ignore field deprecation warnings * fix(exports): properly mock deprecateFieldOnObject, add name fallback * test(multiselect): correct import paths, add deprecation mock to tests Co-authored-by: Scott Strubberg <sstrubberg@protonmail.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Discussion: #8642
This issue is for tackling the normalization of our export strategy. Currently, we export a mixed of named exports and exports only available as fields on these exports. For example:
TextInput
andTextInput.ControlledPasswordInput
.With this change, we would like all exports to be available as named exports. To get there, we will need to:
The text was updated successfully, but these errors were encountered: