Add support for adding rich annotations to the workflow #1311
+650
−50
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR implements a proposal for adding rich annotations to the workflow. It was designed to meet the following goals:
The current design includes two major additions to the core and IDE.
AnnotationBuilder
This is a new operator which will behave in the same way as externalized properties. By itself it generates no observable output and no expression, but can be attached to other operators to represent an association of the annotation to that operator. The
Text
property represents the contents of the annotation itself, which are encoded as a CDATA section in the workflow XML format. This section can include plain text or rich Markdown (CommonMark) / HTML to be formatted and rendered by the IDE, or simply read as part of the text document.WebView Panel
To render the annotations, we use Markdig to preprocess the annotation text into HTML, and WebView2 as the rendering framework. A new browser panel is added to each workflow editor canvas that is revealed when annotations are launched. This will render the preprocessed annotations but also function as a full in-app browser for documentation and future purposes.
Fixes #750
Closes #1170