Feature/modal actions height precedence#1
Merged
Conversation
…er Tailwind classes override cleanly
…pen/close and update docs/layout usage
…topping panel click bubbling
…egacy isolated alias compatible
…isolate layering and complete docs - add ModalType enum and normalize type/drawer/sheet/isolate aliases in config handling - add bottom-sheet flow () with dedicated transitions, shape, and host rendering - enhance open helper to forward modal class/type/position/isolate attributes consistently - document full Blade component reference, helper props, events, config defaults, sizing, and compatibility notes - expand Pest coverage for host behavior, config normalization, blade helpers, and modal class helpers
…e docs, and complete attributes matrix
…with type defaults, keep sheetHeight alias, and update docs/tests
… duplicate release events
…e, support app(Facade::class) resolution, and document Blade dispatch usage
…s and add corepine.modal.actions.* aliases with backward compatibility
…en/close events and keep x-corepine.modal.assets as Livewire host
… modal markup to x-teleport body to prevent open/illegal invocation errors
…only for sheet drag/resize
…ivewire wrapper and flex min-h-0 structure
…d document scrollable layout slot pattern
There was a problem hiding this comment.
Pull request overview
This PR expands Corepine Modal into a more full-featured modal system by introducing a formal event/service layer, standalone Blade+Alpine modals, and richer modal attributes (sheet/drawer/height/drag, shell chrome, and declarative footer actions), with broad test coverage updates to match.
Changes:
- Introduce
ModalService/ModalEvents+ facade/aliases to standardize incoming/outgoing event names and allow config overrides. - Add/expand modal presentation features: bottom sheets, drawers, placement/origin transitions, height & max-height handling, drag/resize, isolate behavior, and post-close dispatch hooks.
- Add new Blade components (
assets,modal,layout,footer,actions.open,actions.close) and comprehensive Pest tests for Livewire-hosted and standalone modal modes.
Reviewed changes
Copilot reviewed 35 out of 38 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/TestCase.php | Registers SupportServiceProvider for test environment dependencies. |
| tests/Pest.php | Adds optional local autoloading for corepine/support (sibling path) during tests. |
| tests/Fixtures/views/livewire/manual-layout-modal.blade.php | Adds fixture view to validate manual layout footer behavior. |
| tests/Fixtures/Livewire/ManualLayoutModal.php | Adds fixture modal component for manual layout tests. |
| tests/Fixtures/Livewire/ExampleModal.php | Updates fixture modal attributes to new keys (closeAllOnEscape, dismissible). |
| tests/Fixtures/Livewire/ControlModal.php | Adds helpers for open-sheet, close dispatch payloads, close-all API changes. |
| tests/Feature/ModalServiceTest.php | Adds tests for ModalService and config-driven event resolution. |
| tests/Feature/ModalHostTest.php | Large expansion of host tests for sheet/drawer/height/actions/isolation/dispatch behaviors. |
| tests/Feature/ModalConfigTest.php | Adds extensive tests for normalization logic (type, placement, origin, sizes, shell, actions). |
| tests/Feature/ModalComponentTest.php | Updates component helper dispatch assertions and adds new close dispatch tests. |
| tests/Feature/ModalBladeComponentTest.php | Adds comprehensive Blade rendering tests for assets/modal/layout/footer/action helpers. |
| src/Support/ModalEvents.php | New class providing typed accessors for configured listen events. |
| src/Support/ModalActionClasses.php | Centralizes base/disabled Tailwind class strings for actions. |
| src/ModalServiceProvider.php | Registers ModalService, facade aliasing, new Blade component aliases, host name fixed to corepine-modal. |
| src/ModalService.php | New service exposing event() and config() accessors. |
| src/Modal.php | Updates close/open APIs, adds bottom-sheet helper, adds merged close-dispatch support. |
| src/Livewire/ModalHost.php | Adds open-sheet listener, request normalization, close dispatch handling, and additional Livewire registry fallbacks. |
| src/Facades/Modal.php | Adds a Modal facade for accessing ModalService. |
| src/Enums/ModalType.php | Introduces ModalType enum for type normalization. |
| src/Actions/Action.php | Adds a modal-specific Action wrapper supporting close/method/dispatch/dispatchTo payloads and styling. |
| resources/views/livewire/modal-host.blade.php | Major host UI/Alpine rewrite: stacking backdrops, isolate, sheet drag/resize, height styles, declarative shell/actions rendering. |
| resources/views/components/open-modal.blade.php | Replaces legacy open helper with include of new actions.open component. |
| resources/views/components/modal.blade.php | Replaces legacy host renderer with standalone Alpine+Blade modal implementation and expanded attribute support. |
| resources/views/components/layout.blade.php | New shell layout component with header/body/footer and inline footer extraction. |
| resources/views/components/footer.blade.php | New footer wrapper component used for inline footer extraction. |
| resources/views/components/close-modal.blade.php | Replaces legacy close helper with include of new actions.close component. |
| resources/views/components/assets.blade.php | New assets component that renders the Livewire modal host. |
| resources/views/components/actions/open.blade.php | New open helper supporting stack vs standalone targeting and rich modal attributes. |
| resources/views/components/actions/close.blade.php | New close helper supporting layers/closeAll/destroy and post-close dispatch payloads. |
| resources/css/app.css | Removes legacy .cp-modal-* component layer styles (now rendered via utility classes). |
| package.json | Updates Tailwind CLI scripts to use tailwindcss binary directly. |
| config/corepine-modal.php | Reworks event configuration to canonical modal.* names and expands default modal attributes. |
| composer.json | Adds dependency on corepine/support and registers facade alias via package discovery. |
| README.md | Updates documentation for new stack + standalone modes, event system, and new Blade components/APIs. |
| .DS_Store | Adds macOS artifact file (should not be committed). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ow calls resolveClass() with the same 5
Agent-Logs-Url: https://github.com/corepine/modal/sessions/1a571c9e-4c08-4ead-b74d-44675ffd5e34 Co-authored-by: namumakwembo <77463693+namumakwembo@users.noreply.github.com>
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.