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
Transform Plugin API #1699
Closed
wadethestealth
wants to merge
19
commits into
nteract:master
from
wadethestealth:transform-plugin-api
Closed
Transform Plugin API #1699
wadethestealth
wants to merge
19
commits into
nteract:master
from
wadethestealth:transform-plugin-api
Conversation
This file contains 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
wadethestealth
added
enhancement 🌟
New feature ideas
work in progress 👷♂️
needs testing 🚧
labels
Jul 4, 2019
wadethestealth
force-pushed
the
transform-plugin-api
branch
from
July 5, 2019 02:30
321c078
to
f3bc59e
Compare
wadethestealth
added
discussion 💬
Discussion is wanted
on hold 🛑
and removed
reviewable ✔️
labels
Jul 12, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
discussion 💬
Discussion is wanted
enhancement 🌟
New feature ideas
help wanted
Help is desired
on hold 🛑
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.
This PR has grown stale and I do not want to continue to update. For any future contributors, this code is 100% free for you to use without asking.
🌟 Support Custom Transforms
Adds the ability for plugins to add their own transforms, which can add more language specific transforms. It also allows for other custom rendering of current supported transforms. Such as custom markdown flavors mentioned in #1630.
See #1697 for other related issues
Discussions:
Should we allow to add default props to their transforms?
Should we allow to add default children to their transforms?
Should we go the provider route (current) or the consumer route (discussed below)?
This example (the provider route) allows for dynamic creation as well as control over all transforms available.
We may want to limit access to them, but control is nice. Currently, it is a part of the plugin provider.
However, we could make hydrogen be a consumer instead. This will mean that a transform can only be activated on activation of hydrogen or of their package. It could be removed anytime by calling a disposable, but then it won't be able to be added until one of the packages reactivates themselves. This will also remove all control of transforms that are not theirs. This works similar to autocomplete provider/consumer.
Example Custom Transform Inside A Package
Note: the transform must be able to be used to create a react element
Example
package.json
Inside A PackageTo-Do
Incompatible PRs:
Closes #1697