protoschool.github.io icon indicating copy to clipboard operation
protoschool.github.io copied to clipboard

Feature: Enable multiple types of code snippets for js, go etc

Open zebateira opened this issue 4 years ago • 2 comments

When we present code snippets in the content, would be helpful to have tabs to toggle between js or go code snippets.

zebateira avatar Jan 22 '21 11:01 zebateira

Are you thinking of these only for non-coding challenges? I fear they'd cause problems in our coding challenges by making people think they can use go.

With respect to text-based lessons with code snippets, we'd need to be extremely careful here, because some features work differently enough from language to language that you might have to change whole sections of the surrounding text.

If we do decide to add a tab-based toggle, we should check with the docs team to see if they've added it yet, as I believe it's on their roadmap and might turn out to be a component we could share.

terichadbourne avatar Jan 22 '21 22:01 terichadbourne

Are you thinking of these only for non-coding challenges? I fear they'd cause problems in our coding challenges by making people think they can use go.

With respect to text-based lessons with code snippets, we'd need to be extremely careful here, because some features work differently enough from language to language that you might have to change whole sections of the surrounding text.

Yes, those are very good points. I suggest reducing the scope of this to where it might feel appropriate (new intro libp2p tutorial for example). The main objective here would be to have this option so future tutorials might benefit from this if they need so. To note that this is a very docs-oriented feature, so I would see this component be scarcely used in ProtoSchool, nonetheless, I thought it would be a nice addition to the very few options we have to present code snippets.

zebateira avatar Jan 25 '21 11:01 zebateira