PluginNoticeComponentShowNoticeAfterDelayParams
Parameters for PluginNoticeComponent.showNoticeAfterDelay.
Import:
import type { PluginNoticeComponentShowNoticeAfterDelayParams } from 'obsidian-dev-utils/obsidian/components/plugin-notice-component';Signature:
export interface PluginNoticeComponentShowNoticeAfterDelayParamsProperties
| Property | Type | Description |
|---|---|---|
| abortController? | AbortController | When provided, a Cancel button is appended to the notice; clicking it aborts this controller. When omitted, no Cancel button is shown. |
| cancelButtonText? | string | The text of the Cancel button shown when PluginNoticeComponentShowNoticeAfterDelayParams.abortController is provided. When omitted, the localized Cancel label is used. |
| content | ValueProvider<DocumentFragment | string> | The notice content, resolved lazily only if the delay elapses — so an operation that finishes sooner never builds it. |
| delayInMilliseconds? | number | How long the operation must run before the notice is shown. Operations that finish sooner never show a notice, avoiding a distracting flash. |
| mode? | PluginNoticeMode | How this notice relates to the plugin's current notice — see PluginNoticeMode.PluginNoticeMode.Separate is worth considering for a long operation: on the default PluginNoticeMode.Replace the progress notice takes the shared slot, so any ordinary notice raised while the operation runs hides it, and the progress the user was watching does not come back.Whichever mode is used, the returned handle owns only ITS message: updating the content rewrites that message alone, and disposing takes away only that message when the notice was already on screen (a notice this handle opened is hidden as a whole). |