Skip to content

Commit 75279b7

Browse files
author
DavidQ
committed
Standardize fullscreen tool headers to single-line format
- Enforces: <Tool Name> — <Short Description> - Removes multi-line headers and intro blocks - Improves workspace density and UX consistency
1 parent 245c339 commit 75279b7

7 files changed

Lines changed: 122 additions & 42 deletions

File tree

docs/dev/codex_commands.md

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,25 @@
1-
model: gpt-5.3-codex
2-
reasoning: medium
1+
MODEL: GPT-5.3-codex
2+
REASONING: low
33

4-
Apply PR_10_13_WORKSPACE_INTEGRATION_POLISH
4+
Apply tool header standardization:
55

6-
- Move lifecycle control to workspace
7-
- Prevent tool self-reset logic
8-
- Preserve tool state during navigation
9-
- Ensure stable tool switching
10-
- Do not modify data layer
6+
- Replace all fullscreen tool headers with:
7+
<Tool Name> — <Short Description>
8+
9+
- Remove:
10+
- intro paragraphs
11+
- multi-line headers
12+
13+
- Ensure:
14+
- truncation with ellipsis if needed
15+
- tooltip shows full text
16+
17+
- Bind UI to:
18+
tool.name
19+
tool.shortDescription
20+
21+
Target tools:
22+
- Vector Map Editor
23+
- Vector Asset Studio
24+
- Sprite Editor
25+
- State Inspector

docs/dev/commit_comment.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
Finalize workspace lifecycle control and persistent tool state across all tools - PR 10.13
1+
Standardize fullscreen tool headers to single-line format
2+
3+
- Enforces: <Tool Name> — <Short Description>
4+
- Removes multi-line headers and intro blocks
5+
- Improves workspace density and UX consistency
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# PR — Tool Header Single-Line Standard
2+
3+
## Purpose
4+
Standardize fullscreen tool headers to a single-line format to maximize workspace and maintain consistency.
5+
6+
---
7+
8+
## Rule
9+
10+
All tools must render the header as:
11+
12+
<Tool Name> — <Short Description>
13+
14+
---
15+
16+
## Constraints
17+
18+
- Must be a single line
19+
- No wrapping
20+
- No separate intro paragraph
21+
- No multi-line headers
22+
- Use ellipsis (…) if overflow occurs
23+
- Tooltip must display full text on hover
24+
25+
---
26+
27+
## Examples
28+
29+
Vector Map Editor — Platform Layout & Tile Composition
30+
Vector Asset Studio — Asset Creation & Editing
31+
Sprite Editor — Animation & Frame Control
32+
State Inspector — Object State & JSON Viewer
33+
34+
---
35+
36+
## Implementation
37+
38+
tool = {
39+
name: "Vector Map Editor",
40+
shortDescription: "Platform Layout & Tile Composition"
41+
}
42+
43+
Render:
44+
45+
`${tool.name} — ${tool.shortDescription}`
46+
47+
---
48+
49+
## Scope
50+
51+
Apply to:
52+
- Vector Map Editor
53+
- Vector Asset Studio
54+
- Sprite Editor
55+
- State Inspector
56+
57+
---
58+
59+
## Notes
60+
61+
- Removes redundant intro blocks in fullscreen
62+
- Ensures consistent UX across all tools
63+
- Maximizes vertical workspace

tools/Vector Map Editor/index.html

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -19,37 +19,7 @@
1919
<details class="is-collapsible" open>
2020
<summary class="is-collapsible__summary">Header and Intro</summary>
2121
<div class="is-collapsible__content">
22-
<div id="shared-theme-header">
23-
<header class="toolboxaid-theme-header">
24-
<div class="flex header-content">
25-
<div id="image" class="header-image bg-image-fill site-tagline">
26-
<img src="/src/engine/theme/toolboxaid-header.png" alt="Toolbox Aid Header Banner" />
27-
</div>
28-
<div id="tagline" class="site-tagline site-tagline-alt align-center">
29-
<h2>HTML-JavaScript Gaming</h2>
30-
<P>future: developmen: add Optional later:
31-
C (curves)
32-
Q (quadratic)
33-
A (arc)</P>
34-
</div>
35-
<div id="nav" class="site-nav align-center">
36-
<nav>
37-
<div class="menu-header-container">
38-
<ul id="menu-header" class="menu">
39-
<li class="menu-item">
40-
<a href="https://toolboxaid.com" class="is-external" target="_blank" rel="noopener noreferrer">Toolbox Aid</a>
41-
</li>
42-
<li class="menu-item"><a href="/index.html">Home</a></li>
43-
<li class="menu-item"><a href="/games/index.html">Games</a></li>
44-
<li class="menu-item"><a href="/samples/index.html">Samples</a></li>
45-
<li class="menu-item"><a href="/tools/index.html">Tools</a></li>
46-
</ul>
47-
</div>
48-
</nav>
49-
</div>
50-
</div>
51-
</header>
52-
</div>
22+
<div id="shared-theme-header"></div>
5323
<div data-tools-platform-header></div>
5424
</div>
5525
</details>

