Skip to content

Conversation

@Ponch49
Copy link
Contributor

@Ponch49 Ponch49 commented Jan 24, 2024

Overview

Issue Type

  • Bug
  • Feature
  • Tech Debt

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

  1. npm install
  2. npm run webpack
  3. Click F5 to open extension simulator.
  4. Click React Labyrinth logo and select View Tree to grab root file.
  5. Open other file panels to hide extension.
  6. CMD + SHFT + P and search Show Panel command to reveal existing Webview.
  7. Select View Tree again 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 Panel command should bring existing Webview into focus and selecting new root file should dispose of old Webview and create a new one.

… show the current webview if it hidden by selecting our extension. Only one webview is created, if another file is wanted by the user, old webview is disposed and a new one is created to prevent any memory leaks.
Copy link
Contributor

@Louka3 Louka3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm

Copy link
Contributor

@ash-t-luu ash-t-luu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good type safety inclusion and separation of concerns for uploading a file and showing panel

@ash-t-luu ash-t-luu merged commit 542ee2b into dev Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants