-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #278 This PR refactors logic related to opening previews. We were using `showIDEPanel` for `RNIDE.showPanel`/`RNIDE.openPanel` commands, the launch preview depended on the existence of the `fileName` and `lineNumber`. The problem is that VSCode passes its arguments there, but instead number in lineNumber we get an object with the panel's id, which triggers this logic always. Thus, I refactored the opening preview to use a separate command. Additionally, startPreview was running even if the project wasn't set up yet, which led to an error that we used `.project` on `null`. Now, we open the panel and show a warning in that case. ### How Has This Been Tested: Repeat those scenarios for preview both in `tab panel` and `side panel`: **Steps:** - Close the IDE panel - Reopen (or restart if in debug mode) VSCode - Open IDE panel from top right corner **Expected:** The panel opens without error dialog. **Steps:** - Close the IDE panel - Reopen (or restart if in debug mode) VSCode - Click "Open preview" **Expected:** Confirm that panel opens and there is warning message **Steps:** - Make sure IDE Panel is open - Click "Open preview" **Expected:** Confirm that preview started _Tested on react-native-76_
- Loading branch information
1 parent
2ae1cbe
commit 7c96d14
Showing
4 changed files
with
18 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters