Was able to dispose of the webview resources properly. We are able to… #32
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.
Overview
Issue Type
Description
Previously there was a memory leak occurring due to the Webview resources not being disposed of properly. Also, instead of just one Webview being created and updated, every time a new root file was selected it would create another Webview taking up more resources. Added functionality to reveal current Webview whenever it was hidden. Cleaned up extension.ts and panel.ts and implemented strict typing and added comments for clarity.
Ticket Item
RL-42, RL-43, RL-44
Steps to Reproduce Bug / Validate Feature / Confirm Tech Debt Fix
npm installnpm run webpackF5to open extension simulator.React Labyrinthlogo and selectView Treeto grab root file.CMD+SHFT+Pand searchShow Panelcommand to reveal existing Webview.View Treeagain and select another root file to ensure that old Webview is dispose and new Webview is created.Previous behavior
Would create multiple Webviews and would not reveal existing Webviews.
Expected behavior
Show Panelcommand should bring existing Webview into focus and selecting new root file should dispose of old Webview and create a new one.