Skip to content

Feature/modal actions height precedence#1

Merged
namumakwembo merged 77 commits into
mainfrom
feature/modal-actions-height-precedence
Apr 27, 2026
Merged

Feature/modal actions height precedence#1
namumakwembo merged 77 commits into
mainfrom
feature/modal-actions-height-precedence

Conversation

@namumakwembo

Copy link
Copy Markdown
Contributor

No description provided.

…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
…with type defaults, keep sheetHeight alias, and update docs/tests
…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
Copilot AI review requested due to automatic review settings April 27, 2026 07:57

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 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.

Comment thread composer.json Outdated
Comment thread tests/Feature/ModalServiceTest.php Outdated
Comment thread resources/views/components/footer.blade.php
Comment thread src/Actions/Action.php Outdated
Agent-Logs-Url: https://github.com/corepine/modal/sessions/1a571c9e-4c08-4ead-b74d-44675ffd5e34

Co-authored-by: namumakwembo <77463693+namumakwembo@users.noreply.github.com>
@namumakwembo
namumakwembo merged commit c5f99ea into main Apr 27, 2026
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