Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(snippets): Add a Shiny Express app snippet #42

Merged
merged 4 commits into from
Apr 26, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

- The extension now supports Shiny for R apps. (#30)
- The [Python VS Code extension](https://marketplace.visualstudio.com/items?itemName=ms-python.python) is now a soft dependency and is no longer installed by default with the Shiny for VS Code extension. (#30)
- Added a new `shinyexpress` snippet to quickly create a basic Shiny Express app in Python. (#42)

## 0.1.6

Expand Down
20 changes: 18 additions & 2 deletions snippets/shiny.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,23 @@
"app = App(app_ui, server)",
""
],
"description": "Basic Shiny app skeleton"
"description": "Basic Shiny Core app skeleton"
},
"Shiny Express application": {
"scope": "python",
"prefix": "shinyexpress",
"body": [
"from shiny.express import input, render, ui",
"",
"ui.input_slider(\"n\", \"N\", 0, 100, 20)",
"",
"",
"@render.text",
"def txt():",
"\t\treturn f\"n*2 is {input.n() * 2}\"",
gadenbuie marked this conversation as resolved.
Show resolved Hide resolved
""
],
"description": "Basic Shiny Express app skeleton"
},
"Shiny module": {
"scope": "python",
Expand Down Expand Up @@ -93,4 +109,4 @@
"}"
]
}
}
}
Loading