chore(ui): Deprecate output_text_verbatim() with warning - #2097
Merged
schloerke merged 19 commits intoJul 29, 2026
Conversation
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.
output_text_verbatim() with warning
schloerke
requested changes
Oct 16, 2025
schloerke
left a comment
Collaborator
There was a problem hiding this comment.
Also adjust @render.text to @render.code
schloerke
reviewed
Oct 16, 2025
schloerke
reviewed
Oct 16, 2025
schloerke
reviewed
Oct 16, 2025
schloerke
approved these changes
Oct 16, 2025
schloerke
left a comment
Collaborator
There was a problem hiding this comment.
LGTM given comments / ✅ s
schloerke
reviewed
Oct 16, 2025
schloerke
reviewed
Oct 16, 2025
schloerke
reviewed
Oct 16, 2025
schloerke
reviewed
Oct 16, 2025
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.
…tps://github.com/posit-dev/py-shiny into add-deprecation-warnings-for-output_txt_verbatim
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
enabled auto-merge (squash)
July 29, 2026 20:17
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added a deprecation warning to the
output_text_verbatim()output_text_verbatimwithoutput_codein UI py-shiny-templates#47