Repository navigation
feat: add dynamic toast presentation and richer interactions - #4
Merged
Merged
Conversation
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.
What changed?
presentation('dynamic')and thedynamic()shortcut with expanding/collapsing foreground-pill designs for iOS and Android.ToastPressedevent.data()payloads for body-press and action events. Toast body presses remain opt-in and are enabled only when non-empty data is attached.actions()for one or two actions while preserving the existingaction(string $label, string $id)API.actionColor()or the platform default.Why?
ToastKit needed a richer presentation mode for foreground notifications, smoother visual updates, actionable whole-toast interactions, and support for compact two-choice workflows without breaking existing applications.
This change keeps the established single-action and standard-presentation behavior intact while adding opt-in dynamic presentation, attached event context, and multiple actions.
How was it tested?
Automated checks:
composer validate --strictcomposer test— 190 tests passed, 378 assertionsnode --test resources/js/tests/*.test.js— 37 tests passednode --check resources/js/*.jsnativephp.jsonparsed withJSON_THROW_ON_ERRORxcrun swiftc -parsegit diff --checkManual/runtime checks:
Platforms tested
Breaking changes?
None.
The existing
action(string $label, string $id)API and legacy single-action bridge payload remain supported. Dynamic presentation, attached data, body presses, multiple actions, and individual action colors are opt-in.When
action()andactions()are both used on the same builder, the last method called wins.Checklist