Skip to content

components/plugin-notice-component

Component that manages displaying notices to the user.

Class Description
PluginNoticeComponent Manages showing plugin notices. By default a new notice hides the previous one, so only the latest message is on screen; PluginNoticeComponentShowNoticeOptions.mode chooses otherwise — see PluginNoticeMode.
Interface Description
PluginNoticeCloseClickEvent The event passed to PluginNoticeComponentShowNoticeOptions.onCloseClick when the notice’s close (X) button is clicked.
PluginNoticeComponentDelayedNotice A handle to a delayed notice created by PluginNoticeComponent.showNoticeAfterDelay. It is a DisposableEx (so it can be used with using) that also lets the content be updated while the notice is shown.
PluginNoticeComponentShowNoticeAfterDelayParams Parameters for PluginNoticeComponent.showNoticeAfterDelay.
PluginNoticeComponentShowNoticeOptions Options for PluginNoticeComponent.showNotice.
PluginNoticeHideInfo Describes why a notice was hidden, passed to PluginNoticeComponentShowNoticeOptions.onHide.
PluginNoticeUndoAction An Undo action offered on a notice through PluginNoticeComponentShowNoticeOptions.undo. The button works once: the first press disables it and runs PluginNoticeUndoAction.onUndo, and later presses do nothing, so an undo can never be run twice. When it settles, the notice holding the button is replaced by a notice reporting the outcome. A failure is reported there once, as Undo failed: <message>, and logged to the console; it is not rethrown, so the unhandled-error notice does not report the same failure a second time.
Enum Description
PluginNoticeMode How a new notice relates to the plugin’s current notice — the one occupying the single per-plugin slot this component keeps. Raw new Notice(...) calls always pile up, which is rarely what a plugin wants: usually only the latest message matters. So the slot exists, and this chooses what a new message does with it.