Skip to content

Commit 70cb647

Browse files
author
DavidQ
committed
Fix Asset Manager V2 font preview rendering and selected detail height - PR_26126_097-asset-manager-v2-font-preview-height-fix
1 parent afae1e0 commit 70cb647

11 files changed

Lines changed: 539 additions & 470 deletions
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# PR_26126_097 Asset Manager V2 Font Preview Notes
2+
3+
## Font Preview Rendering
4+
- Font assets now use a scoped preview family derived from the selected asset ID.
5+
- For `assets.font.ui.vector-battle`, the preview family is `asset-preview-assets-font-ui-vector-battle`.
6+
- Font preview HTML includes a scoped `@font-face` rule and applies the same family to the preview sample text.
7+
- The selected asset ID remains the source of truth for the preview font family.
8+
9+
## Path Resolution
10+
- Font preview URLs continue to resolve through the active Workspace game root.
11+
- During temporary `?palette=sample` UAT testing, `assets/fonts/vector-battle.ttf` resolves to `/games/Asteroids/assets/fonts/vector-battle.ttf`.
12+
- Existing Workspace V2 font previews continue to resolve under `/games/Asteroids/assets/...` when `gameId=Asteroids` is active.
13+
14+
## Failure Reporting
15+
- Asset Manager V2 attempts to load the preview font with the browser `FontFace` API when available.
16+
- If the font load rejects, Asset Manager V2 writes a visible `FAIL Font preview failed for <asset-id>: <reason>` entry to Status.
17+
- Stale async font load results are ignored when the selected preview changes before the load resolves.
18+
19+
## Validation
20+
- Playwright validates the UAT `vector-battle.ttf` font preview URL under `/games/Asteroids/assets/fonts/vector-battle.ttf`.
21+
- Playwright validates the scoped `@font-face` family is derived from `assets.font.ui.vector-battle`.
22+
- Playwright validates a rejected font load writes a visible Status failure.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# PR_26126_097 Asset Manager V2 Manual Validation Notes
2+
3+
## Commands
4+
- `node --check tools/asset-manager-v2/js/assetPreviewHelpers.js`
5+
- `node --check tools/asset-manager-v2/js/controls/AssetCatalogControl.js`
6+
- `node --check tests/playwright/PreviewGeneratorV2Baseline.spec.mjs`
7+
- `npx playwright test tests/playwright/PreviewGeneratorV2Baseline.spec.mjs --project=playwright --reporter=list -g "Asset Manager V2"`
8+
- `npm run test:workspace-v2`
9+
10+
## Results
11+
- JavaScript syntax checks passed for changed runtime and Playwright files.
12+
- Focused Asset Manager V2 Playwright slice passed: 5 tests passed.
13+
- Required workspace-v2 Playwright gate passed: 12 tests passed.
14+
- `docs/dev/reports/playwright_v8_coverage_report.txt` was regenerated by the required workspace-v2 validation run.
15+
16+
## Manual Checks Covered By Tests
17+
- Font preview URL resolution through active game root.
18+
- Scoped preview `@font-face` generation.
19+
- Preview font family derived from the selected asset ID.
20+
- Visible Status failure when font loading rejects.
21+
- Selected Asset Detail without a fixed 300px height.
22+
- Sample JSON files were not modified.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# PR_26126_097 Asset Manager V2 Selected Detail Height Notes
2+
3+
## Height Behavior
4+
- Selected Asset Detail no longer uses a fixed flex basis.
5+
- Selected Asset Detail no longer declares a fixed minimum height.
6+
- The control now uses `flex: 0 1 auto` and `min-height: 0`.
7+
- Rendered height is controlled by the selected detail content and center-panel layout rather than a hard-coded 300px or 220px value.
8+
9+
## Layout Preservation
10+
- Selected Asset Detail remains in the center panel.
11+
- Selected Asset Detail remains separate from the Assets list.
12+
- `assetPreview` remains inside Selected Asset Detail.
13+
- The control still does not span the full app width.
14+
15+
## Validation
16+
- Playwright validates the computed flex basis is `auto`.
17+
- Playwright validates the computed minimum height is `0px`.
18+
- Playwright validates the rendered height is not the fixed 300px value.
19+
- Playwright validates the detail control stays within the center panel.

