Skip to content

feat!: update module to be compatible with saucebase 2.0 - #8

Merged
sauce-base merged 11 commits into
mainfrom
dev-v2
Jun 4, 2026
Merged

feat!: update module to be compatible with saucebase 2.0#8
sauce-base merged 11 commits into
mainfrom
dev-v2

Conversation

@roble

@roble roble commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

This pull request makes several updates to the Themes module, focusing on codebase reorganization, improved configuration, and UI/UX refinements. The code has been moved from the app/ to the src/ directory, and configuration files have been updated to reflect this. There are also improvements to the theme panel's sidebar sync logic, and several naming conventions have been standardized for consistency. Additionally, the module.json file has been removed, and the composer.json and workflow/test scripts have been updated.

Codebase Reorganization and Configuration Updates:

  • Moved module source code from app/ to src/, updating all relevant paths in documentation and composer.json. [1] [2]
  • Removed the now-unnecessary module.json file.
  • Registered ThemesServiceProvider in composer.json and set autoloading to use the new src/ path.
  • Deleted the unused RouteServiceProvider class.

Naming and Convention Standardization:

  • Standardized the module name to lowercase (themes) in workflow files, test scripts, and task definitions for consistency. [1] [2] [3]

UI/UX and Functional Improvements:

  • Improved sidebar sync logic in ThemePanel.vue to prevent accidental overwriting of sidebar values and to accurately detect the sync state. [1] [2]
  • Updated the ThemePanel to use useColorMode instead of useDark for better color mode handling, and made minor UI adjustments for responsiveness and accessibility. [1] [2] [3]

Build and Licensing Updates:

  • Added version, license, and minimum stability fields to composer.json. [1] [2]
  • Updated the copyright year in LICENSE.

Frontend Code Structure:

  • Moved frontend entry point from resources/js/app.ts to resources/js/vue/app.ts and updated imports accordingly. [1] [2]

These changes improve the maintainability, consistency, and reliability of the Themes module.

roble added 11 commits April 25, 2026 21:58
Implement themes module with CRUD operations and improve documentation
- Implemented ThemePicker.vue for selecting themes with search functionality.
- Created fields.ts to define theme-related fields and their properties.
- Developed theme.ts for managing theme application, including font loading and CSS variable handling.
Add ThemePicker component and improve theme management utilities
Copilot AI review requested due to automatic review settings June 3, 2026 18:05

Copilot AI left a comment

Copy link
Copy Markdown

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 updates the Themes module for Saucebase 2.0 compatibility by reorganizing backend code under src/, updating module registration/configuration, and refining the theme editor UI (including color-mode persistence and sidebar sync behavior).

Changes:

  • Reorganized the module (move PHP sources to src/, remove module.json, update Composer/service provider registration, and remove the module RouteServiceProvider).
  • Enhanced theme editor UX/state handling (sidebar sync logic refinements, new picker/input components, and use of useColorMode with the appearance storage key).
  • Updated tooling and CI metadata (Taskfile, workflow module casing, and E2E coverage for color-mode persistence).

Reviewed changes

Copilot reviewed 16 out of 30 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/e2e/index.spec.ts Adds E2E assertions around color-mode persistence keys/cookie.
Taskfile.yml Updates Playwright project selector casing; adds db seeding task; updates type-gen command casing.
src/Services/ThemeService.php Introduces centralized theme/font discovery and JSON parsing helpers.
src/Providers/ThemesServiceProvider.php Registers console command and shares themes/fonts via Inertia using the new service.
src/Http/Controllers/ThemesController.php Adds REST endpoints for storing/updating/deleting user themes in storage.
src/Filament/ThemesPlugin.php Adds Filament plugin entry for the module.
src/Console/Commands/ApplyThemeCommand.php Adds CLI command to patch theme.css based on a theme JSON definition.
routes/web.php Wraps module routes in web middleware group and keeps CRUD endpoints.
resources/js/vue/utils/theme.ts Minor formatting/indentation adjustments in theme utilities.
resources/js/vue/fields.ts Minor formatting cleanup and sidebar group formatting.
resources/js/vue/components/ThemePicker.vue Updates to use useColorMode({ storageKey: 'appearance' }) and improves trigger styling.
resources/js/vue/components/ThemePanel.vue Switches from useDark to useColorMode, refines sidebar sync detection, and adjusts layout classes.
resources/js/vue/components/ThemeColorSwatch.vue Adds a compact theme preview swatch component.
resources/js/vue/components/TailwindColorPicker.vue Adds a searchable Tailwind palette picker (list/grid).
resources/js/vue/components/SliderInput.vue Adds combined slider + numeric input component for unit fields.
resources/js/vue/components/SearchInput.vue Adds reusable search input with clear control.
resources/js/vue/components/LinkToggle.vue Adds a reusable “linked/unlinked/partial” toggle control with tooltip.
resources/js/vue/components/FontPicker.vue Adds searchable font picker popover.
resources/js/vue/components/DialogSave.vue Adds dialog flow for saving a theme.
resources/js/vue/components/DialogCommand.vue Adds dialog for copying the CLI apply command.
resources/js/vue/components/ColorPickerPopover.vue Adds a full color picker popover with RGB/hex + Tailwind tab.
resources/js/vue/components/ColorInput.vue Adds color input integrating the color picker and cross-mode sync toggle.
resources/js/vue/app.ts Moves Vue entry point under resources/js/vue/ and registers ThemePanel.
resources/js/app.ts Re-exports from the new resources/js/vue/app entry point.
module.json Removes old module metadata file.
LICENSE Updates copyright year.
composer.json Updates package metadata, provider registration, autoload paths, and stability settings.
CLAUDE.md Updates documentation paths and Playwright project casing.
app/Providers/RouteServiceProvider.php Removes unused module RouteServiceProvider.
.github/workflows/test.yml Standardizes workflow module name casing to themes.
Comments suppressed due to low confidence (1)

resources/js/vue/components/ThemePanel.vue:79

  • isDark is computed from colorMode.value === 'dark', which ignores the common auto setting in useColorMode(). If the stored mode is auto and the system preference is dark, the document can be in dark mode while the ThemePanel still treats it as light, causing it to read/write the wrong mode’s variables.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread composer.json
Comment on lines +3 to +6
"description": "Themes module",
"type": "saucebase-module",
"license": "proprietary",
"version": "1.2.2",
@sauce-base
sauce-base merged commit 36ac089 into main Jun 4, 2026
4 of 5 checks passed
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.

3 participants