Remove SettingsDialog#14048
Conversation
✅ PR preview is ready!
|
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
📉 Significant bundle size change detected
Please verify that this change is expected. |
📈 Frontend coverage change detectedThe frontend unit test (vitest) coverage has increased by 0.1700%
🎉 Great job on improving test coverage! |
There was a problem hiding this comment.
Pull request overview
This PR removes the standalone Settings dialog and integrates its functionality directly into the main menu. The Settings menu item has been deleted, and all settings controls (theme selection via radio buttons, auto-rerun toggle, and version footer with copy button) are now accessed directly from the main menu without opening a separate modal dialog.
Changes:
- Frontend: Completely removed
SettingsDialogcomponent, related test file, styled components, dialog type enum entry, and all callbacks/plumbing (settingsCallbackinApp.tsx,MainMenu.tsx) - E2E Tests: Migrated 5 theming test files from Settings dialog selectbox flow to main menu
menuitemradiobuttons using accessible selectors, deleted 2 obsolete Settings dialog tests frommain_menu_test.py - Documentation: Updated JSDoc references from
@see SettingsDialogto@see MainMenuinThemeContext.tsxand updated comment intypes.ts
Reviewed changes
Copilot reviewed 18 out of 49 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
frontend/lib/src/theme/types.ts |
Updated JSDoc comment to reference main menu theme selector instead of SettingsDialog |
frontend/lib/src/components/core/ThemeContext.tsx |
Updated JSDoc @see references from SettingsDialog to MainMenu |
frontend/app/src/components/StreamlitDialog/styled-components.ts |
Removed 9 styled components that were only used by SettingsDialog |
frontend/app/src/components/StreamlitDialog/constants.ts |
Removed SETTINGS from DialogType enum |
frontend/app/src/components/StreamlitDialog/StreamlitDialog.tsx |
Removed SettingsDialog import, SettingsProps interface, and SETTINGS case from switch |
frontend/app/src/components/StreamlitDialog/SettingsDialog.tsx |
Deleted entire SettingsDialog component (223 lines) |
frontend/app/src/components/StreamlitDialog/SettingsDialog.test.tsx |
Deleted entire test file (341 lines) |
frontend/app/src/components/MainMenu/MainMenu.tsx |
Removed settingsCallback prop and Settings menu item from buildDevItems |
frontend/app/src/components/MainMenu/MainMenu.test.tsx |
Updated all tests to reflect removal of Settings item (test expectations, focus navigation, etc.) |
frontend/app/src/App.tsx |
Removed settingsCallback method and prop |
frontend/app/src/App.test.tsx |
Updated menu label expectations to exclude Settings |
e2e_playwright/theming/*.py (5 files) |
Migrated theme switching tests from Settings dialog selectbox to main menu menuitemradio |
e2e_playwright/main_menu_test.py |
Deleted 2 Settings dialog tests, added version footer test with data-copy-state assertion |
e2e_playwright/hostframe_app_test.py |
Updated test to open Clear cache modal instead of Settings |
e2e_playwright/__snapshots__/**/*.png |
Deleted 12 Settings dialog snapshots, updated 6 main menu snapshots |
SummaryThis PR removes the
The PR deletes Code QualityThe code changes are clean and well-organized:
Test CoverageTest coverage is thorough and properly updated: Frontend Unit Tests (MainMenu.test.tsx):
App.test.tsx:
E2E Tests:
Backwards Compatibility
Security & RiskNo security concerns identified. The changes are purely UI refactoring:
Low regression risk: the functionality isn't lost, it's migrated to the main menu (implemented in prior PRs on this feature branch). AccessibilityThe migration is a net positive for accessibility:
Recommendations
VerdictAPPROVED: Clean, thorough removal of the This is an automated AI review by |
- Removes the **Settings** menu item from the main menu and deletes the `SettingsDialog` component entirely. All Settings dialog functionality has been absorbed by the new main menu:
- **Theme switching** → theme radio buttons (System / Light / Dark) in the menu
- **Auto-rerun (Run on save)** → toggle in the menu
- **Version footer** → footer in the menu
- **Wide mode** → removed from UI (set via `st.set_page_config(layout="wide")`)
- Migrates **5 theming E2E test files** from the Settings dialog selectbox flow to the main menu's `menuitemradio` buttons, using accessible selectors (`get_by_role("menuitemradio", name="Dark")`).
- Deletes `test_renders_settings_dialog_properly` and `test_settings_dialog_copies_version` from `main_menu_test.py` (coverage is now provided by the menu footer tests).
- Removes `SETTINGS` from the `DialogType` enum and all associated plumbing (`settingsCallback` in `App.tsx`, `Props`, `buildDevItems`, `StreamlitDialog` switch case).
- Cleans up orphaned styled components and updates stale `@see SettingsDialog` JSDoc references in `ThemeContext.tsx` and `types.ts`.
This PR is the culmination of the following PRs approved into this feature branch: - [Core `MainMenu` Refactor](#13833) - [`MainMenu` accessibility improvements](#13878) - [Add theme switcher to `MainMenu`](#13937) - [Add auto-rerun toggle to `MainMenu`](#13988) - [Add version footer to `MainMenu`](#14028) - [Remove `SettingsDialog`](#14048)
Describe your changes
SettingsDialogcomponent entirely. All Settings dialog functionality has been absorbed by the new main menu:st.set_page_config(layout="wide"))menuitemradiobuttons, using accessible selectors (get_by_role("menuitemradio", name="Dark")).test_renders_settings_dialog_properlyandtest_settings_dialog_copies_versionfrommain_menu_test.py(coverage is now provided by the menu footer tests).SETTINGSfrom theDialogTypeenum and all associated plumbing (settingsCallbackinApp.tsx,Props,buildDevItems,StreamlitDialogswitch case).StyledDialogBody,StyledFullRow,StyledCheckbox,StyledLabel,StyledVersionRow,StyledVersionText,StyledHr,StyledButtonContainer) and updates stale@see SettingsDialogJSDoc references inThemeContext.tsxandtypes.ts.Testing Plan