From d693af8a26dfacc571941a29efc48d726efec3eb Mon Sep 17 00:00:00 2001 From: Juergen Kunz Date: Sat, 2 May 2026 19:53:40 +0000 Subject: [PATCH] fix(sdig-workspace): make workspace view externally controllable and preserve explicit initial state --- changelog.md | 6 ++++++ ts_web/00_commitinfo_data.ts | 2 +- ts_web/elements/sdig-workspace/sdig-workspace.ts | 8 +++++--- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/changelog.md b/changelog.md index 339df6a..5238370 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,11 @@ # Changelog +## 2026-05-02 - 1.5.1 - fix(sdig-workspace) +make workspace view externally controllable and preserve explicit initial state + +- change the workspace view from internal state to a reflected public property +- only apply initialView during connection when no non-default view has already been set + ## 2026-05-02 - 1.5.0 - feat(elements) add reusable context menu element for recipient role selection diff --git a/ts_web/00_commitinfo_data.ts b/ts_web/00_commitinfo_data.ts index 98adb47..2ad8951 100644 --- a/ts_web/00_commitinfo_data.ts +++ b/ts_web/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@signature.digital/catalog', - version: '1.5.0', + version: '1.5.1', description: 'A comprehensive catalog of customizable web components designed for building and managing e-signature applications.' } diff --git a/ts_web/elements/sdig-workspace/sdig-workspace.ts b/ts_web/elements/sdig-workspace/sdig-workspace.ts index e89a776..2c1e026 100644 --- a/ts_web/elements/sdig-workspace/sdig-workspace.ts +++ b/ts_web/elements/sdig-workspace/sdig-workspace.ts @@ -1,4 +1,4 @@ -import { DeesElement, property, state, html, customElement, type TemplateResult, css } from '@design.estate/dees-element'; +import { DeesElement, property, html, customElement, type TemplateResult, css } from '@design.estate/dees-element'; import { icon, type TDensity, type TWorkspaceTheme, type TWorkspaceView } from './sdig-workspace.shared.js'; import './sdig-workspace-inbox.js'; import './sdig-workspace-compose.js'; @@ -22,11 +22,13 @@ export class SdigWorkspace extends DeesElement { @property({ type: String }) public accessor density: TDensity = 'comfortable'; @property({ type: String, reflect: true }) public accessor theme: TWorkspaceTheme = 'dark'; @property({ type: String }) public accessor initialView: TWorkspaceView = 'inbox'; - @state() private accessor view: TWorkspaceView = 'inbox'; + @property({ type: String, reflect: true }) public accessor view: TWorkspaceView = 'inbox'; public connectedCallback = async () => { await super.connectedCallback(); - this.view = this.initialView || 'inbox'; + if (this.view === 'inbox' && this.initialView !== 'inbox') { + this.view = this.initialView; + } this.addEventListener('workspace-view-request', this.handleViewRequest as EventListener); };