mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Add sparkline widget. (#2631)
* Sparkline widget proof of concept. * Address review comment. Related comments: https://github.com/Textualize/textual/pull/2631\#discussion_r1202894414 * Blend background colours. * Add widget sparkline. * Add snapshot tests. * Add documentation. * Update roadmap. * Address review feedback. Relevant comments: https://github.com/Textualize/textual/pull/2631\#discussion_r1210394532, https://github.com/Textualize/textual/pull/2631\#discussion_r1210442013 * Improve docs. Relevant comments: https://github.com/Textualize/textual/pull/2631\#issuecomment-1568529074 * Update snapshot app titles. * Don't init summary function with None Related comments: https://github.com/Textualize/textual/pull/2631\#discussion_r1211666076 * Apply suggestions from code review Co-authored-by: Dave Pearson <davep@davep.org> * Improve wording. * Improve wording. * Simplify example. --------- Co-authored-by: Dave Pearson <davep@davep.org>
This commit is contained in:
committed by
GitHub
parent
7049014faa
commit
78db024c01
@@ -279,6 +279,14 @@ def test_select_expanded_changed(snap_compare):
|
||||
)
|
||||
|
||||
|
||||
def test_sparkline_render(snap_compare):
|
||||
assert snap_compare(WIDGET_EXAMPLES_DIR / "sparkline.py")
|
||||
|
||||
|
||||
def test_sparkline_component_classes_colors(snap_compare):
|
||||
assert snap_compare(WIDGET_EXAMPLES_DIR / "sparkline_colors.py")
|
||||
|
||||
|
||||
# --- CSS properties ---
|
||||
# We have a canonical example for each CSS property that is shown in their docs.
|
||||
# If any of these change, something has likely broken, so snapshot each of them.
|
||||
|
||||
Reference in New Issue
Block a user