Skip to content

Custom Dark Theme - section updates & e2e tests#12798

Merged
mayagbarnes merged 4 commits intodevelopfrom
custom-dark-theme-fe-4
Oct 22, 2025
Merged

Custom Dark Theme - section updates & e2e tests#12798
mayagbarnes merged 4 commits intodevelopfrom
custom-dark-theme-fe-4

Conversation

@mayagbarnes
Copy link
Copy Markdown
Collaborator

@mayagbarnes mayagbarnes commented Oct 16, 2025

Describe your changes

Part 5 of Custom Dark Theme Feature

Resolves section merge issue introduced with updating to lodash merge in #12760

  • Use mergeWith instead to handle protobuf defaults
  • Have sidebar theme creation also use mergeWith

Adds e2e tests for theme.light and theme.dark configurations

  • Light/Dark e2e tests: Test precedence between [theme] & [theme.light/dark] configs
  • Sidebar light/dark e2e tests: Test precedence between [theme.light/dark], [theme.sidebar], & [theme.light/dark.sidebar] configs

Testing Plan

  • E2E Tests: ✅ Added
  • Manual Testing: ✅

@snyk-io
Copy link
Copy Markdown
Contributor

snyk-io bot commented Oct 16, 2025

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Licenses 0 0 0 0 0 issues
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Oct 16, 2025

✅ PR preview is ready!

Name Link
📦 Wheel file https://core-previews.s3-us-west-2.amazonaws.com/pr-12798/streamlit-1.50.0-py3-none-any.whl
📦 @streamlit/component-v2-lib Download from artifacts
🕹️ Preview app pr-12798.streamlit.app (☁️ Deploy here if not accessible)

Copy link
Copy Markdown
Collaborator Author

mayagbarnes commented Oct 16, 2025

@mayagbarnes mayagbarnes changed the title Add light/dark & sidebar light/dark e2e tests & snaps Custom Dark Theme - main menu update & e2e tests Oct 16, 2025
@mayagbarnes mayagbarnes added security-assessment-completed impact:users PR changes affect end users change:feature PR contains new feature or enhancement implementation labels Oct 16, 2025 — with Graphite App
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Oct 16, 2025

📉 Frontend coverage change detected

The frontend unit test (vitest) coverage has decreased by 0.0000%

  • Current PR: 84.8300% (48262 lines, 7317 missed)
  • Latest develop: 84.8300% (48252 lines, 7317 missed)

✅ Coverage change is within normal range.

📊 View detailed coverage comparison

@mayagbarnes mayagbarnes changed the title Custom Dark Theme - main menu update & e2e tests Custom Dark Theme - e2e tests Oct 16, 2025
@mayagbarnes mayagbarnes changed the base branch from custom-dark-theme-fe-3 to graphite-base/12798 October 16, 2025 22:40
@mayagbarnes mayagbarnes changed the base branch from graphite-base/12798 to custom-dark-theme-fe-3 October 16, 2025 22:41
@mayagbarnes mayagbarnes added change:chore PR contains maintenance or housekeeping change and removed change:feature PR contains new feature or enhancement implementation labels Oct 16, 2025
@sfc-gh-mbarnes sfc-gh-mbarnes force-pushed the custom-dark-theme-fe-4 branch 2 times, most recently from af33031 to 344d8ec Compare October 17, 2025 20:06
@mayagbarnes mayagbarnes marked this pull request as ready for review October 17, 2025 20:16
@mayagbarnes mayagbarnes requested a review from Copilot October 17, 2025 20:17
Copy link
Copy Markdown
Contributor

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 e2e tests for custom dark theme configurations, testing theme precedence between [theme], [theme.light], [theme.dark], and their sidebar-specific variants.

Key Changes

  • Custom light theme e2e tests: Tests theme precedence between [theme] and [theme.light] configurations with both auto and explicit theme selection
  • Custom dark theme e2e tests: Tests theme precedence between [theme] and [theme.dark] configurations with browser context set to dark mode preference
  • Sidebar-specific theme tests: Tests complex precedence rules between general theme configs, sidebar configs, and mode-specific sidebar configs

Reviewed Changes

Copilot reviewed 8 out of 50 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
e2e_playwright/theming/custom_light_theme_test.py Light theme e2e tests with fixture for theme configuration and tests for auto/explicit theme selection
e2e_playwright/theming/custom_light_theme.py Streamlit app script for light theme testing that imports shared theme tester
e2e_playwright/theming/custom_light_sidebar_theme_test.py Light sidebar theme tests with complex precedence validation for sidebar-specific configurations
e2e_playwright/theming/custom_light_sidebar_theme.py App script for light sidebar theme testing
e2e_playwright/theming/custom_dark_theme_test.py Dark theme e2e tests with browser context override and comprehensive theme switching validation
e2e_playwright/theming/custom_dark_theme.py App script for dark theme testing
e2e_playwright/theming/custom_dark_sidebar_theme_test.py Dark sidebar theme tests with multi-level configuration precedence testing
e2e_playwright/theming/custom_dark_sidebar_theme.py App script for dark sidebar theme testing

@mayagbarnes mayagbarnes changed the base branch from custom-dark-theme-fe-3 to graphite-base/12798 October 17, 2025 20:58
@mayagbarnes mayagbarnes changed the base branch from graphite-base/12798 to custom-dark-theme-fe-3 October 17, 2025 23:30
@mayagbarnes mayagbarnes changed the base branch from custom-dark-theme-fe-3 to graphite-base/12798 October 17, 2025 23:52
@mayagbarnes mayagbarnes changed the base branch from graphite-base/12798 to custom-dark-theme-fe-3 October 18, 2025 00:13
Base automatically changed from custom-dark-theme-fe-3 to develop October 18, 2025 00:25
@mayagbarnes mayagbarnes changed the title Custom Dark Theme - e2e tests Custom Dark Theme - section updates & e2e tests Oct 20, 2025
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.

suggestion (non-blocking): Great work on the test coverage here. From a testing pyramid perspective, run_theme_tester_app gives us valuable E2E coverage, but its snapshots can be high-maintenance. Since the core of these changes is in the JS, maybe we could test the logic with JS unit tests instead?

That would give us more focused, less brittle tests at a lower level, reserving the heavier snapshot tests for broader UI validation, of which we already have some decent coverage. What do you think about shifting the testing for this specific logic to JS unit tests? As indicated, this feedback is not blocking, but something to consider as a potential follow-up to lower the maintenance burden.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fair suggestion - these e2e tests were added for the full feature behavior vs. particularly this logic, but the custom theme e2e tests have become quite sprawling, so will look to consolidate in advanced theming follow ups

@mayagbarnes mayagbarnes merged commit 466441c into develop Oct 22, 2025
39 of 40 checks passed
@mayagbarnes mayagbarnes deleted the custom-dark-theme-fe-4 branch October 22, 2025 23:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

change:chore PR contains maintenance or housekeeping change impact:users PR changes affect end users

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants