From 155835e46bcbe3b78c76b6e566a5106fc0f5b81f Mon Sep 17 00:00:00 2001 From: Hannes Hertach Date: Thu, 9 Jul 2026 16:14:48 +0200 Subject: [PATCH 1/6] feat(secure-org): migrate secure-org block to nx2 Add 'secure-org' to NX_BLOCKS and update imports in secure-org.js and utils.js to nx2 equivalents. Block stays in nx/ per migration convention. nx2's daFetch takes destructured args, so fetchConfig's call site is updated. Icon URLs built from import.meta.url since they live only in nx1's public/icons/. CSS variables in secure-org.css get nx2 names with nx1 fallback. Co-Authored-By: Claude Sonnet 4.6 --- nx/blocks/secure-org/secure-org.css | 4 ++-- nx/blocks/secure-org/secure-org.js | 19 ++++++++----------- nx/blocks/secure-org/utils.js | 6 +++--- nx2/scripts/nx.js | 2 +- 4 files changed, 14 insertions(+), 17 deletions(-) diff --git a/nx/blocks/secure-org/secure-org.css b/nx/blocks/secure-org/secure-org.css index 7266b4aa6..bbe8571de 100644 --- a/nx/blocks/secure-org/secure-org.css +++ b/nx/blocks/secure-org/secure-org.css @@ -1,7 +1,7 @@ :host { display: block; - max-width: var(--grid-container-width); - margin: var(--spacing-800) auto var(--spacing-800) auto; + max-width: var(--se-grid-container-width, var(--grid-container-width)); + margin: var(--s2-spacing-800, var(--spacing-800)) auto var(--s2-spacing-800, var(--spacing-800)) auto; > svg { display: none; diff --git a/nx/blocks/secure-org/secure-org.js b/nx/blocks/secure-org/secure-org.js index 9a800aad7..8e8c673df 100644 --- a/nx/blocks/secure-org/secure-org.js +++ b/nx/blocks/secure-org/secure-org.js @@ -1,25 +1,22 @@ import { html, LitElement, nothing } from 'da-lit'; -import { getConfig } from '../../scripts/nexter.js'; -import { loadIms } from '../../utils/ims.js'; -import getStyle from '../../utils/styles.js'; -import { getSvg } from '../../utils/svg.js'; +import { loadIms } from '../../../nx2/utils/ims.js'; +import { loadStyle } from '../../../nx2/utils/utils.js'; +import loadIcons from '../../../nx2/utils/svg.js'; import { loadConfig, saveConfig } from './utils.js'; import '../../public/sl/components.js'; import '../shared/path/path.js'; -const { nxBase: nx } = getConfig(); - const ICONS = [ - `${nx}/public/icons/S2_Icon_InfoCircle_20_N.svg`, - `${nx}/public/icons/S2_Icon_AlertDiamond_20_N.svg`, - `${nx}/public/icons/S2_Icon_CheckmarkCircle_20_N.svg`, + new URL('../../public/icons/S2_Icon_InfoCircle_20_N.svg', import.meta.url).href, + new URL('../../public/icons/S2_Icon_AlertDiamond_20_N.svg', import.meta.url).href, + new URL('../../public/icons/S2_Icon_CheckmarkCircle_20_N.svg', import.meta.url).href, ]; const EL_NAME = 'nx-secure-org'; -const styles = await getStyle(import.meta.url); -const icons = await getSvg({ paths: ICONS }); +const styles = await loadStyle(import.meta.url); +const icons = await loadIcons({ paths: ICONS }); class SecureOrg extends LitElement { static properties = { diff --git a/nx/blocks/secure-org/utils.js b/nx/blocks/secure-org/utils.js index 41cdb3ceb..631c5dcb4 100644 --- a/nx/blocks/secure-org/utils.js +++ b/nx/blocks/secure-org/utils.js @@ -1,5 +1,5 @@ -import { DA_ORIGIN } from '../../public/utils/constants.js'; -import { daFetch } from '../../utils/daFetch.js'; +import { DA_ORIGIN } from '../../../nx2/public/utils/constants.js'; +import { daFetch } from '../../../nx2/utils/api.js'; const DEF_CONFIG = `{ "data": { @@ -39,7 +39,7 @@ async function fetchConfig(org, body) { let opts; if (body) opts = { method: 'POST', body }; - return daFetch(`${DA_ORIGIN}/config/${org}/`, opts); + return daFetch({ url: `${DA_ORIGIN}/config/${org}/`, opts }); } export async function loadConfig(org) { diff --git a/nx2/scripts/nx.js b/nx2/scripts/nx.js index 01035e1bf..3955d9e45 100644 --- a/nx2/scripts/nx.js +++ b/nx2/scripts/nx.js @@ -12,7 +12,7 @@ const LOG = async (ex, el) => (await import('../utils/error.js')).default(ex, el); -const NX_BLOCKS = new Set(['importer', 'site-apps', 'hero', 'card', 'section-metadata', 'schema-editor', 'media-library', 'form']); +const NX_BLOCKS = new Set(['importer', 'site-apps', 'hero', 'card', 'section-metadata', 'schema-editor', 'media-library', 'form', 'secure-org']); const EW_ORIGINS = { dev: 'http://localhost:3001', From 5038f6d4512ee410596b4f4751a3387461942086 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 9 Jul 2026 16:15:50 +0200 Subject: [PATCH 2/6] Update worklog --- WORKLOG.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/WORKLOG.md b/WORKLOG.md index 6758e44ee..fdc487909 100644 --- a/WORKLOG.md +++ b/WORKLOG.md @@ -1,5 +1,27 @@ # Worklog +## 2026-07-09 + +### nx/blocks/secure-org — migrate secure-org block to nx2 + +Added `'secure-org'` to `NX_BLOCKS` in `nx2/scripts/nx.js`. Block stays in `nx/blocks/secure-org/` per migration convention. + +Import updates in `secure-org.js`: +- Dropped `getConfig` from nexter.js; icon URLs built via `new URL('../../public/icons/...', import.meta.url).href` (icons live only in nx1) +- `../../utils/ims.js` `loadIms` → `../../../nx2/utils/ims.js` +- `../../utils/styles.js` default `getStyle` → `{ loadStyle }` from `../../../nx2/utils/utils.js` +- `../../utils/svg.js` `getSvg` → default `loadIcons` from `../../../nx2/utils/svg.js` + +Import updates in `utils.js`: +- `../../public/utils/constants.js` (DA_ORIGIN) → `../../../nx2/public/utils/constants.js` +- `../../utils/daFetch.js` (daFetch) → `../../../nx2/utils/api.js`; call site updated from positional `daFetch(url, opts)` to destructured `daFetch({ url, opts })` + +CSS variables in `secure-org.css`: +- `--grid-container-width` → `--se-grid-container-width` with nx1 fallback +- `--spacing-800` → `--s2-spacing-800` with nx1 fallback + +Verified live at `/apps/sandbox?nx=local` — block renders correctly (nx-path input, orange warning alert with AlertDiamond icon), no console errors. + ## 2026-06-26 ### nx2/blocks/chat/chat.js — skill selection preserves pending attachments (feat/da-skill-attachment-fix) From d0fb1e7427d8370b451615f8a2b52cf6830686fb Mon Sep 17 00:00:00 2001 From: Hannes Hertach Date: Fri, 10 Jul 2026 13:05:00 +0200 Subject: [PATCH 3/6] fix(secure-org): use CDN icons with instead of programmatic load Address PR review from @mhaack. Same treatment as PR #588: - Drop the loadIcons import, the ICONS array, and the module-top-level fetch. Also drop the shadow-root prepend in connectedCallback. - renderAlert now references the CDN icon directly: - type2icon values change from CamelCase sprite IDs to lowercase-kebab filenames: 'infocircle', 'alertdiamond', 'checkmarkcircle'. - Drop the now-dead ':host > svg { display: none; }' rule that was hiding the previously-prepended sprites. Co-Authored-By: Claude Sonnet 4.6 --- nx/blocks/secure-org/secure-org.css | 4 ---- nx/blocks/secure-org/secure-org.js | 20 ++++++-------------- 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/nx/blocks/secure-org/secure-org.css b/nx/blocks/secure-org/secure-org.css index bbe8571de..20b639a44 100644 --- a/nx/blocks/secure-org/secure-org.css +++ b/nx/blocks/secure-org/secure-org.css @@ -3,10 +3,6 @@ max-width: var(--se-grid-container-width, var(--grid-container-width)); margin: var(--s2-spacing-800, var(--spacing-800)) auto var(--s2-spacing-800, var(--spacing-800)) auto; - > svg { - display: none; - } - nx-path { display: block; margin-bottom: 24px; diff --git a/nx/blocks/secure-org/secure-org.js b/nx/blocks/secure-org/secure-org.js index 8e8c673df..4d105e407 100644 --- a/nx/blocks/secure-org/secure-org.js +++ b/nx/blocks/secure-org/secure-org.js @@ -1,22 +1,14 @@ import { html, LitElement, nothing } from 'da-lit'; import { loadIms } from '../../../nx2/utils/ims.js'; import { loadStyle } from '../../../nx2/utils/utils.js'; -import loadIcons from '../../../nx2/utils/svg.js'; import { loadConfig, saveConfig } from './utils.js'; import '../../public/sl/components.js'; import '../shared/path/path.js'; -const ICONS = [ - new URL('../../public/icons/S2_Icon_InfoCircle_20_N.svg', import.meta.url).href, - new URL('../../public/icons/S2_Icon_AlertDiamond_20_N.svg', import.meta.url).href, - new URL('../../public/icons/S2_Icon_CheckmarkCircle_20_N.svg', import.meta.url).href, -]; - const EL_NAME = 'nx-secure-org'; const styles = await loadStyle(import.meta.url); -const icons = await loadIcons({ paths: ICONS }); class SecureOrg extends LitElement { static properties = { @@ -32,7 +24,6 @@ class SecureOrg extends LitElement { connectedCallback() { super.connectedCallback(); this.shadowRoot.adoptedStyleSheets = [styles]; - this.shadowRoot.append(...icons); this.resetDefaults(); } @@ -97,14 +88,15 @@ class SecureOrg extends LitElement { if (!this._alert) return nothing; const type2icon = { - info: 'InfoCircle', - warning: 'AlertDiamond', - success: 'CheckmarkCircle', + info: 'infocircle', + warning: 'alertdiamond', + success: 'checkmarkcircle', }; + const type = this._alert.type || 'info'; return html` -
- +
+

