Jacob Overgaard
10/10/2025, 3:38 PMts
@consume({
context: UMB_APP_LOG_VIEWER_CONTEXT,
})
private set _logViewerContext(value: typeof UMB_APP_LOG_VIEWER_CONTEXT.TYPE | undefined) {
this.#logViewerContext = value;
this.#observeErrorCount();
this.#observeCanShowLogs();
value?.getLogLevels(0, 100);
}
private get _logViewerContext() {
return this.#logViewerContext;
}
You can also apply Lit's @state() decorator and make it reactive, if it holds state to render in the template or something to that effect. It follows the same syntax as @lit/context so should be interchangable.
Next up is a @provide decorator, and that should be it for the Context API.
In the future, who knows, maybe a @shortcut() decorator for method invocation?Warren Buckley
10/11/2025, 2:24 PMJacob Overgaard
10/15/2025, 7:28 AM@provide decorator and added unit tests. It looks pretty stable.
Could be nice if someone wanted to test it out locally in their package (you can just copy the code in) before it lands in the CMS. But the code is branched off of v17, so could maybe target 17.1 if all goes well...Jacob Overgaard
10/16/2025, 9:59 AM