Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion IMPROVEMENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,26 @@ This file is the handoff for future implementation work. The local-first workspa

- ✅ **Example Library close button not at far right** (`css/style.css`) — `.ex-modal-search` has `flex: 1` but `.ex-search-wrap` has `max-width: 280px`; once the search hits that cap the close button sits right after it instead of at the modal edge. Added `margin-left: auto` to `.ex-modal-close` so it always pins to the far right.

pursue only if usability feedback shows clear value; retain Input → Transform → Output as the default and provide keyboard/reset behavior.
## Priority 34 — Browser UI workflow review (2026-11-16)

### UX fix

- ✅ **Temporary-content tooltip incorrectly says every temporary item is a shared session** (`js/state.js`) — examples and uploaded files also use the temporary state. Reworded the tooltip generically so it accurately covers examples, uploads, and shared mappings.

### Follow-up

- ✅ **Narrow screens hid Share, Theme, Help, Settings, and About with no overflow path** (`css/style.css`) — the existing session control now becomes a compact ellipsis menu on phones and exposes those secondary actions without adding another header button.
- ✅ **Fresh-profile mobile guidance** — added a focused touch-profile test confirming the desktop/laptop recommendation appears once, dismisses cleanly, and stays dismissed after reload without touching an existing user's workspace.

## Priority 35 — Full UI control audit (2026-11-16)

- ✅ **Backup import preview opened behind Settings, making Cancel and close appear broken** — Settings now closes before validation preview and reopens after cancel/close; focused coverage verifies the full invalid-ZIP flow and both visible close controls. Escape continues to work.
- ✅ **Console filter selection was visual-only** — filter buttons now expose synchronized `aria-pressed` state so assistive technology can identify All, Info, Warning, or Error as the active filter.
- ✅ Verified Settings theme/runtime/Explorer preference/layout reset, backup validation preview, destructive confirmations, About/footer links, workspace views, Share, Examples, Help tabs, mode switching, Run, pane format/copy/wrap/upload/download/collapse, header/property add/filter, and responsive secondary actions.

## Deferred ideas — validate before building

- Draggable pane reordering: pursue only if usability feedback shows clear value; retain Input → Transform → Output as the default and provide keyboard/reset behavior.
- Runnable-session tabs: add only if Explorer testing shows repeated switching friction; do not duplicate the Explorer or reduce editor space unnecessarily.
- Replace Workspace import: requires explicit approval, rollback design, and destructive-flow testing. Merge-as-copy remains the safe default.
- Linked project files/includes, encryption, collaboration, and cloud synchronization remain out of scope.
Expand Down Expand Up @@ -339,3 +358,7 @@ This file is the handoff for future implementation work. The local-first workspa
- ✅ Latest upstream CI regression: 175/175 passed with 4 workers.
- ✅ No source content is uploaded unexpectedly.
- ✅ Workspace PR #89 merged into `dev`; production deployment / `dev` → `main` remains an explicit release decision.
# Theme contrast review (completed)

