Skip to content

chore(ui): Deprecate output_text_verbatim() with warning - #2097

Merged
schloerke merged 19 commits into
mainfrom
add-deprecation-warnings-for-output_txt_verbatim
Jul 29, 2026
Merged

chore(ui): Deprecate output_text_verbatim() with warning#2097
schloerke merged 19 commits into
mainfrom
add-deprecation-warnings-for-output_txt_verbatim

Conversation

@karangattu

@karangattu karangattu commented Oct 14, 2025

Copy link
Copy Markdown
Collaborator

Added a deprecation warning to the output_text_verbatim
`ui.output_text_verbatim()` is now deprecated in favor of `ui.output_text()` for text output and `ui.output_code()` for code output. This update adds a deprecation notice to the changelog.
@schloerke schloerke changed the title chore(output_text_verbatim): Deprecate output_text_verbatim with warning chore(ui): Deprecate output_text_verbatim() with warning Oct 16, 2025

@schloerke schloerke left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Also adjust @render.text to @render.code

Comment thread tests/playwright/examples/example_apps.py Outdated
Comment thread shiny/ui/_output.py Outdated
Comment thread shiny/ui/_output.py

@schloerke schloerke left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM given comments / ✅ s

Comment thread shiny/ui/_output.py
Comment thread shiny/ui/_output.py Outdated
Comment thread shiny/ui/_output.py Outdated
Comment thread shiny/ui/_output.py Outdated

@schloerke schloerke left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

(See comments)

karangattu and others added 4 commits October 16, 2025 21:42
Replaces @render.text with @render.code in multiple example, test, and template apps to standardize output for monospaced/code-style text. Updates documentation and deprecation warnings to reflect the change, and removes related test error allowances for deprecated output_text_verbatim usage.
Changed the output label from 'Output text verbatim content' to 'Output Code content' in the app and updated the corresponding test to match the new label and output type.
@karangattu
karangattu requested a review from schloerke October 24, 2025 17:32
The deprecation notice named v1.6.0, but 1.7.0 has already shipped, so the
next release is v1.8.0. Also adds the missing space between the two sentences
of the message, drops the docstring cross-references to the deprecated
function from `output_text()` and `output_code()` (`output_code()`'s See Also
had come to reference itself), and covers the warning with a unit test.
…output_code()`

These examples, test apps, and the bundled testing skill were added to main
after this branch opened, so they would all emit the new deprecation warning.
Paired `@render.text` decorators become `@render.code`, and test controllers
become `OutputCode` (identical locator and API to `OutputTextVerbatim`, which
no longer has any app in the repo to target).

Drops tests/playwright/shiny/outputs/test_output_text_verbatim.py: its app
fixture is the `input_text` example, which now uses `output_code`, leaving the
test a duplicate of `test_input_text_app` with placeholder coverage already in
test_output_code.py.
`OutputTextVerbatim` only makes sense against `ui.output_text_verbatim()`, so it
is deprecated on the same schedule; constructing one now warns and points at
`OutputCode`, which has an identical locator and API.

Restores an end-to-end test of `ui.output_text_verbatim()` under
tests/playwright/shiny/deprecated/, with its own app so the deprecated output
container keeps its coverage until it is removed.
…d sections

`ui.output_text_verbatim` joins the existing Deprecated section in the core
reference, and the testing reference gains one at the bottom for
`playwright.controller.OutputTextVerbatim`, so neither sits alongside the
replacement it should not be confused with.
It is deprecated in favor of `render.download_button()` / `render.download_link()`
but was still listed beside them under "Rendering outputs".
…recated section

It still exists but is intentionally left out of the reference, so record it as a
commented entry rather than leaving its absence look like an oversight.
Its example was borrowed from `input_text`, which now demonstrates
`output_code()`, so the deprecated function's page was showing an example that
never called it. Matches `ui.panel_well()`, the other deprecated UI function.
…erbatim()`

Requested in review; it was dropped when the See Also section was retargeted at
the replacement UI functions.
…on messages

Of the 19 deprecation messages in the package, only one states a version, and it
is an argument consolidation rather than a symbol. Follow the dominant
```X` is deprecated. Please use `Y` instead.`` shape instead, which also removes
a version string that would need bumping if the release slips.
@schloerke
schloerke enabled auto-merge (squash) July 29, 2026 20:17
@schloerke
schloerke merged commit 94ac2b4 into main Jul 29, 2026
176 checks passed
@schloerke
schloerke deleted the add-deprecation-warnings-for-output_txt_verbatim branch July 29, 2026 20:18
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.

2 participants