Skip to content

Commit 4c574ec

Browse files
committed
Merge branch 'main' into edit_data_frame
* main: Add support for Shiny Express in Quarto Dashboards, take 2 (#1217) Force UTF-8 for Shiny Express on Windows (#1203) Typing fixes feat(card): Report full screen state as a Shiny input (#1215) Use TypeScript strict mode (#1208) Update author email test: Resolve testing comments (#1206) Fix URL Update badges Bump dev version to 0.8.1.9000 (#1202) chore(deps): Update bslib css (#1200) chore: no new features v0.8.1
2 parents cdce6a9 + 2b66c89 commit 4c574ec

File tree

91 files changed

+1818
-127
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+1818
-127
lines changed

.github/workflows/pytest.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,13 @@ jobs:
137137
run: |
138138
make playwright-deploys SUB_FILE=". -vv"
139139
140+
- uses: actions/upload-artifact@v4
141+
if: failure()
142+
with:
143+
name: "playright-examples-${{ matrix.os }}-${{ matrix.python-version }}-results"
144+
path: test-results/
145+
retention-days: 5
146+
140147
playwright-deploys:
141148
needs: [playwright-deploys-precheck]
142149
if: github.event_name != 'release' && (github.event_name == 'push' || (github.event_name == 'pull_request' && startsWith(github.head_ref, 'deploy')))
@@ -166,7 +173,6 @@ jobs:
166173
make playwright-deploys SUB_FILE=". -vv"
167174
168175
- name: Deploy apps and run tests (on `push` or on `pull_request` w/ `deploy**` branch)
169-
if: ${{ github.event_name == 'push' || (github.event_name == 'pull_request' && startsWith(github.head_ref, 'deploy')) }}
170176
env:
171177
DEPLOY_APPS: "true"
172178
DEPLOY_CONNECT_SERVER_URL: "https://rsc.radixu.com/"

CHANGELOG.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
### Breaking Changes
1111

12-
* `ui.page_sidebar()` now places the `title` element in a `.navbar` container that matches the structure of `page_navbar()`. This ensures that the title elements of `page_sidebar()` and `page_navbar()` have consistent appearance. (#1176)
13-
1412
### New features
1513

14+
* `ui.card()` and `ui.value_box()` now take an `id` argument that, when provided, is used to report the full screen state of the card or value box to the server. For example, when using `ui.card(id = "my_card", full_screen = TRUE)` you can determine if the card is currently in full screen mode by reading the boolean value of `input.my_card()["full_screen"]`. (#1215)
15+
16+
* Added support for using `shiny.express` in Quarto Dashboards. (#1217)
17+
18+
### Bug fixes
19+
20+
* On Windows, Shiny Express app files are now read in as UTF-8. (#1203)
21+
22+
### Other changes
23+
24+
## [0.8.1] - 2024-03-06
25+
26+
### Breaking Changes
27+
28+
* `ui.page_sidebar()` now places the `title` element in a `.navbar` container that matches the structure of `page_navbar()`. This ensures that the title elements of `page_sidebar()` and `page_navbar()` have consistent appearance. (#1176)
29+
1630
### Bug fixes
1731

1832
* Shiny now compiles the Bootstrap 5-based stylesheets for component styles imported from https://github.com/rstudio/shiny. (#1191)

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
# Shiny for Python
22

3-
[![Release](https://img.shields.io/github/v/release/rstudio/py-shiny)](https://img.shields.io/github/v/release/rstudio/py-shiny)
4-
[![Build status](https://img.shields.io/github/actions/workflow/status/rstudio/py-shiny/pytest.yaml?branch=main)](https://img.shields.io/github/actions/workflow/status/rstudio/py-shiny/pytest.yaml?branch=main)
5-
[![Supported Python versions](https://img.shields.io/pypi/pyversions/deptry)](https://pypi.org/project/deptry/)
6-
[![License](https://img.shields.io/github/license/rstudio/py-shiny)](https://img.shields.io/github/license/rstudio/py-shiny)
3+
[![PyPI Latest Release](https://img.shields.io/pypi/v/shiny.svg)](https://pypi.org/project/shiny/)
4+
[![Build status](https://img.shields.io/github/actions/workflow/status/posit-dev/py-shiny/pytest.yaml?branch=main)](https://img.shields.io/github/actions/workflow/status/posit-dev/py-shiny/pytest.yaml?branch=main)
5+
[![Conda Latest Release](https://anaconda.org/conda-forge/shiny/badges/version.svg)](https://anaconda.org/conda-forge/shiny)
6+
[![Supported Python versions](https://img.shields.io/pypi/pyversions/shiny)](https://pypi.org/project/shiny/)
7+
[![License](https://img.shields.io/github/license/posit-dev/py-shiny)](https://github.com/posit-dev/py-shiny/blob/main/LICENSE)
78

89
Shiny for Python is the best way to build fast, beautiful web applications in Python. You can build quickly with Shiny and create simple interactive visualizations and prototype applications in an afternoon. But unlike other frameworks targeted at data scientists, Shiny does not limit your app's growth. Shiny remains extensible enough to power large, mission-critical applications.
910

js/build.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const outDir = "../shiny/www/shared/py-shiny";
1414

1515
async function bundle_helper(
1616
options: BuildOptions
17-
): Promise<ReturnType<typeof build>> {
17+
): Promise<ReturnType<typeof build> | undefined> {
1818
try {
1919
const result = await build({
2020
format: "esm",

js/package-lock.json

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"@types/node": "^20.2.5",
1818
"@types/react": "^18.0.33",
1919
"@types/react-dom": "^18.0.11",
20-
"@types/rstudio-shiny": "git+https://git@github.com/rstudio/shiny.git#v1.7.4",
20+
"@types/rstudio-shiny": "git+https://git@github.com/rstudio/shiny.git#v1.8.0",
2121
"@typescript-eslint/eslint-plugin": "^5.59.7",
2222
"@typescript-eslint/parser": "^5.59.7",
2323
"esbuild": "^0.18.11",

js/page-output/page-output.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,15 @@ class PageOutputBinding extends Shiny.OutputBinding {
88
}
99

1010
onValueError(el: HTMLElement, err: ErrorsMessageValue): void {
11-
Shiny.unbindAll(el);
11+
if (Shiny.unbindAll) Shiny.unbindAll(el);
1212
this.renderError(el, err);
1313
}
1414

1515
async renderValue(
1616
el: HTMLElement,
17-
data: Parameters<typeof Shiny.renderContent>[1]
17+
data: Parameters<typeof Shiny.renderContentAsync>[1]
1818
): Promise<void> {
19+
if (data === null) return;
1920
if (el !== document.body) {
2021
throw new Error(
2122
'Output with class "shiny-page-output" must be a <body> tag.'
@@ -66,7 +67,7 @@ class PageOutputBinding extends Shiny.OutputBinding {
6667
data.html = content;
6768
}
6869

69-
await Shiny.renderContent(el, data);
70+
await Shiny.renderContentAsync(el, data);
7071
}
7172
}
7273

js/text-area/textarea-autoresize.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@ export interface DOMEvent<T extends EventTarget> extends Event {
88
function onDelegatedEvent(
99
eventName: string,
1010
selector: string,
11-
callback: (target: EventTarget) => void
11+
callback: (target: HTMLTextAreaElement) => void
1212
) {
13-
document.addEventListener(eventName, (e: DOMEvent<HTMLTextAreaElement>) => {
14-
if (e.target.matches(selector)) {
15-
callback(e.target);
13+
document.addEventListener(eventName, (e) => {
14+
const e2 = e as DOMEvent<HTMLTextAreaElement>;
15+
if (e2.target.matches(selector)) {
16+
callback(e2.target);
1617
}
1718
});
1819
}
@@ -41,8 +42,9 @@ function update_on_load() {
4142
}
4243

4344
// document.readyState in ["interactive", "complete"];\
44-
document
45-
.querySelectorAll("textarea.textarea-autoresize")
46-
.forEach(update_height);
45+
const textAreas = document.querySelectorAll(
46+
"textarea.textarea-autoresize"
47+
) as NodeListOf<HTMLTextAreaElement>;
48+
textAreas.forEach(update_height);
4749
}
4850
update_on_load();

js/tsconfig.json

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,24 @@
11
{
22
"compilerOptions": {
3-
"module": "ES2020",
4-
"lib": ["ES2021", "DOM"],
3+
"module": "ES2022",
4+
"lib": ["ES2022", "dom", "dom.iterable"],
55
"jsx": "react",
66
"noImplicitAny": true,
77
"removeComments": true,
88
"preserveConstEnums": true,
99
"sourceMap": true,
10-
"target": "ES2020",
11-
"isolatedModules": true,
1210
"moduleResolution": "node",
13-
"esModuleInterop": true
11+
"noEmit": true,
12+
"esModuleInterop": true,
13+
"skipLibCheck": true,
14+
"target": "ES2022",
15+
"allowJs": true,
16+
"resolveJsonModule": true,
17+
"moduleDetection": "force",
18+
"isolatedModules": true,
19+
"strict": true,
20+
"noUncheckedIndexedAccess": true
1421
},
15-
"include": ["**/*.tsx", "**/*.ts"]
22+
"include": ["**/*.tsx", "**/*.ts"],
23+
"exclude": ["dataframe/*"],
1624
}

scripts/htmlDependencies.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ ignore <- capture.output({
2020
pak::pkg_install(c(
2121
"rstudio/bslib@main",
2222
"rstudio/shiny@main",
23+
"rstudio/sass@main",
2324
"cran::htmltools"
2425
))
2526
#pak::pkg_install(c("rstudio/bslib@main", "rstudio/shiny@main", "rstudio/htmltools@main"))

0 commit comments

Comments
 (0)