tools/shared/platformShell.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,14 @@ body.tools-platform-surface {
132132
color: var(--text, #f7f4ff);
133133
}
134134

135+
.tools-platform-frame__title--single-line {
136+
display: block;
137+
max-width: 100%;
138+
overflow: hidden;
139+
text-overflow: ellipsis;
140+
white-space: nowrap;
141+
}
142+
135143
.tools-platform-frame__description {
136144
margin: 0;
137145
max-width: 72ch;

tools/shared/platformShell.js

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ const GAME_ASSET_CATALOG_SCHEMA = "html-js-gaming.game-asset-catalog";
3333
const GAME_ASSET_CATALOG_VERSION = 1;
3434
const WORKSPACE_LAUNCH_SIGNATURE_STORAGE_KEY = "toolboxaid.toolsPlatform.launchSignature";
3535
const TOOL_STATE_STORAGE_KEY_PREFIX = "toolboxaid.";
36+
const STANDARDIZED_TOOL_HEADER_IDS = new Set([
37+
"vector-map-editor",
38+
"vector-asset-studio",
39+
"sprite-editor",
40+
"state-inspector"
41+
]);
3642
const PRESERVED_TOOL_STATE_KEYS = new Set([
3743
HEADER_EXPANDED_STORAGE_KEY,
3844
WORKSPACE_LAUNCH_SIGNATURE_STORAGE_KEY
@@ -1168,6 +1174,14 @@ function renderHeaderMarkup(currentTool, isHeaderExpanded) {
11681174
const description = currentTool
11691175
? currentTool.description
11701176
: "Registry-driven, engine-themed entry surface for vector maps, vector assets, tilemaps, parallax scenes, and sprite workspaces.";
1177+
const useStandardizedToolHeader = !isLanding
1178+
&& Boolean(currentTool?.id)
1179+
&& STANDARDIZED_TOOL_HEADER_IDS.has(currentTool.id);
1180+
const standardizedToolName = normalizeTextValue(currentTool?.name) || title;
1181+
const standardizedToolShortDescription = normalizeTextValue(currentTool?.shortDescription);
1182+
const standardizedHeaderText = standardizedToolShortDescription
1183+
? `${standardizedToolName}${standardizedToolShortDescription}`
1184+
: standardizedToolName;
11711185
const meta = isLanding
11721186
? `${getToolRegistry().filter((entry) => entry.active === true && entry.visibleInToolsList === true).length} active tools | hubCommon.css theme`
11731187
: "Shared shell, engine theme, and workspace context applied from the active tool registry";
@@ -1177,16 +1191,18 @@ function renderHeaderMarkup(currentTool, isHeaderExpanded) {
11771191
<div class="tools-platform-frame__accordion-content">
11781192
<div class="tools-platform-frame__accordion-summary">
11791193
<div class="tools-platform-frame__summary-copy">
1180-
<h1 class="tools-platform-frame__title">${escapeHtml(title)}</h1>
1181-
<h2 class="tools-platform-frame__eyebrow">First-Class Tools Surface</h2>
1194+
<h1 class="tools-platform-frame__title${useStandardizedToolHeader ? " tools-platform-frame__title--single-line" : ""}"${useStandardizedToolHeader ? ` title="${escapeHtml(standardizedHeaderText)}"` : ""}>${escapeHtml(useStandardizedToolHeader ? standardizedHeaderText : title)}</h1>
1195+
${useStandardizedToolHeader ? "" : '<h2 class="tools-platform-frame__eyebrow">First-Class Tools Surface</h2>'}
11821196
</div>
11831197
<div class="tools-platform-frame__summary-meta">
11841198
<div class="tools-platform-frame__meta">${escapeHtml(meta)}</div>
11851199
</div>
11861200
</div>
1201+
${useStandardizedToolHeader ? "" : `
11871202
<div class="tools-platform-frame__topline">
11881203
<p class="tools-platform-frame__description">${escapeHtml(description)}</p>
11891204
</div>
1205+
`}
11901206
${showNavThroughTiles ? `
11911207
<div class="tools-platform-frame__bottomline">
11921208
${!isLanding ? `<hr class="tools-platform-frame__divider" />` : ""}

tools/toolRegistry.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ export const TOOL_REGISTRY = Object.freeze([
55
id: "vector-map-editor",
66
name: "Vector Map Editor",
77
displayName: "Vector Map Editor",
8+
shortDescription: "Map layout and collision authoring",
89
shortLabel: "Map",
910
path: "Vector Map Editor",
1011
folderName: "Vector Map Editor",
@@ -31,6 +32,7 @@ export const TOOL_REGISTRY = Object.freeze([
3132
id: "vector-asset-studio",
3233
name: "Vector Asset Studio",
3334
displayName: "Vector Asset Studio",
35+
shortDescription: "SVG asset authoring and export",
3436
shortLabel: "Asset",
3537
path: "Vector Asset Studio",
3638
folderName: "Vector Asset Studio",
@@ -121,6 +123,7 @@ export const TOOL_REGISTRY = Object.freeze([
121123
id: "sprite-editor",
122124
name: "Sprite Editor",
123125
displayName: "Sprite Editor",
126+
shortDescription: "Palette-locked sprite and frame editing",
124127
shortLabel: "Sprite",
125128
path: "Sprite Editor",
126129
folderName: "Sprite Editor",
@@ -213,6 +216,7 @@ export const TOOL_REGISTRY = Object.freeze([
213216
id: "state-inspector",
214217
name: "State Inspector",
215218
displayName: "State Inspector",
219+
shortDescription: "Host/runtime state snapshot inspection",
216220
shortLabel: "Inspect",
217221
path: "State Inspector",
218222
folderName: "State Inspector",

0 commit comments

Comments
 (0)