Configurable notice lifespan#1110
Merged
Merged
Conversation
added 2 commits
May 19, 2026 11:55
Deploying smoothly with
|
| Latest commit: |
47a7f22
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://cf5a67cd.smoothly.pages.dev |
| Branch Preview URL: | https://configurable-notice-lifespan.smoothly.pages.dev |
qijieye
approved these changes
May 19, 2026
There was a problem hiding this comment.
Pull request overview
Adds a configurable “notice lifespan” to the Notice model so callers can control how long a notice remains visible after it resolves, along with new unit tests and a demo route/component to showcase the behavior.
Changes:
- Extend
Noticefactory methods (delay/execute/succeeded/failed/warn) with an optionallifetimeargument (default 15s). - Add Vitest coverage for default/custom lifetimes (primarily for immediate notices and
execute). - Add a new notifier demo component and route entry in the app demo.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/model/Notice.ts | Adds lifetime plumbing and uses it for the close timer. |
| src/model/Notice.spec.ts | Introduces tests for default/custom close timing and manual close behavior. |
| src/components/notifier/demo/index.tsx | New demo UI for emitting notices (immediate/task/custom lifetime). |
| src/components/app/demo/index.tsx | Registers the notifier demo route in the demo app navigation. |
| src/components.d.ts | Generated Stencil typings updated for the new demo component. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Added lifespan as an optional arg, tests & demo