${this._alert.message}

`; From ed349d499efcd0f33fb09139c1d6fcc6eb32da6b Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 13 Jul 2026 20:47:28 +0200 Subject: [PATCH 4/6] Update worklog --- WORKLOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/WORKLOG.md b/WORKLOG.md index fdc487909..958e5979f 100644 --- a/WORKLOG.md +++ b/WORKLOG.md @@ -1,5 +1,11 @@ # Worklog +## 2026-07-13 + +### nx2/styles/styles.css — pin to light mode + +Changed `:root { color-scheme: light dark; }` → `color-scheme: light;` and `.dark-scheme { color-scheme: dark; }` → `color-scheme: light;`. Matches nx1 (`nexter.css`) which pins `:root` to light, and da-live browse which forces both `.light-scheme` and `.dark-scheme` to `color-scheme: light` so the profile toggle can't override. + ## 2026-07-09 ### nx/blocks/secure-org — migrate secure-org block to nx2 From 9e74af2260a1ea82b834f71f802ebbeb5177192a Mon Sep 17 00:00:00 2001 From: Hannes Hertach Date: Mon, 13 Jul 2026 20:47:38 +0200 Subject: [PATCH 5/6] style(nx2): pin color scheme to light mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Matches nx1 (nexter.css) and da-live browse — both force color-scheme: light regardless of system preference or profile toggle. Co-Authored-By: Claude Sonnet 4.6 --- nx2/styles/styles.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nx2/styles/styles.css b/nx2/styles/styles.css index 0f7180094..41ad0d23d 100644 --- a/nx2/styles/styles.css +++ b/nx2/styles/styles.css @@ -299,7 +299,7 @@ --adobe-corporate-color: rgb(235 16 0); /* color schemes */ - color-scheme: light dark; + color-scheme: light; } @media (width >= 1440px) { @@ -415,7 +415,7 @@ html:has(meta[content="edge-delivery"]) { } .dark-scheme { - color-scheme: dark; + color-scheme: light; } } From bfccacf069bde91176e2b977fb08edefe0a2c4b5 Mon Sep 17 00:00:00 2001 From: Hannes Hertach Date: Tue, 14 Jul 2026 11:38:16 +0200 Subject: [PATCH 6/6] revert: remove light mode pin (moving to separate PR) Reverts style(nx2): pin color scheme to light mode (9e74af22). Co-Authored-By: Claude Sonnet 4.6 --- WORKLOG.md | 6 ------ nx2/styles/styles.css | 4 ++-- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/WORKLOG.md b/WORKLOG.md index 958e5979f..fdc487909 100644 --- a/WORKLOG.md +++ b/WORKLOG.md @@ -1,11 +1,5 @@ # Worklog -## 2026-07-13 - -### nx2/styles/styles.css — pin to light mode - -Changed `:root { color-scheme: light dark; }` → `color-scheme: light;` and `.dark-scheme { color-scheme: dark; }` → `color-scheme: light;`. Matches nx1 (`nexter.css`) which pins `:root` to light, and da-live browse which forces both `.light-scheme` and `.dark-scheme` to `color-scheme: light` so the profile toggle can't override. - ## 2026-07-09 ### nx/blocks/secure-org — migrate secure-org block to nx2 diff --git a/nx2/styles/styles.css b/nx2/styles/styles.css index 41ad0d23d..0f7180094 100644 --- a/nx2/styles/styles.css +++ b/nx2/styles/styles.css @@ -299,7 +299,7 @@ --adobe-corporate-color: rgb(235 16 0); /* color schemes */ - color-scheme: light; + color-scheme: light dark; } @media (width >= 1440px) { @@ -415,7 +415,7 @@ html:has(meta[content="edge-delivery"]) { } .dark-scheme { - color-scheme: light; + color-scheme: dark; } }