- Reviewed editor syntax, XML/XSLT tokens, console levels, filters, timestamps, and supporting labels in dark and light themes.
- Increased dark-theme secondary contrast, made inactive console filters recognizable, strengthened light-theme warning contrast, and improved Monaco line-number readability in both themes.
30 changes: 20 additions & 10 deletions css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
--sap-gold: #f5a524;
--text-primary: #f1f5f9;
--text-secondary: #94a3b8;
--text-dim: #475569;
/* Still subordinate, but readable at the app's small mono text sizes. */
--text-dim: #64748b;
--success: #3fb950;
--error: #f85149;
--warning: #f5a524;
Expand Down Expand Up @@ -488,6 +489,7 @@
.session-menu button:hover, .session-menu button:focus { outline: none; background: var(--hover-bg-strong); color: var(--text-primary); }
.session-menu button:disabled { opacity: .4; cursor: default; }
.session-menu-separator { display: block; margin: 4px 3px; border-top: 1px solid var(--border); }
.session-menu-mobile { display: none !important; }
.workspace-view-switcher {
display: flex; padding: 2px; gap: 2px; border: 1px solid var(--border);
border-radius: var(--r-sm); background: var(--bg-base);
Expand Down Expand Up @@ -1291,10 +1293,10 @@
}
.console-filter-btn:hover { background: var(--hover-bg); }
/* Inactive — each dot has its own muted color so they're distinguishable */
.console-filter-btn[data-filter="all"] { color: #4a6080; }
.console-filter-btn[data-filter="info"] { color: #2a5a9a; }
.console-filter-btn[data-filter="warn"] { color: #7a5a14; }
.console-filter-btn[data-filter="error"] { color: #7a2828; }
.console-filter-btn[data-filter="all"] { color: #718096; }
.console-filter-btn[data-filter="info"] { color: #5794d8; }
.console-filter-btn[data-filter="warn"] { color: #c28a2c; }
.console-filter-btn[data-filter="error"] { color: #c75b57; }
/* Active states — full saturation + border + background tint */
.console-filter-btn.active[data-filter="all"] {
color: var(--text-secondary);
Expand Down Expand Up @@ -1458,7 +1460,8 @@
--text-dim: #64748b;
--success: #1a7f37;
--error: #cf222e;
--warning: #d97706;
/* Darker amber keeps warning text legible on the near-white console. */
--warning: #b45309;
--scrollbar: rgba(0, 64, 140, 0.18);
--kv-row-alt: rgba(0, 64, 140, 0.025);
--hover-bg: rgba(0, 64, 140, 0.05);
Expand All @@ -1475,10 +1478,10 @@
}

/* ── LIGHT THEME: console filter buttons ── */
body.light .console-filter-btn[data-filter="all"] { color: #8090a8; }
body.light .console-filter-btn[data-filter="info"] { color: #5a8ac0; }
body.light .console-filter-btn[data-filter="warn"] { color: #c89030; }
body.light .console-filter-btn[data-filter="error"] { color: #c04040; }
body.light .console-filter-btn[data-filter="all"] { color: #64748b; }
body.light .console-filter-btn[data-filter="info"] { color: #2563a6; }
body.light .console-filter-btn[data-filter="warn"] { color: #a64f08; }
body.light .console-filter-btn[data-filter="error"] { color: #b4232d; }
body.light .console-filter-btn.active[data-filter="all"] { color: var(--text-secondary); background: rgba(0,0,0,0.06); }
body.light .console-filter-btn.active[data-filter="info"] { color: var(--sap-blue); border-color: var(--sap-blue); background: rgba(0,112,242,0.08); }
body.light .console-filter-btn.active[data-filter="warn"] { color: var(--warning); border-color: var(--warning); background: rgba(200,120,0,0.1); }
Expand Down Expand Up @@ -3018,6 +3021,13 @@ body.light .xpath-results-body-wrap .empty-output-hint .empty-output-icon { bord
.header #shareBtn, .header .theme-toggle,
.header .help-btn, .header #settingsBtn, .header #aboutBtn { display: none; }
.header .explorer-toggle { margin-left: 0; }
.header .current-item { display: block; width: 32px; min-width: 32px; border-left: 0; }
.header .current-item-trigger { width: 32px; height: 32px; padding: 0; justify-content: center; }
.header .current-item-title { display: none; }
.header .current-item-trigger > span:last-child { font-size: 0; }
.header .current-item-trigger > span:last-child::after { content: '\2026'; font-size: 18px; line-height: 1; }
.session-menu { width: 210px; }
.session-menu-mobile { display: block !important; }
.header #exBtn {
width: 32px;
padding: 0;
Expand Down
18 changes: 12 additions & 6 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,12 @@ <h2>Why Use an Online XSLT Debugger?</h2>
<button role="menuitem" id="sessionMenuDuplicate" onclick="toggleSessionMenu(false);duplicateCurrentSession().catch(reportExplorerActionError)">Duplicate current</button>
<span class="session-menu-separator"></span>
<button role="menuitem" onclick="toggleSessionMenu(false);clearSavedState()">Clear current content</button>
<span class="session-menu-separator session-menu-mobile" aria-hidden="true"></span>
<button class="session-menu-mobile" role="menuitem" id="sessionMenuShare" onclick="toggleSessionMenu(false);openShareModal()">Share current XSLT</button>
<button class="session-menu-mobile" role="menuitem" onclick="toggleSessionMenu(false);toggleTheme()">Toggle light / dark theme</button>
<button class="session-menu-mobile" role="menuitem" onclick="toggleSessionMenu(false);openHelpModal()">Help &amp; shortcuts</button>
<button class="session-menu-mobile" role="menuitem" onclick="toggleSessionMenu(false);openWorkspaceSettings()">Settings</button>
<button class="session-menu-mobile" role="menuitem" onclick="toggleSessionMenu(false);openAboutDialog()">About XSLTDebugX</button>
</div>
</div>

Expand Down Expand Up @@ -525,10 +531,10 @@ <h2>Why Use an Online XSLT Debugger?</h2>
<span class="console-err-badge" id="consoleErrBadge">0</span>
<div class="console-bar-actions" onclick="event.stopPropagation()">
<div class="console-filters">
<button class="console-filter-btn active" data-filter="all" onclick="setConsoleFilter('all')" aria-label="Show all messages" title="Show all messages"><i data-lucide="list-filter" width="11" height="11"></i></button>
<button class="console-filter-btn" data-filter="info" onclick="setConsoleFilter('info')" aria-label="Info only" title="Info only"><i data-lucide="info" width="11" height="11"></i></button>
<button class="console-filter-btn" data-filter="warn" onclick="setConsoleFilter('warn')" aria-label="Warnings only" title="Warnings only"><i data-lucide="alert-triangle" width="11" height="11"></i></button>
<button class="console-filter-btn" data-filter="error" onclick="setConsoleFilter('error')" aria-label="Errors only" title="Errors only"><i data-lucide="x-circle" width="11" height="11"></i></button>
<button type="button" class="console-filter-btn active" data-filter="all" onclick="setConsoleFilter('all')" aria-label="Show all messages" aria-pressed="true" title="Show all messages"><i data-lucide="list-filter" width="11" height="11"></i></button>
<button type="button" class="console-filter-btn" data-filter="info" onclick="setConsoleFilter('info')" aria-label="Info only" aria-pressed="false" title="Info only"><i data-lucide="info" width="11" height="11"></i></button>
<button type="button" class="console-filter-btn" data-filter="warn" onclick="setConsoleFilter('warn')" aria-label="Warnings only" aria-pressed="false" title="Warnings only"><i data-lucide="alert-triangle" width="11" height="11"></i></button>
<button type="button" class="console-filter-btn" data-filter="error" onclick="setConsoleFilter('error')" aria-label="Errors only" aria-pressed="false" title="Errors only"><i data-lucide="x-circle" width="11" height="11"></i></button>
</div>
<div class="pane-divider"></div>
<input class="console-search" id="consoleSearch" type="text" placeholder="search…" aria-label="Search console output" oninput="applyConsoleSearch(this.value)" title="Filter console by text"/>
Expand Down Expand Up @@ -742,14 +748,14 @@ <h2>Why Use an Online XSLT Debugger?</h2>
<div class="share-modal-header">
<i data-lucide="archive-restore" width="16" height="16"></i>
<span class="share-modal-title" id="backupImportTitle">Import workspace backup</span>
<button class="ex-modal-close" onclick="closeBackupImportDialog()" aria-label="Close backup import"><i data-lucide="x" width="18" height="18"></i></button>
<button type="button" class="ex-modal-close" id="backupImportCloseBtn" aria-label="Close backup import"><i data-lucide="x" width="18" height="18"></i></button>
</div>
<div class="share-modal-body">
<p class="incoming-share-intro">The entire ZIP is validated before anything is written. Imported workspaces, folders, and sessions receive new IDs; existing work is never replaced.</p>
<div class="incoming-share-summary" id="backupImportSummary">Validating backup…</div>
<div class="incoming-share-error" id="backupImportError" role="alert" hidden></div>
<div class="incoming-share-actions">
<button class="incoming-share-btn secondary" onclick="closeBackupImportDialog()">Cancel</button>
<button type="button" class="incoming-share-btn secondary" id="backupImportCancelBtn">Cancel</button>
<button class="incoming-share-btn primary" id="backupImportConfirmBtn" onclick="confirmWorkspaceBackupImport()">Import as copies</button>
</div>
</div>
Expand Down
21 changes: 19 additions & 2 deletions js/backup.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const BACKUP_MAX_RATIO = 1200;
const BACKUP_RECORD_SCHEMA_VERSION = 1;
let pendingBackupImport = null;
let _backupImportReturnFocus = null;
let _backupImportReturnToSettings = false;

function backupJsonBytes(value) {
return new TextEncoder().encode(JSON.stringify(value, null, 2) + '\n');
Expand Down Expand Up @@ -251,10 +252,15 @@ async function validateWorkspaceBackup(input) {
}

async function prepareWorkspaceBackupImport(file) {
_backupImportReturnFocus = document.activeElement;
const input = document.getElementById('backupImportInput');
if (input) input.value = '';
if (!file) return;
const settings = document.getElementById('workspaceSettingsBackdrop');
_backupImportReturnToSettings = Boolean(settings?.classList.contains('open'));
_backupImportReturnFocus = _backupImportReturnToSettings
? document.getElementById('settingsBtn')
: document.activeElement;
if (_backupImportReturnToSettings) closeWorkspaceSettings();
const error = document.getElementById('backupImportError');
if (error) { error.hidden = true; error.textContent = ''; }
try {
Expand Down Expand Up @@ -285,10 +291,21 @@ function closeBackupImportDialog() {
document.getElementById('backupImportBackdrop')?.classList.remove('open');
document.body.classList.remove('modal-open');
const returnFocus = _backupImportReturnFocus;
const returnToSettings = _backupImportReturnToSettings;
_backupImportReturnFocus = null;
requestAnimationFrame(() => returnFocus?.isConnected && returnFocus.focus());
_backupImportReturnToSettings = false;
if (returnToSettings && typeof openWorkspaceSettings === 'function') {
void openWorkspaceSettings();
} else {
requestAnimationFrame(() => returnFocus?.isConnected && returnFocus.focus());
}
}

document.addEventListener('DOMContentLoaded', () => {
document.getElementById('backupImportCloseBtn')?.addEventListener('click', closeBackupImportDialog);
document.getElementById('backupImportCancelBtn')?.addEventListener('click', closeBackupImportDialog);
});

async function confirmWorkspaceBackupImport() {
if (!pendingBackupImport) return;
const button = document.getElementById('backupImportConfirmBtn');
Expand Down
5 changes: 5 additions & 0 deletions js/explorer.js
Original file line number Diff line number Diff line change
Expand Up @@ -789,6 +789,11 @@ async function duplicateCurrentSession() {
function syncSessionMenuState() {
const duplicate = document.getElementById('sessionMenuDuplicate');
if (duplicate) duplicate.disabled = !sessionController?.getCurrentSession();
const share = document.getElementById('sessionMenuShare');
if (share) {
share.disabled = modeManager.isXpath;
share.title = modeManager.isXpath ? 'Sharing is only available in XSLT mode' : '';
}
}

function toggleSessionMenu(force) {
Expand Down
2 changes: 1 addition & 1 deletion js/state.js
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ function setSaveIndicator(state, error = null) {
ind.title = state === 'conflict'
? 'This item changed in another tab; choose how to preserve your edits'
: state === 'temporary'
? 'This shared session is open temporarily and will not overwrite your saved work'
? 'This content is temporary and will not overwrite your saved work until you choose Save…'
: state === 'failed'
? `${itemName} could not be saved locally${error?.message ? ': ' + error.message : ''}`
: state === 'saving'
Expand Down
8 changes: 4 additions & 4 deletions js/themes.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ var MONACO_THEME_DARK = {
colors: {
'editor.background': '#070c14',
'editor.foreground': '#c8d8e8',
'editorLineNumber.foreground': '#1e3050',
'editorLineNumber.activeForeground': '#4a70a8',
'editorLineNumber.foreground': '#52657d',
'editorLineNumber.activeForeground': '#8aa4c2',
'editor.lineHighlightBackground': '#0c1826',
'editor.lineHighlightBorderColor': '#182030',
'editorCursor.foreground': '#0070f2',
Expand Down Expand Up @@ -83,8 +83,8 @@ var MONACO_THEME_LIGHT = {
colors: {
'editor.background': '#ffffff',
'editor.foreground': '#1a2535',
'editorLineNumber.foreground': '#c0cfe0',
'editorLineNumber.activeForeground': '#6080a0',
'editorLineNumber.foreground': '#718096',
'editorLineNumber.activeForeground': '#345d85',
'editor.lineHighlightBackground': '#f0f6ff',
'editor.lineHighlightBorderColor': '#d8e8f8',
'editorCursor.foreground': '#0070f2',
Expand Down
4 changes: 3 additions & 1 deletion js/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,9 @@ function setConsoleFilter(filter) {
consoleFilter = filter;

document.querySelectorAll('.console-filter-btn').forEach(btn => {
btn.classList.toggle('active', btn.dataset.filter === filter);
const active = btn.dataset.filter === filter;
btn.classList.toggle('active', active);
btn.setAttribute('aria-pressed', String(active));
});

// Delegate all filtering (type + text) to applyConsoleSearch.
Expand Down
19 changes: 10 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading