ckeditor4-sdk
ckeditor4-sdk copied to clipboard
"Get Sample Source Code" links - possible improvements
Moved from #76
Reinmar:
How impossible it is to add "source code" buttons next to editors? Like a small icon on the right margin?
This might be an option. The problem is that in certain samples we'd have to add additional headers although so far they were not needed because they are simple:
- samples/toolbarlocation.html
- samples/uicolor.html
- samples/size.html
- and so on
at the same time I didn't notice code samples at all for a long time, because they are in the "more" section which I wasn't interested at all (so I even didn't read headers).
But at the end you did find them.
Overall, I agree this part should somehow stand out -- in particular it should not look like "yet another piece od text", for all those that consider reading a waste of time and would just want to go straight to code in order to analyze it by themselves.
People who consider reading a waste of time will always find these links in a predictable place - at the very bottom, without having to scan each sample looking for links in the middle of the text. The only problem might be with discoverability for people who eventually googled out one SDK sample, are interested the usage of one particular feature and are not yet aware of convention used in SDK and the general purpose of this site.
How about an icon next to the header? (an option that would not require coding)
If not, then I guess the only alternative option that would still make sense would be to enforce adding headers above each sample, so that we could place "Source code" links next to the header on the right side (then the right side would be used for contextual information - Documentation, Source Code). Here a bit of coding is required and reviewing existing samples.
First of all - I would remove this ticket from milestone 1.0, because we have some solution right now. It's not perfect, but a better solution needs some coding and testing, so better not to implement it in a hurry.
I would do two things:
- Keep the list at the bottom, for those who read the sample's text from the start to the end.
- Add icons next to editors or if sample is marked that the icon should be placed next to the header (e.g. the header may be marked) then add it there. The latter is needed for samples which have a additional inputs/buttons/etc or more than one editor. The assumption would be that more complex samples always have headers which may solve #72.
+1 for some icons/buttons next to the sample - it took me a while to find the source codes. The list at the bottom doesn't work for me... The other thing is the title "Get Sample Source Code" - it would be easier to find it while "scanning" the document if it was "Source Code".
@oleq, any ideas for something fancy here? I agree that there is no clear connection between a sample and its source code.
My initial implementation was that source code buttons was next to samples. But I've been asked to move it at the bottom :). So I'm also for add some button. @oleq how about you will add some static button or something to some sample, and I'll do the rest.
@adelura I'm afraid you're on your own. I will not be able to focus on SDK for a couple of weeks.