Skip to content

Commit ec5cf4e

Browse files
authored
Merge pull request #5712 from Textualize/no-text-visual
snapshots
2 parents 8966017 + d216576 commit ec5cf4e

Some content is hidden

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

45 files changed

+2447
-2260
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1515
### Changed
1616

1717
- Collapsible title now accepts str, Text, or Content https://github.com/Textualize/textual/pull/5697
18+
- Rich Text objects will be converted to Content in OptionList and other widgets https://github.com/Textualize/textual/pull/5712
1819

1920
## [3.0.1] - 2025-04-01
2021

src/textual/visual.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def visualize(widget: Widget, obj: object, markup: bool = True) -> Visual:
8686
return Content.from_markup(obj) if markup else Content(obj)
8787

8888
if is_renderable(obj):
89-
if isinstance(obj, Text) and widget.allow_select:
89+
if isinstance(obj, Text):
9090
return Content.from_rich_text(obj, console=widget.app.console)
9191

9292
# If its is a Rich renderable, wrap it with a RichVisual

tests/snapshot_tests/__snapshots__/test_snapshots/test_add_remove_tabs.svg

Lines changed: 62 additions & 62 deletions
Loading

tests/snapshot_tests/__snapshots__/test_snapshots/test_auto_grid_default_height.svg

Lines changed: 59 additions & 59 deletions
Loading

tests/snapshot_tests/__snapshots__/test_snapshots/test_auto_tab_active.svg

Lines changed: 65 additions & 65 deletions
Loading

tests/snapshot_tests/__snapshots__/test_snapshots/test_bind_override.svg

Lines changed: 62 additions & 62 deletions
Loading

tests/snapshot_tests/__snapshots__/test_snapshots/test_bindings_screen_overrides_show.svg

Lines changed: 58 additions & 58 deletions
Loading

tests/snapshot_tests/__snapshots__/test_snapshots/test_collapsible_collapsed.svg

Lines changed: 60 additions & 60 deletions
Loading

tests/snapshot_tests/__snapshots__/test_snapshots/test_collapsible_expanded.svg

Lines changed: 61 additions & 61 deletions
Loading

tests/snapshot_tests/__snapshots__/test_snapshots/test_collapsible_render.svg

Lines changed: 61 additions & 61 deletions
Loading

0 commit comments

Comments
 (0)