feat!: update module to be compatible with saucebase 2.0 - #11
Merged
Conversation
…te related configurations
Implement Announcements module with CRUD and seeding functionality
feat!: Implement AnnouncementBanner component and update app version
Contributor
There was a problem hiding this comment.
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/tosrc/, adjust Composer autoloading/provider registration, and remove the legacy route service provider +module.json. - Add/adjust Announcements runtime features: new
Announcementmodel, 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 on lines
4
to
+6
| "type": "saucebase-module", | ||
| "license": "proprietary", | ||
| "version": "0.6.0", |
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.
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:
app/directory tosrc/, updated autoload paths incomposer.json, and removed the now-unnecessaryapp/Providers/RouteServiceProvider.php. [1] [2]composer.jsonto include the module version, description, license, and provider registration, and added a test support namespace. [1] [2]module.jsonfile in favor of usingcomposer.jsonfor module metadata.Developer tooling and workflow improvements:
database/seeders/DatabaseSeeder.php) and a correspondingdb:seedtask inTaskfile.ymlfor easier local development and testing. [1] [2]announcements) in workflow files, Playwright E2E test commands, and code generation scripts for consistency. [1] [2] [3]Frontend code organization:
resources/js/app.tstoresources/js/vue/app.tsand 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:
Documentation and metadata updates:
LICENSE.These changes collectively improve the maintainability, modularity, and developer experience of the Announcements module.