Skip to content

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

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

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

Conversation

@roble

@roble roble commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

This pull request makes several important changes to the Announcements module to improve its structure, configuration, and developer experience. The main updates include refactoring the codebase for better modularity, updating configuration files, and enhancing developer tooling and workflows.

Module structure and configuration:

  • Refactored the module to move source code from the app/ directory to src/, updated autoload paths in composer.json, and removed the now-unnecessary app/Providers/RouteServiceProvider.php. [1] [2]
  • Updated composer.json to include the module version, description, license, and provider registration, and added a test support namespace. [1] [2]
  • Removed the legacy module.json file in favor of using composer.json for module metadata.

Developer tooling and workflow improvements:

  • Added a database seeder (database/seeders/DatabaseSeeder.php) and a corresponding db:seed task in Taskfile.yml for easier local development and testing. [1] [2]
  • Standardized the module name to lowercase (announcements) in workflow files, Playwright E2E test commands, and code generation scripts for consistency. [1] [2] [3]

Frontend code organization:

  • Moved Announcements module frontend setup from resources/js/app.ts to resources/js/vue/app.ts and updated the main entry point to re-export from the new location. Also updated the import path for the module CSS. [1] [2]

Routing and API improvements:

  • Wrapped API and web routes with the appropriate middleware and added type hints for better maintainability and clarity. [1] [2]

Documentation and metadata updates:

  • Updated documentation and comments to reflect changes in TypeScript type augmentation and Playwright test naming. [1] [2]
  • Updated the copyright year in LICENSE.

These changes collectively improve the maintainability, modularity, and developer experience of the Announcements module.

Copilot AI review requested due to automatic review settings June 3, 2026 18:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 Announcements module for Saucebase 2.0 by modernizing module metadata/config, moving PHP source to src/, and reorganizing the frontend integration (Vue banner + entrypoints), along with some DX improvements (tasks, seeding, workflows).

Changes:

  • Move module PHP source from app/ to src/, adjust Composer autoloading/provider registration, and remove the legacy route service provider + module.json.
  • Add/adjust Announcements runtime features: new Announcement model, dismissal controller/route, and Filament resource pages/schemas/tables.
  • Reorganize frontend setup into resources/js/vue/*, add the banner component, and update module typing augmentation.

Reviewed changes

Copilot reviewed 15 out of 25 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
Taskfile.yml Updates Playwright project naming + adds seeding and type-generation tasks.
src/Providers/AnnouncementsServiceProvider.php Keeps Inertia prop sharing, removes legacy module/provider fields.
src/Models/Announcement.php Introduces the Eloquent Announcement model and active() scope.
src/Http/Controllers/DismissAnnouncementController.php Adds controller to set dismissal cookie for announcements.
src/Filament/Resources/Announcements/Tables/AnnouncementsTable.php Adds Filament table configuration for announcements listing.
src/Filament/Resources/Announcements/Schemas/AnnouncementForm.php Adds Filament form schema for create/edit.
src/Filament/Resources/Announcements/Pages/ListAnnouncements.php Adds Filament list page.
src/Filament/Resources/Announcements/Pages/EditAnnouncement.php Adds Filament edit page.
src/Filament/Resources/Announcements/Pages/CreateAnnouncement.php Adds Filament create page and sets created_by.
src/Filament/Resources/Announcements/AnnouncementResource.php Tweaks Filament navigation sort order.
src/Filament/AnnouncementsPlugin.php Adds Filament panel plugin wiring for the module.
routes/web.php Wraps dismiss route in explicit web middleware group.
routes/api.php Wraps API routes in explicit api middleware group + typed closures.
resources/js/vue/components/AnnouncementBanner.vue Adds the Vue banner component and dismissal UX.
resources/js/vue/app.ts Moves module JS setup into a Vue sub-entrypoint.
resources/js/types/page-props.d.ts Switches Inertia PageProps augmentation to @inertiajs/core.
resources/js/app.ts Re-exports from the new resources/js/vue/app.ts entrypoint.
module.json Removes legacy module metadata file in favor of composer.json.
LICENSE Updates copyright year.
database/seeders/DatabaseSeeder.php Adds module DatabaseSeeder entrypoint.
composer.json Adds module metadata (version/license/description), provider registration, and updates autoload paths to src/.
CLAUDE.md Updates docs to match new Inertia augmentation + Playwright project naming.
app/Providers/RouteServiceProvider.php Removes module RouteServiceProvider (routes now middleware-wrapped in route files).
.github/workflows/test.yml Standardizes module name to lowercase in reusable workflow input.
.github/workflows/release.yml Switches semantic-release version source from module.json to composer.json.

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

Comment thread composer.json
Comment on lines 4 to +6
"type": "saucebase-module",
"license": "proprietary",
"version": "0.6.0",
@sauce-base
sauce-base merged commit d54bc50 into main Jun 4, 2026
5 of 7 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