docs/dev/reports/codex_changed_files.txt

Lines changed: 14 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,23 @@
22
M docs/dev/reports/coverage_changed_js_guardrail.txt
33
M docs/dev/reports/playwright_v8_coverage_report.txt
44
M tests/playwright/PreviewGeneratorV2Baseline.spec.mjs
5-
M tools/asset-manager-v2/index.html
6-
M tools/asset-manager-v2/js/AssetManagerV2App.js
75
M tools/asset-manager-v2/js/assetPreviewHelpers.js
8-
M tools/asset-manager-v2/js/services/TemporaryUatSamplePalette.js
9-
M tools/asset-manager-v2/js/services/WorkspaceBridge.js
6+
M tools/asset-manager-v2/js/controls/AssetCatalogControl.js
107
M tools/asset-manager-v2/styles/assetManager.css
11-
?? docs/dev/reports/PR_26126_096_asset_manager_v2_games_only_workspace_context_notes.md
12-
?? docs/dev/reports/PR_26126_096_asset_manager_v2_manual_validation_notes.md
13-
?? docs/dev/reports/PR_26126_096_asset_manager_v2_selected_detail_placement_notes.md
14-
?? docs/dev/reports/PR_26126_096_asset_manager_v2_temporary_uat_session_root_notes.md
8+
?? docs/dev/reports/PR_26126_097_asset_manager_v2_font_preview_notes.md
9+
?? docs/dev/reports/PR_26126_097_asset_manager_v2_manual_validation_notes.md
10+
?? docs/dev/reports/PR_26126_097_asset_manager_v2_selected_detail_height_notes.md
1511

1612
# git ls-files --others --exclude-standard
17-
docs/dev/reports/PR_26126_096_asset_manager_v2_games_only_workspace_context_notes.md
18-
docs/dev/reports/PR_26126_096_asset_manager_v2_manual_validation_notes.md
19-
docs/dev/reports/PR_26126_096_asset_manager_v2_selected_detail_placement_notes.md
20-
docs/dev/reports/PR_26126_096_asset_manager_v2_temporary_uat_session_root_notes.md
13+
docs/dev/reports/PR_26126_097_asset_manager_v2_font_preview_notes.md
14+
docs/dev/reports/PR_26126_097_asset_manager_v2_manual_validation_notes.md
15+
docs/dev/reports/PR_26126_097_asset_manager_v2_selected_detail_height_notes.md
2116

2217
# git diff --stat
23-
docs/dev/reports/coverage_changed_js_guardrail.txt | 7 +--
24-
docs/dev/reports/playwright_v8_coverage_report.txt | 18 ++++---
25-
.../playwright/PreviewGeneratorV2Baseline.spec.mjs | 59 ++++++++++++++++++----
26-
tools/asset-manager-v2/index.html | 21 ++++----
27-
tools/asset-manager-v2/js/AssetManagerV2App.js | 14 ++++-
28-
tools/asset-manager-v2/js/assetPreviewHelpers.js | 15 ++++--
29-
.../js/services/TemporaryUatSamplePalette.js | 4 ++
30-
.../js/services/WorkspaceBridge.js | 20 +++++---
31-
tools/asset-manager-v2/styles/assetManager.css | 7 ++-
32-
9 files changed, 121 insertions(+), 44 deletions(-)
18+
docs/dev/reports/coverage_changed_js_guardrail.txt | 5 +-
19+
docs/dev/reports/playwright_v8_coverage_report.txt | 10 +--
20+
.../playwright/PreviewGeneratorV2Baseline.spec.mjs | 95 ++++++++++++++++++----
21+
tools/asset-manager-v2/js/assetPreviewHelpers.js | 49 ++++++++++-
22+
.../js/controls/AssetCatalogControl.js | 14 +++-
23+
tools/asset-manager-v2/styles/assetManager.css | 4 +-
24+
6 files changed, 147 insertions(+), 30 deletions(-)

0 commit comments

Comments
 (0)