While working on the tree control for our extension, I noticed that the sample implementation was not optimal. For instance, `vscode.TreeDataProvider.onDidChangeTreeData` should only be called once for the top-most node that has changed, as all children will be refreshed as well.
This change updates the code of the sample to track state changes during propagation and only raise the event for the top-most parent node that has its state changing.
There also was an issue with root node `1` not rendering, which impacted the new algorithm, as it was not refreshing the tree, when invisible root was changing. In order to address this, I updated `getChildren` to actually return the `1` node, when root was requested. This in turn changed the presentation (`1` is now rendered in the tree) and addressed the problem with tree not refreshing when `1` is the node that raises the event.
Lastly, there is one more optimization that I didn't make due to the bug that is in the works: `getTreeItem` can actually return the `element` directly, without the copy, as it already implements `TreeComponentItem`. The problem currently is that `TreeNode` also defines an `id`, which causes an error during refresh. Once that is addressed - this part can be optimized as well.
- Upate vscode-nls to 4.0.0 in notebook extension. Should be fix for Insiders build failure due to localization package failing
- Updated samples to remove as vscode-nls if not needed, or update if still needed
- Updated samples using `npm audit fix`
- Fixed compile errors in all the samples
* fixed crashes from job dialog and new step dialog group options UI
* added placeholder for retry counters
* fixed alert general UI
* fixed misc dialog errors
* localized all strings
* destroy viewmodel when editor is closed and add example
* support retainContextWhenHidden option for webview component
* fix breaking change from master
* dispose html element during dispose
* add more comments
* Add proposed API for model view editors
* Initial working model view editor
* Add extension demo
* Revert "Add extension demo"
This reverts commit 10d3b720ad347919dd5668a339da8e96e26b2b82.
* view model editor and add the support for register content
* clean up the code
* fix editor issues where you register more than one content
* formating
* remove unused imports
* addressed comments
* address comments2
* address comment3
* Fix main layout issues and add box around card
- Need to improve box size as it's taking too much space
* Fix UI issues with flexContainer and cards
* Simplify card HTML
This is an initial PR for a new model-driven UI where extensions can provide definitions of the components & how they're laid out using Containers.
#1140, #1141, #1142, #1143 and #1144 are all tracking additional work needed to improve the initial implementation and fix some issues with the implementation.
Features:
- Supports defining a FlexContainer that maps to a flexbox-based layout.
- Supports creating a card component, which is a key-value pair based control that will lay out simple information to a user. Eventually this will have an optional set of actions associated with it.
- Has a sample project which shows how to use the API and was used for verification