refactor: enhance UI components with toggle switches and loading screen - #4
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the in-game UI to use a centralized theme/token system, replaces many checkbox controls with a unified toggle-switch component, and adds a settings + loading/transition experience to the main floating window.
Changes:
- Introduces a design-token theme (
theme.css) and runtime settings (settings.ts,SettingsPanel) to control appearance/animations. - Updates multiple module pages (translation, privacy, utility pages, etc.) to use the new toggle-switch UI and refreshed layout/styling.
- Adds animated view transitions and a boot/loading screen to the main
Layerwindow and modernizes core styling.
Reviewed changes
Copilot reviewed 26 out of 27 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| vite.config.ts | Forces Rollup to inline dynamic imports (single-bundle output). |
| src/theme.css | Adds global design tokens (colors, spacing, typography, z-index, etc.) scoped to Shadow DOM :host. |
| src/settings.ts | Adds persisted user settings plus applySettings for CSS variables + theme switching. |
| src/main.tsx | Ensures design tokens load before other styles; continues Shadow DOM CSS injection flow. |
| src/Layer.tsx | Adds settings overlay, navigation direction tracking, loading screen, and animated transitions. |
| src/Layer.css | Major style overhaul to use tokens; adds settings/loading/transition styling. |
| src/index.css | Major global styling overhaul; introduces toggle-switch UI styles and utility classes. |
| src/components/tabs.css | Rethemes tabs using design tokens and improved hover/active styling. |
| src/components/SettingsPanel.tsx | New settings UI to tweak theme/typography/effects and persist to localStorage. |
| src/components/ModuleList.tsx | Adds grouped rendering, icons, and cleaned display names for module list. |
| src/components/ModuleHeader.tsx | Styles location info and back button to match new theme. |
| src/components/LoadingScreen.tsx | New boot/loading animation component shown when expanding. |
| src/modules/util_unlock/page.tsx | Replaces checkbox with toggle-switch UI. |
| src/modules/util_lock/page.tsx | Replaces checkbox with toggle-switch UI. |
| src/modules/util_remove_submissive/page.tsx | Replaces checkbox with toggle-switch UI. |
| src/modules/util_remove_limit/page.tsx | Replaces checkbox list with toggle-switch rows. |
| src/modules/util_editor/page.tsx | Converts multiple checkboxes to toggle-switch rows and improves button layout. |
| src/modules/ungarbled_messages/page.tsx | Replaces checkbox with toggle-switch UI. |
| src/modules/chat_export/page.tsx | Replaces checkbox with toggle-switch UI. |
| src/modules/util_trap/TrapMain.tsx | Updates trap-room toggle UI and adjusts script enabled checkbox styling. |
| src/modules/translation/style.css | Rethemes translation statuses with tokenized colors/typography. |
| src/modules/translation/bio-style.css | Improves readability and rethemes bio translation table/status colors. |
| src/modules/translation/page.css | Adds structured layout styles for translation forms/config sections. |
| src/modules/translation/page.tsx | Refactors translation UI layout and button labels; adjusts error display string. |
| src/modules/privacy/page.tsx | Refactors privacy config UI into toggle groups/sections; minor text structure tweaks. |
| src/modules/history/HistoryEntryList.tsx | Reorders listener + render method (functional behavior intended unchanged). |
| package-lock.json | Removes rollup-plugin-visualizer and its transitive dependencies. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.