vscode-didact
vscode-didact copied to clipboard
Features
- [x] Create files and folders
- [x] Invoked shell and processes on behalf of the user
- [x] Prompt for user's input
- [x] invoke commands exposed by other extensions
- [x] Provide an example of a collapsable paragraph ("hide solution")
Awesome. Thanks Paolo. :)
Interesting take on collapsible sections to explore - https://gist.github.com/pierrejoubert73/902cc94d79424356a8d20be2b382e1ab
Also need to look into persisting state. If the user has a tutorial up and closes it, there should be an easy way to re-open it. (Perhaps a key combo?) And we should find a way to persist the html in the user's global configuration somewhere so that when they reopen it, it remembers the last state they were in (i.e. checked items).
So long as the extensions are installed, these tutorials can invoke commands available from ANY extension so long as we know what needs to be passed to them.
Raw feedback from Claus
this is really great - love its from the same editor, and its baked into the tooling, so its not like jumping between a webpage from a browser, and then going back/forth to your editor
and if we can do a set of small lessons like this one, then I think developers are more inclined to try than a few giant tutorials that take hours to run / complete
like these ones
https://redhat-developer-demos.github.io/istio-tutorial/istio-tutorial/1.3.x/2deploy-microservices.html
bless them, but its a lot of low-level kubectl / oc adm commands that seems a bit "steep" to learn
for the video above, i would like if one of the steps was where the end user would add a new file that gets copied or something so he can see that it also works for his files, and not the out of the box file
eg what i have seen as beginner tutorial on youtube is when ppl would drag/drop files in the folder tree
really like that you can see the [x] in the steps when you have completed them, and therefore can see "how far you got"
More Raw feedback from Claus
yeah for example also the one in the terminal where it can execute the commands for you, some users may want to have the cursor blinking, and then type the command themselv
and then a follow up question is, how do i build this from the IDE, eg there must be a "menu -> build project" or something instead of using mvn from a command line
or at least hint in the text that this is possible, and its to be covered in "another session" etc
also if the user closes that tutorial page by accident, how does he/she open it again?
- [x] Investigate using
sh -c
to invoke shell commands and then check for responses withecho $?
- [x] Investigate adding "validate all" button for requirements section to automate an easier check
- [x] Investigate updating CSS to change cursor over didact links
- [x] Investigate gathering user input for some command calls -- either with user dialog in VS Code or thru field in markdown-provided text (or inline HTML)
- [x] For Camel-in-Action example, remove "click here" before each link and make numbered list instead of bullets
- [x] Investigate adding YouTube video inline and animated gifs showing user how/where to perform various actions like right-click on something in a view and selecting a context menu, etc.
- [x] Investigate use of buttons instead of textual links for some things
- [x] Change text color to green for "verified" requirements
- [x] Add a step to the C-i-A example showing some code and encouraging the user to update the Java route so they see some console output they provided
- [x] Show the right-click menu on a Didact MD file to open it in the Didact window (vs. the hidden approach of leaving it in the settings)
I have updated the link for "Didact" links to be a crosshairs vs a pointer. We can change that in the CSS.
I have changed the text color to green for "verified" links when we click through the prerequisite check.
I have added a step with a collapsible section to the Camel in Action demo.
I have used the right-click menu for the demo.
We can't embed a YouTube video where it's runnable from inside a Markdown file. Apparently even the embedded HTML that you get from YouTube won't run. But it looks like many folks are using an image as a clickthrough - as shown here http://sviridovserg.com/2017/05/22/embed-youtube-to-markdown/
Though you can't see it when you open the file here - https://github.com/bfitzpat/vscode-didact/blob/master/demo/didact-demo.md - if you open it in the Didact window in VS Code, you get some nice new features:
- Buttons work to call inks
- Added user input
The demo didact file walks through a majority of the functionality that we now have available. The readme https://github.com/bfitzpat/vscode-didact/blob/master/README.md is now up to date with the new options we've added as far as command ids, CSS updates, and so on.
Ideas for the future
- A multi-step command that templates a new link for the user in a Didact Markdown file, prompting for command Id, type of link, and any inputs - that would inject a new Markdown link into a document
- A way to have multiple Didact files “up” at the same time (different open webview windows) or at least a web browser “history” approach that enables stepping forward or back through the history
- A registry of Didact files - essentially a list that is stashed in the settings - though that list is going to get unwieldy (though we could make it searchable to manage that problem)
- A quick pick command when the user Opens the Didact window - that provides a drop-down list of all registered Didact files
- A command that adds a new Didact file to the registry - that can be called from the activate of another extension so that it auto-registers whatever Didact files it wants available
But I can see this scenario...
- User installs the Camel K extension.
- Camel K extension installs the vscode-didact extension as a requirement
- Camel K extension registers a tutorial didact file
- Camel K extension creates a custom command to open a primary didact file that perhaps has links to various tutorials on how to do things
Some other ideas
- Attach a unit test that can validate the markdown
- check urls
- check command Ids
- See if we can find a npm package to convert asciidoctor to html
- https://www.npmjs.com/package/asciidoctor
- https://www.npmjs.com/package/@asciidoctor/core
This would help out the doc folks - enabling them to use asciidoctor files to use the same approach as markdown
Would also be good to write a command that generates a mocha test based on a didact markup file.