Updated 046 General overview of how community snippets work (markdown)
parent
1b0a803daf
commit
cb45801bb6
@ -5,7 +5,7 @@
|
|||||||
[00:00:00](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h00m00s)
|
[00:00:00](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h00m00s)
|
||||||
(_Click on these time links to see Youtube video_)
|
(_Click on these time links to see Youtube video_)
|
||||||
|
|
||||||
This is a tutorial on the new Snippet Manager and how it works. We have added a community concept to the Snippets in JCB. Previously you could create your own Snippets and then if you would create a Custom Admin View, a Site View, a Template or a Layout, you could access the Snippets through a dropdown. [00:00:25](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h00m25s) Let me demonstrate that quickly. Now in a Site View, if I were to click on one of these Snippets, you will see it loads the Snippet. You can copy it, and can then place it in your code and so it is possible to load many Snippets.
|
This is a tutorial on the new Snippet Manager and how it works. We have added a community concept to the Snippets in JCB. Previously you could create your Snippets and then if you would create a Custom Admin View, a Site View, a Template or a Layout, you could access the Snippets through a dropdown. [00:00:25](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h00m25s) Let me demonstrate that quickly. Now in a Site View, if I were to click on one of these Snippets, you will see it loads the Snippet. You can copy it, and can then place it in your code and so it is possible to load many Snippets.
|
||||||
|
|
||||||
### New Snippet Area
|
### New Snippet Area
|
||||||
|
|
||||||
@ -22,7 +22,7 @@ Yet there are major changes taken place because we have what is known as local S
|
|||||||
|
|
||||||
[00:01:56](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h01m56s)
|
[00:01:56](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h01m56s)
|
||||||
|
|
||||||
Now how does that exactly work? Well, Snippets that already exist are Snippets that either I made or someone else and they already have what is known as a contributor. The name of the contributor, its email address, web address and so forth. When you create a Snippet we will use your details to create this contribution. [00:02:19](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h02m19s) If we open an existing Snippet and go to the contribution area, you would see that there are names in these Fields. If there are not any names then that means the update did not do exactly what it should have done. When you go to the Snippets area where you get Snippets, there is a place for you to update all the contributor names. [00:02:46](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h02m46s) Make sure to have their names in the Database. These details should be in there already. If they are not, it is not a Snippet you have made, do not worry about it. These details only apply when you want to share a Snippet or when you want to improve a Snippet and then we will add the correct details in any way. Here you'll see 'How Contributed Details Work' are dealt with. [00:03:25](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h03m25s) We are using the company details that are set in the global 'Options'. Click the 'Option' button to get there under the company tab of the JCB for the new Snippets you create. The Contributed Details of the Snippet cannot be changed that already exists via this area. So that is a simple heads up. This area is really only for the management of the community Snippets. If you are not going to be contributing then this does not even matter at all.
|
Now how does that exactly work? Well, Snippets that already exist are Snippets that either I made or someone else and they already have what is known as a contributor. The name of the contributor, its email address, web address and so forth. When you create a Snippet we will use your details to create this contribution. [00:02:19](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h02m19s) If we open an existing Snippet and go to the contribution area, you would see that there are names in these Fields. If there are not any names then that means the update did not do exactly what it should have done. When you go to the Snippets area where you get Snippets, there is a place for you to update all the contributor names. [00:02:46](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h02m46s) Make sure to have their names in the Database. These details should be in there already. If they are not, it is not a Snippet you have made, do not worry about it. These details only apply when you want to share a Snippet or when you want to improve a Snippet and then we will add the correct details in any way. Here you'll see 'How Contributed Details Work' are dealt with. [00:03:25](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h03m25s) We are using the company details that are set in the global 'Options'. Click the 'Option' button to get there under the company tab of the JCB for the new Snippets you create. The Contributed Details of the Snippet cannot be changed that already exists via this area. So that is a simple heads up. This area is only for the management of the community Snippets. If you are not going to be contributing then this does not even matter at all.
|
||||||
|
|
||||||
### Important - Snippets Mapped The Same Way As Snippets in The Community
|
### Important - Snippets Mapped The Same Way As Snippets in The Community
|
||||||
|
|
||||||
@ -58,7 +58,7 @@ You can see which of these Snippets are already In Sync. It is called EQUAL. It
|
|||||||
|
|
||||||
[00:07:22](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h07m22s)
|
[00:07:22](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h07m22s)
|
||||||
|
|
||||||
Then if there is a Snippet Out of Date. For instance, someone contributed to the community on a specific snippet. For instance, this Snippet Uitkit v2-(Common) Alert. If someone sees that we have opened the Snippet, they see this little snippet(see video) and feel, that they can improve on it, and share 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 will be blank. But if there are any Snippets that are 'Out of Date', they will all show up.
|
Then if there is a Snippet Out of Date. For instance, someone contributed to the community on a specific snippet. For instance, this Snippet Uitkit v2-(Common) Alert. If someone sees that we have opened the Snippet, they see this little snippet(see video) and feel, that they can improve on it, and share 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 will be blank. But if any Snippets are 'Out of Date', they will all show up.
|
||||||
|
|
||||||
### Snippets - New
|
### Snippets - New
|
||||||
|
|
||||||
@ -82,13 +82,13 @@ Then go to 'Ahead'. A little change has been made to this specific Snippet. They
|
|||||||
|
|
||||||
[00:10:05](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m05s)
|
[00:10:05](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m05s)
|
||||||
|
|
||||||
There is sometimes a situation where a specific person of the community might be very enthusiastic 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 'Get Snippets', that might be very tedious. So this small Bulk tool had been added. 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 is not 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 will just update all of them and you are done.
|
There is sometimes a situation where a specific person of the community might be very enthusiastic 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 'Get Snippets', that might be very tedious. So this small Bulk tool had been added. The Bulk tool can 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 is not 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 will just update all of them and you are done.
|
||||||
|
|
||||||
### Description, Usage, Snippet, Who Contribute, View Blame
|
### Description, Usage, Snippet, Who Contribute, View Blame
|
||||||
|
|
||||||
[00:10:57](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m57s)
|
[00:10:57](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m57s)
|
||||||
|
|
||||||
There is a 'Description' if you like to look at it. There is 'Usage'. See how the Snippet itself looks like. If you really like what you see, you might even want to look at who contributed the Snippet. [00:11:12](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m12s)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 which is called the 'Blame View'. [00:11:46](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m46s) The Blame View shows who changed what part of the code and when. Whenever there is an improvement made on any of the Snippets, the GitHub Repository tools will help us to know who made those changes. So they will be recognized for their contributions via the 'Blame View'. Where, if you contribute new Snippets to the JCB community, your details be displayed and make it possible to click on this link 'Vast Development Method'(Please follow on video) and go to the website you had put up.[00:12:17](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h12m17s) It is an ideal way to expose yourself in the JCB community and at the same time to share good snippets. We hope that this will really foster 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)
|
There is a 'Description' if you like to look at it. There is 'Usage'. See how the Snippet itself looks like. If you like what you see, you might even want to look at who contributed the Snippet. [00:11:12](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m12s)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 which is called the 'Blame View'. [00:11:46](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m46s) The Blame View shows who changed what part of the code and when. Whenever there is an improvement made on any of the Snippets, the GitHub Repository tools will help us to know who made those changes. So they will be recognized for their contributions via the 'Blame View'. Where, if you contribute new Snippets to the JCB community, your details be displayed and make it possible to click on this link 'Vast Development Method'(Please follow on video) and go to the website you had put up.[00:12:17](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h12m17s) It is an ideal way to expose yourself in the JCB community and at the same time to share good snippets. We hope that this will really foster 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 Used in Four Key Areas
|
### Snippets Used in Four Key Areas
|
||||||
|
|
||||||
@ -98,6 +98,6 @@ Snippets are used in these four key areas Custom Admin Views, Site Views, Templa
|
|||||||
|
|
||||||
[00:13:38](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h13m38s)
|
[00:13:38](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h13m38s)
|
||||||
|
|
||||||
If for some reason these details are not 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 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 into the snippet. It found my details and put it in there. That is how these 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.
|
If for some reason these details are not in place it will say, Dynamic field. For example, if a new one is created. It says, 'Dynamic field'. When you have created a snippet, A simple test is done 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 does not exist it will go to your Global area like explained and they will get your details and dynamically add it into the snippet. [00:14:31](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h14m31s) It found my details and put it in there. That is how these details get set when you create a new snippet, it will fall back to your details if that Snippets Name, Type and Library relationship does not already exist in the JCB community.[00:14:51](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h14m51s) Now if for some reason it does exist it will take the initial contributors' details and add that in there.
|
||||||
|
|
||||||
Maybe there are better ways but for now, this is how we will start. I'm sure it will evolve and change as we go along until we are able to [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. 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 as I showed you. Only when you have improved on it or whether you've created new ones will you ever want to do that. [00:15:48](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h15m48s) Then you click on Share Snippet and it gives you a package. It has a few tutorials like tutorials on forking 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.
|
You have seen how to use the Snippets in your components and how to start initial steps of sharing a snippet. You simply select them as I showed you. Only when you have improved on it or whether you've created new ones will you ever want to do that. [00:15:48](https://www.youtube.com/watch?v=qr4I1jeCp7I&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h15m48s) Then you click on Share Snippet and it gives you a package. It has a few tutorials like tutorials on forking JCB Snippets and making a pull request. These two tutorials are quite key to understand what would be the next steps and getting your Snippets into the JCB community.
|
Loading…
Reference in New Issue
Block a user