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
Question: Snippets #418
Comments
Thanks so much for doing this – snippets for Fabric make it much easier to use and I can see them being very welcome by developers. We'll have to discuss if/how we see them fitting into the core project. And if they remain a separate project, what we can do to help you automate their generation. |
Thanks. I'm open to whatever makes the most sense and provides the most value, knowing that in the long run one person (me, for now) almost certainly cannot keep pace with the whole Fabric community as the core project evolves. Like I said, ideas welcome. :-) |
Any further discussion on this? I've got someone interested in providing a way to automate the conversion of the VSCode snippets to Visual Studio, which is a nice capability. I just pushed a new release of the Snippets, but need to update them to the 2.2.0 release. Thanks. |
We haven't had a chance to discuss this yet. Do you have any suggestions for how we could make it easier for you to generate snippets from our codebase? |
No worries, I'm just coming back up for air after finishing the PS course and some client work so I figured I would check in. I was thinking of trying to do it in a Gulp task. If I'm successful, do you think the task could be added as an option in the build process? |
We'd definitely be open to that. You would be using the HTML template files as a source, right? What about the Sass/CSS? We have some changes planned to the build process, so if you want to get a start on it we can review it early (so you don't spend too much time) and make sure that our build will continue to provide what you need. |
OK. I'll try to get started soon and get back to you on progress. Yes, I'd be using the HTML templates files as the source, I don't see a need to touch the Sass/CSS as all the snippets do is insert the HTML in place of the trigger characters. At a high level, here's what I see the process looking like:
Actually, now thinking about it a little more...the problem is going to be getting the right JavaScript and any embedded components or elements (for example, a CommandBar in the Panel, or table rows inside the table). Let me noodle on it for a bit and see what I can come up with and then I'll report back... |
I can't come up with a reliable way of doing this that isn't extremely fragile without:
None of those are great options, but I know I can't maintain it all myself - I'm 2 releases behind now, but hope to get caught up this week. Of the three options above, I think the first one would be least intrusive and easiest to maintain. I'm open to other ideas if anyone has them. Thanks, Dave |
Would our upcoming conversion to Handlebars templates help with this? Those templates will have |
Hmmm...Yes, that might help. I didn't know that was happening, but good to hear. Are there samples somewhere I can take a look at? |
You can take a look at the |
Have you had a chance to look at the Handlebars samples, @manndave? We're doing a lot of work on this now to prepare for the Fabric 3.0 release. It seems that there should be a way to automate the conversion of a Handlebars template to a code snippet. Let us know if there's anything we can provide to make this easier. Once Fabric 3.0 is out we should have more time to help with this. |
@mikewheaton: Haven't had a chance yet, probably this weekend or early next week. Thanks. |
Closing this issue for now as there's no action on our end. Please get in touch if you want to discuss this further – we definitely want to support helpful developers tools like this! |
I currently have a collection of VSCode snippets: s43.io/FabricSnippets in beta, meaning they don't yet cover all components and need some work to bring them up to date with the 2.1.0 release and also make true extensions for VS Code, VS, and Textmate (which will support Sublime, IIRC). I have another release to rollout in the next couple of days and am beginning to think about ways to keep these up to date with Fabric as it evolves.
So here's the question...is there any interest in adding these to the Fabric repo and having the build process handle the creation of the different versions (VS, Textmate) from the VSCode snippet? If so, I'll move in that direction. If not, I'm open to suggestions on how best to keep these current and providing value.
Thanks,
Dave
The text was updated successfully, but these errors were encountered: