Skip to content

Conversation

karangattu
Copy link
Collaborator

@karangattu karangattu commented Oct 7, 2025

The most significant changes include

  • The OutputDataFrame.set_filter() controller now supports advanced multi-column filters, allowing users to specify filters for multiple columns at once, including mapping values to columns and supporting tuples/lists for range and multi-column filtering.
  • Refactored DownloadLink and DownloadButton controllers to use a shared _DownloadMixin, reducing code duplication and ensuring consistent behavior for download controls.
  • Added new Playwright tests and example applications for both download buttons and links, verifying label, width, and download functionality.
  • Enhanced the documentation for output_code by replacing the @no_example decorator with @add_example and providing new example applications for both the core and express APIs.
  • Updated CHANGELOG.md to document the new multi-column filter support in the OutputDataFrame.set_filter() controller.
  • Add test for OutputTextVerbatim controllers

#1281

@karangattu karangattu requested a review from schloerke October 8, 2025 03:54
@schloerke schloerke requested a review from Copilot October 9, 2025 17:29
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds comprehensive testing infrastructure for Shiny controllers by implementing Playwright tests for output components and download functionality. The changes enhance the testing coverage for OutputTextVerbatim, OutputCode, and download components (DownloadLink and DownloadButton), while also adding advanced multi-column filtering support for OutputDataFrame.

  • Add Playwright tests for OutputTextVerbatim and OutputCode controllers with placeholder and value expectations
  • Implement comprehensive test suites for DownloadLink and DownloadButton with kitchen sink applications
  • Enhance OutputDataFrame.set_filter() to support multi-column filters, tuples, and advanced filtering patterns
  • Refactor download controllers to use a shared _DownloadMixin for code reuse

Reviewed Changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/playwright/shiny/outputs/test_output_text_verbatim.py New Playwright test for OutputTextVerbatim controller
tests/playwright/shiny/outputs/test_output_code.py New Playwright test for OutputCode controller with placeholder testing
tests/playwright/shiny/components/nav/navset_bar_kitchensink/app.py Refactored navset_bar application with improved structure
tests/playwright/shiny/components/download_link/test_download_link_kitchensink.py Comprehensive test suite for DownloadLink controller
tests/playwright/shiny/components/download_link/app.py Kitchen sink application for testing download links
tests/playwright/shiny/components/download_button/test_download_button_kitchensink.py Comprehensive test suite for DownloadButton controller
tests/playwright/shiny/components/download_button/app.py Kitchen sink application for testing download buttons
tests/playwright/shiny/components/data_frame/filter_reset/test_filter_reset.py Extended tests for advanced OutputDataFrame filtering capabilities
shiny/ui/_output.py Updated output_code documentation from @no_example to @add_example
shiny/playwright/controller/_output.py Enhanced OutputDataFrame.set_filter() with multi-column support
shiny/playwright/controller/_file.py Refactored download controllers using shared _DownloadMixin
shiny/api-examples/output_code/app-express.py New example application for output_code in express API
shiny/api-examples/output_code/app-core.py New example application for output_code in core API
CHANGELOG.md Documentation of multi-column filter support
Comments suppressed due to low confidence (2)

tests/playwright/shiny/components/data_frame/filter_reset/test_filter_reset.py:1

  • [nitpick] String concatenation with space-separated literals should be combined into single strings for better readability.
from playwright.sync_api import Page, expect

tests/playwright/shiny/components/data_frame/filter_reset/test_filter_reset.py:1

  • [nitpick] String concatenation with space-separated literals should be combined into single strings for better readability.
from playwright.sync_api import Page, expect

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@karangattu karangattu requested a review from schloerke October 10, 2025 15:03
Updated the import of ListOrTuple to use a relative path, ensuring compatibility with the current package structure.
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