diff --git a/046-General-overview-of-how-community-snippets-work.md b/046-General-overview-of-how-community-snippets-work.md index 869e4d9..fc66790 100644 --- a/046-General-overview-of-how-community-snippets-work.md +++ b/046-General-overview-of-how-community-snippets-work.md @@ -41,5 +41,27 @@ You can see which of these Snippets are already In Sync. It's called EQUAL. You Then if there is a Snippet Out of Date. Let's say someone contributed to the community on a specific snippet. Let's say it this Snippet Uitkit v2-(Common) Alert. Someone saw if we open the Snippet they see this little snippet(see video) and they thought, we could do better and they improved on it, [00:07:41](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h07m41s) and then shared it with the community. Then that Snippet will end up in the Out of Date tab. If there is no Out of Date Snippets, then all be blank. But if there is Snippets that are Out of Date, they all will show up. ### Snippets - New + +Then there is the New tab. Now the New tab could be a little bit misleading [00:08:01](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h08m01s) because in this example that I'm giving you, I went and I deleted a Snippet from my Database. Since that Snippet already exists in the community, the system then detects that snippet isn't here so it must be new. That's how it worked out. Now you could click on this Get Snippet and it will say: [00:08:28](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h08m28s) Are you sure you would like to add this new JCB community snippet to your local snippets? You say: OK. Then it goes to GitHub, gets the snippet and moves it to your Database. You done. This Snippet is no longer New. If you click New you'll see no New Snippets. It is also been added locally. + +### Snippets - Diverged + +Then Diverged Snippets is where there is a discrepancy in both the creation date as well as the modified date. [00:08:58](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h08m58s) And then those snippets will show up in Diverged and they can be updated in the same way. If you have made a change to a Snippet in your local environment and then you've realized that changes hasn't been good, it's better to return back to the old Community version. + +### Snippets - Ahead + +Then you would come to Ahead. I've made a little change to this specific Snippet. [00:09:23](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h09m23s) They'll tell you that the Snippet is Ahead and if you click on it, they'll show you what that would mean. You can then click on Get snippet, to revert back to the old one, and that's what it will tell you. Are you sure you would like to update your local snippet to this older JCB community snippet? You can say: Cancel. I like my new snippet I don't want to update it and just ignore it. But if you want to go back then there is this option [00:09:51](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h09m51s) to do so. If this is a good Snippet you might want to consider sharing it with the rest of us. That would be to do the sharing snippet and go through those tutorials in knowing how that works. + +### Bulk Tool + +There is sometimes a situation where a specific person of the community might be very enthusiastic [00:10:13](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m13s) and he contributes 300 new snippets to the community Snippets Repository. Now that would mean that you want to click on every one of those snippets Get snippet, Get snippet, that might be very tedious. So we added this little Bulk tool. The Bulk tool is able to detect whether there are New snippets and whether they are Ahead snippets or whether you just wanted to update all of them with this 'Just Get All Snippets'. [00:10:42](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m42s) If there isn't any Diverged or any Out of Date Snippets, it will also not be able to do that. Instead of clicking it one at a time you could just click on 'Revert All Ahead Snippets' and it'll just update all of them for you and you're done. + +### Description, Usage, Snippet, Who Contribute, View Blame + +But if you like me and you want to know exactly what's going on you could read the Description. There's no Description. See the Usage. See how the Snippet itself looks like. If you really like what you see [00:11:12](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m12s) you might even want to look at who contributed the Snippet. That brings up an important and yet interesting concept. We have decided that when you contribute a new snippet your name and details will end up here(who contributed the snippet). Like I explained earlier when we looked at the contributor area. Yet when someone makes minor contributions to the snippet, we will not necessarily change or replace this Contributor's name. Instead we will let them show up in the blame view. There is a view [00:11:46](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m46s) which is called the Blame View. The Blame View shows you who changed what part of the code and when. Whenever there is an improvement on any of the Snippets the GitHub Repository tools will help us show you who made those changes. So that's how they will be recognized for their contributions, is via the Blame. Where is if you contribute new Snippets to the JCB community you will end up having your details show up here and have people be able to click on this link 'Vast Development Method' [00:12:17](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h12m17s) and go to the website you put up as your website. It's an ideal way of getting yourself out there in the JCB community and at the same time sharing good snippets with the rest of us and make make our life easier. That is looking at the Get Snippets Community area. + +We're excited about this. We hope that this will really faster a lot of participation and that it will improve JCB constantly. [00:12:52](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h12m52s) Snippets are used in these fork key areas Custom Admin Views, Site Views, Templates, Layouts. These areas are what the customer sees, the one that uses the component. We want to be always sure to have the latest and most stable Snippets ready and available for everyone using JCB. [00:13:16](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h13m16s) Once you have imported the new snippet you will be able to see it at the end of your Snippets. Navbar is now the latest one we've imported. If you open the snippet, you will see that contributed details are already in place and so these contributed details will be updated as you add new Snippets. + +### When Details Not In Place - Say Dynamic Field ???? -Then there is the New tab. Now the new tab Well that could be a little bit misleading [00:08:01](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h08m01s) Because in this example that I'm giving you I went and I deleted a snippet from my Database And since that snippet already exists in the community It realize the system Then detects ok well that snippet isn't here so it must be new That's how it basically worked out that little Some Now you could click on this Get snippet And it will automatically It says here [00:08:28](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h08m28s) Are you sure would like to add this new JCB community snippet to your local Snippets you says yeah ok And then it goes to GitHub Gets the snippet and moves it to your Database And Boom You done So now this snippet is no longer new if you click here you'll see its oh no new snippets It is now also been added locally Then diverged Snippets is where There is a discrepancy in both the creation date as well as the Modified date [00:08:58](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h08m58s) And then those snippets will show up here and they can be updated in the same way If you have made a change to a snippet in your local environment And then You've realized oh that changes hasn't been good there's been a better You know Just to return back to the old Community version Then you would come here to the head I made a little change to this Pacific snippet [00:09:23](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h09m23s) And they'll tell you that the snippet is ahead and if you click on it They'll show you What that would mean You can then click on get snippet To really revert Back to the old one and that's what it will tell you Oh sure you would like to update your local snippet with the older JCB community snippet So you can say no I like my new snippet I don't want to update in just ignore it But if you wanna go back then that there is this option [00:09:51](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h09m51s) To do so If this is a good snippet You might wanna consider sharing it with the rest of us An and that would be to actually Be to actually do the sharing snippet And go through those tutorials in knowing how that works There is sometimes a situation where a specific one of The community Might be very enthusiastic [00:10:13](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m13s) And he contributes let's say 300 new Snippets to the community Snippets Repository Now that would mean that you know you wanna click on every one of those snippets get snippet get snippet that might be very Tedious So we added this little bulk tool Now the bulk tool is able to Detect whether there are new Snippets And whether they are ahead Snippets Or whether you just wanted Just update all of them with this this just get all Snippets [00:10:42](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m42s) And so If there isn't any diverged or any outdated Snippets it will also not be able to do that So here instead of clicking it one at a time you could just click on this and I'll just update all of them for you And you're done But if you like me and you wanna know exactly what's going on You could go here you could read the description Ok there's no description See the usage See how the snippet itself looks like And if you really like what you see [00:11:12](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m12s) You might even want to look at who contributed the snippet That brings up an important and yet interesting Concept We have decided that when you contribute a new snippet your name and details will end up here Like I explained earlier when we looked at the contributor area Yet when someone makes minor contributions to the snippet We will not necessarily change or you know place this contribution Contributor's name Instead We will let them show up in the blame view so there is a view [00:11:46](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m46s) Which is called the blame View The blame view shows you who changed what part of the code And when So whenever there is an improvement on any of the Snippets The GitHub repository tools will help us sort of show you Who made those changes So that's how they will be recognised for their contributions is via the blame Where is if you contribute new Snippets to the JCB community You will actually end up having your details show up here And have people be able to click on this link [00:12:17](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h12m17s) And actually go to the website you put up as your website So it's an ideal way of getting yourself out there in the JCB community And at the same time sharing good snippets with the rest of us and make make our life easier I suppose Anyway and so That is the really looking at the Get Snippets Community area And we're excited about this we hope that this will really faster a lot of Participation And that it will Improve JCB constantly because as you know [00:12:52](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h12m52s) Snippets are used in these Four key areas custom admin views Site view templates layouts And These areas Are what really the customer sees right the one that uses the component So we wanna always be sure to have the latest and Most Stable Snippets ready in available For everyone using JCB [00:13:16](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h13m16s) So once you have actually Imported The new snippet you were able to see it at the end of your Snippets So this one is now the latest one we've actually Imported If you open the snippet You see that contributed details are already in place And so these contributed details will be updated as you add new Snippets If for some reason these Details are not [00:13:41](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h13m41s) In place it will say Dynamic value let me show you there Please create a new one Like this So It says Dynamic field When you have created your snippet I'm just gonna do a Simple Test here to illustrate this Ok so it's obviously [00:14:03](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h14m03s) A test And you click save oh missed a value And you click save It will first Search the JCB snippet repository to see if there really is a snippet with this kind of a relationship Between the name the type and the library If it doesn't exist It will go to your Global area like explained [00:14:31](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h14m31s) And they will get your details And dynamically added in to The the snippet So there we go Its obviously found my details and put it in there So that is how this details get set When you create a snippet a new one It will fall back to your details [00:14:51](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h14m51s) If that snippets name Type and library relationship doesn't already exist in the JCB Community Now if for some reason It does exist It will actually Take the initial contributors details and add that in there That's how it works at this stage maybe there is better ways but For now this is how we will start at least And I'm sure it will evolve and change as we go along until we are able to actually [00:15:22](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h15m22s) satisfy all and everyone's needs I think that's enough of an overview Of how everything works So you've Seen how to use the Snippets in your components You've seen how to Start initial steps of sharing a snippet You simply select them like I showed you Obviously Only when you have improved on it or whether you've created new ones will you ever wanna do that [00:15:48](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h15m48s) And then you click on Share snippet and gives you a package And Then on that it Let me just show you again On that it has a Few tutorials like Tutorials I'm forking the JCB Snippets And Tutorial making a pull request These two tutorials would be quite key [00:16:11](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h16m11s) For you to understand what would be this next steps And getting your Snippets Into the JCB community Well thank you for watching And Yeah Until next time +If for some reason these details are not [00:13:41](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h13m41s) in place it will say dynamic field. Let me show you there. Just create a new one. It says dynamic field. When you have created your snippet, I'm just going to do a simple test here to illustrate this. [00:14:03](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h14m03s) If you click save, it will first search the JCB Snippet Repository to see if there is a snippet with this kind of a relationship between the Name, the Type and the Library. If it doesn't exist it will go to your Global area like explained [00:14:31](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h14m31s) and they will get your details and dynamically added in to the snippet. It found my details and put it in there. That is how this details get set When you create a snippet a new one It will fall back to your details [00:14:51](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h14m51s) If that snippets Name, Type and library relationship doesn't already exist in the JCB Community. Now if for some reason it does exist it will take the initial contributors details and add that in there. That's how it works at this stage. Maybe there is better ways but for now this is how we will start at least And I'm sure it will evolve and change as we go along until we are able to actually [00:15:22](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h15m22s) satisfy all and everyone's needs I think that's enough of an overview Of how everything works So you've Seen how to use the Snippets in your components You've seen how to Start initial steps of sharing a snippet You simply select them like I showed you Obviously Only when you have improved on it or whether you've created new ones will you ever wanna do that [00:15:48](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h15m48s) And then you click on Share snippet and gives you a package And Then on that it Let me just show you again On that it has a Few tutorials like Tutorials I'm forking the JCB Snippets And Tutorial making a pull request These two tutorials would be quite key [00:16:11](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h16m11s) For you to understand what would be this next steps And getting your Snippets Into the JCB community Well thank you for watching And Yeah Until next time