Skip to content

Commit 0b10ec3

Browse files
committed
fix: conditionally show Shinylive explorer menu item
Only display "Create Shinylive Link from Selected Files" in the explorer context menu when right-clicking on a Shiny app file or folder.
1 parent a898bdd commit 0b10ec3

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Change Log
22

3+
## [UNRELEASED]
4+
5+
- The "Create Shinylive Link from Selected Files" context menu item now only appears when right-clicking on a Shiny app file (e.g., `app.py`, `app.R`, `ui.R`) or a folder. (#105)
6+
37
## [1.3.3]
48

59
- New `shiny.timeoutOpenBrowser` option sets the maximum time to wait (in seconds) for a Shiny app to be ready before attempting to open it in the browser. (@olivroy #82)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@
103103
{
104104
"command": "shiny.shinylive.createFromExplorer",
105105
"group": "shinylive",
106-
"when": "true"
106+
"when": "explorerResourceIsFolder || resourceFilename =~ /^(app\\.(py|r)|(app[-_].+|.+[-_]app)\\.(py|r)|(ui|server|global)\\.r)$/i"
107107
}
108108
],
109109
"commandPalette": [

0 commit comments

Comments
 (0)