-
Notifications
You must be signed in to change notification settings - Fork 97
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
Code Segmentation and Injection on Groups #110
Comments
For the code injection, it could also be interesting to allow for some kind of child / children injection. For example something like this could inject the generated output of the whole group: Whereas, this could inject an array of the children: It might be worth ensuring we consider some kind of parameter system for adjusting the output. Maybe even leverage JSON so it's easy to parse? |
For the custom widget code I am just creating component in Adobe XD and name it for example "MySuperTextField" - and just do not export it. Instead I am creating widget in my project with the same name so it is placed right there. |
@JakubNeukirch - ya, that's a smart way to work around it now. I'm hoping to do something a bit more explicit with the proposal above. |
I just pushed c6b6ba4 which is a monster commit that adds this feature and a bunch of additional updates / refactoring that I tackled as part of it. It seems to be quite functional, and people are welcome to test, but there are still some edge cases that need consideration - specifically how to deal with decorators (ex. onTap, blur, etc), and whether there's a reasonable way to check custom code for syntax errors. Short description:
|
I just pushed initial support for tags in custom code to let you inject the target item's exported code This is very much alpha functionality, and is subject to removal or significant change. |
This proposal aims to address two specific issues:
To address both these cases, we could add an option for Groups to allow the user to specify alternative ways to generate its code.
build
), and check for duplicates on export. This could also potentially allow for a devs to subclass the widget and override specific build methods.Here's a rough mockup of what this could look like:
While there's an argument for supporting this functionality on other element types (ex. replacing the code for a text field with an input), I think keeping it limited will simplify the UI and implementation, while remaining super easy to work around (ex. simply make the text field a group).
Thoughts/feedback are very welcome.
The text was updated successfully, but these errors were encountered: