Skip to content

Commit ff6837a

Browse files
committed
Correct Asset Tool naming storage dynamic inputs and import layout - PR_26156_154-158-asset-import-corrections & Clean active project upload files when resetting Asset Library - PR_26156_159-asset-local-upload-reset-cleanup
1 parent 77813be commit ff6837a

39 files changed

Lines changed: 1048 additions & 254 deletions

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ tests/results/
1919
tmp/test-results/
2020
tmp/
2121
scripts/untracked/
22+
projects/
2223

2324
# Codex files
2425
docs/dev/codex_commands.md

assets/theme-v2/css/tables.css

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,35 +37,33 @@ td {
3737
}
3838

3939
.tool-form-table {
40+
table-layout: fixed;
4041
width: 100%
4142
}
4243

4344
.tool-form-table th[scope="row"] {
4445
padding: var(--space-4) var(--space-6);
45-
width: 1%;
46-
white-space: nowrap;
46+
width: 4rem;
47+
white-space: normal;
4748
text-align: right;
4849
vertical-align: top
4950
}
5051

5152
.tool-form-table td {
5253
padding: var(--space-4) var(--space-6);
53-
min-width: 12rem;
54+
min-width: 0;
5455
width: auto
5556
}
5657

5758
.tool-form-table td[colspan] {
58-
min-width: 0
59+
min-width: 0;
60+
overflow-wrap: anywhere
5961
}
6062

6163
.tool-form-table input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
6264
.tool-form-table textarea,
6365
.tool-form-table select {
6466
box-sizing: border-box;
67+
max-width: 100%;
6568
width: 100%
6669
}
67-
68-
.data-table tr.is-selected td {
69-
background: var(--orange-soft);
70-
box-shadow: inset var(--space-3) 0 0 var(--orange)
71-
}

docs_build/dev/codex_commands.md

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1101,3 +1101,104 @@ Required reports:
11011101
- `docs_build/dev/reports/testing_lane_execution_report.md`
11021102
- `docs_build/dev/reports/codex_changed_files.txt`
11031103
- `docs_build/dev/reports/codex_review.diff`
1104+
1105+
1106+
## PR_26156_154-158
1107+
1108+
Changes:
1109+
- Read `docs_build/dev/PROJECT_INSTRUCTIONS.md`.
1110+
- Read `archive/v1-v2/tools/old_asset-manager-v2/js/assetManagerMetadata.js` as functionality reference only.
1111+
- Updated Asset Tool section order so Library Records is primary and Asset Roles is supporting information below it.
1112+
- Kept singular `Asset Role` for the form field and plural `Asset Roles` for the all-roles list.
1113+
- Updated Storage Path generation to `assets/projects/<projectId>/<assetRole>/<usage>/<filename>`.
1114+
- Preserved project-owned upload storage only.
1115+
- Restored file-based import behavior for Audio, Data, Font, Image, Localization, Shader, and Video.
1116+
- Added Color palette-prep behavior with visible `Palette Tool required.` diagnostics.
1117+
- Fixed Import Asset table layout through reusable Theme V2 table styling.
1118+
- Rolled back selected row highlighting and highlighted only the selected record button.
1119+
- Did not copy archive/reference code.
1120+
- Did not modify archived V1/V2 files.
1121+
- Did not modify `start_of_day`.
1122+
1123+
Validation:
1124+
- `node --check toolbox/assets/assets-mock-repository.js`
1125+
- `node --check toolbox/assets/assets.js`
1126+
- `node --check tests/playwright/tools/AssetToolMockRepository.spec.mjs`
1127+
- `node ./scripts/run-targeted-test-lanes.mjs --lane asset-tool`
1128+
- `rg --pcre2 -n "<style|style=|on(click|change|input|submit)=|<script(?![^>]*\\bsrc=)" toolbox/assets/index.html toolbox/assets/assets.js toolbox/assets/assets-mock-repository.js assets/theme-v2/css/tables.css tests/playwright/tools/AssetToolMockRepository.spec.mjs`
1129+
- `git diff --check`
1130+
- Full samples smoke: skipped by request and because samples were not changed.
1131+
1132+
Required reports:
1133+
- `docs_build/dev/reports/asset-import-correction-stacked-report.md`
1134+
- `docs_build/dev/reports/testing_lane_execution_report.md`
1135+
- `docs_build/dev/reports/codex_changed_files.txt`
1136+
- `docs_build/dev/reports/codex_review.diff`
1137+
1138+
1139+
## PR_26156_159
1140+
1141+
Changes:
1142+
- Read `docs_build/dev/PROJECT_INSTRUCTIONS.md`.
1143+
- Updated Asset Tool simulated upload paths to `projects/<projectId>/<assetRole>/<usage>/<filename>`.
1144+
- Resolved the Asset Tool demo project storage id to the ULID `01K8M3K0EX7V5A3W9Q2Y6R4T1B`.
1145+
- Added `projects/` to `.gitignore`.
1146+
- Updated Reset Asset Library so it clears active project mock file/storage rows and associated Asset Tool metadata.
1147+
- Updated Reset Asset Library to fail visibly when no active project id exists.
1148+
- Updated Reset Asset Library to report deleted simulated file/folder counts.
1149+
- Preserved the browser-only/mock storage boundary; no real disk deletion was added.
1150+
- Did not modify archived V1/V2 files.
1151+
- Did not modify `start_of_day`.
1152+
1153+
Validation:
1154+
- `node --check toolbox/assets/assets-mock-repository.js`
1155+
- `node --check toolbox/assets/assets.js`
1156+
- `node --check tests/playwright/tools/AssetToolMockRepository.spec.mjs`
1157+
- `node ./scripts/run-targeted-test-lanes.mjs --lane asset-tool`
1158+
- `rg --pcre2 -n "<style|style=|on(click|change|input|submit)=|<script(?![^>]*\\bsrc=)" toolbox/assets/index.html toolbox/assets/assets.js toolbox/assets/assets-mock-repository.js assets/theme-v2/css/tables.css tests/playwright/tools/AssetToolMockRepository.spec.mjs`
1159+
- `rg -n "assets/projects" toolbox/assets tests/playwright/tools/AssetToolMockRepository.spec.mjs docs_build/dev/reports/asset-import-correction-stacked-report.md docs_build/dev/reports/asset-local-upload-reset-cleanup-report.md`
1160+
- `git diff --check`
1161+
- Full samples smoke: skipped by request and because samples were not changed.
1162+
1163+
Required reports:
1164+
- `docs_build/dev/reports/asset-local-upload-reset-cleanup-report.md`
1165+
- `docs_build/dev/reports/testing_lane_execution_report.md`
1166+
- `docs_build/dev/reports/codex_changed_files.txt`
1167+
- `docs_build/dev/reports/codex_review.diff`
1168+
1169+
1170+
## PR_26156_160-163
1171+
1172+
Changes:
1173+
- Read `docs_build/dev/PROJECT_INSTRUCTIONS.md`.
1174+
- Read archived Asset Manager V2 reference files only for functionality expectations:
1175+
- `archive/v1-v2/tools/old_asset-manager-v2/js/controls/AssetFormControl.js`
1176+
- `archive/v1-v2/tools/old_asset-manager-v2/js/assetManagerMetadata.js`
1177+
- `archive/v1-v2/tools/old_asset-manager-v2/js/services/WorkspaceBridge.js`
1178+
- Added explicit Asset Tool picker modes: `file`, `palette`, `managed-tool`, and `advanced`.
1179+
- Added visible Picker Mode and Palette Color rows to the Import Asset form.
1180+
- Updated role switching so Usage options, file `accept`, picker visibility, storage path preview, and diagnostics update together.
1181+
- Changed Color to palette mode with visible `Palette Tool required.` diagnostic.
1182+
- Changed Data and Localization to managed-tool mode with visible tool-required diagnostics.
1183+
- Changed Shader to advanced mode and hid it from normal users unless Admin/Advanced mode is active.
1184+
- Kept Storage Path generated/read-only as `projects/<projectId>/<assetRole>/<usage>/<filename>`.
1185+
- Updated targeted Asset Tool Playwright coverage for dynamic picker switching and advanced/admin-only Shader visibility.
1186+
- Added no CSS.
1187+
- Did not copy archived/reference code.
1188+
- Did not modify archived V1/V2 files.
1189+
- Did not modify `start_of_day`.
1190+
1191+
Validation:
1192+
- `node --check toolbox/assets/assets-mock-repository.js`
1193+
- `node --check toolbox/assets/assets.js`
1194+
- `node --check tests/playwright/tools/AssetToolMockRepository.spec.mjs`
1195+
- `node ./scripts/run-targeted-test-lanes.mjs --lane asset-tool`
1196+
- `Select-String -Path toolbox/assets/index.html,toolbox/assets/assets.js -Pattern '<style|style=|<script(?![^>]*\\bsrc=)|on(click|change|input|submit)=' -CaseSensitive:$false`
1197+
- `git diff --check`
1198+
- Full samples smoke: skipped by request and because samples were not changed.
1199+
1200+
Required reports:
1201+
- `docs_build/dev/reports/asset-dynamic-picker-model-report.md`
1202+
- `docs_build/dev/reports/testing_lane_execution_report.md`
1203+
- `docs_build/dev/reports/codex_changed_files.txt`
1204+
- `docs_build/dev/reports/codex_review.diff`

docs_build/dev/commit_comment.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Polish Asset library selection, import layout, and metadata - PR_26156_151-153
1+
Update Asset dynamic picker model - PR_26156_160-163-asset-dynamic-picker-model
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
# PR_26156_160-163 Asset Dynamic Picker Model Report
2+
3+
## Scope
4+
- Built stacked PRs in order:
5+
- `PR_26156_160-asset-dynamic-picker-model`
6+
- `PR_26156_161-asset-color-palette-picker`
7+
- `PR_26156_162-asset-file-picker-role-behavior`
8+
- `PR_26156_163-asset-dynamic-picker-validation`
9+
- Read `docs_build/dev/PROJECT_INSTRUCTIONS.md` first.
10+
- Used archived Asset Manager V2 files as behavior reference only:
11+
- `archive/v1-v2/tools/old_asset-manager-v2/js/controls/AssetFormControl.js`
12+
- `archive/v1-v2/tools/old_asset-manager-v2/js/assetManagerMetadata.js`
13+
- `archive/v1-v2/tools/old_asset-manager-v2/js/services/WorkspaceBridge.js`
14+
- Did not copy archived/reference code.
15+
- Did not modify archived V1/V2 files.
16+
- Did not modify `start_of_day`.
17+
- Added no CSS.
18+
19+
## PR_26156_160 Dynamic Picker Model
20+
- Added explicit Asset Tool picker modes:
21+
- `file`
22+
- `palette`
23+
- `managed-tool`
24+
- `advanced`
25+
- Made picker mode visible in the Import Asset form.
26+
- Updated role changes to refresh:
27+
- Usage options.
28+
- File `accept` values.
29+
- Visible picker mode.
30+
- File/palette picker visibility.
31+
- Import diagnostics.
32+
- Removed silent fallback from non-file roles.
33+
34+
## PR_26156_161 Color Palette Picker
35+
- Color now uses `palette` picker mode.
36+
- Color hides the file picker.
37+
- Color shows a visible palette color picker row.
38+
- Color keeps Usage visible for palette category assignment.
39+
- Color shows `Palette Tool required.` when no active Project Workspace palette exists.
40+
- Project Workspace palette handoff remains future work; no Project Workspace implementation was changed in this PR.
41+
42+
## PR_26156_162 File Picker Role Behavior
43+
- File picker remains visible only for:
44+
- Image
45+
- Audio
46+
- Video
47+
- Font
48+
- File `accept` values now update by selected file role:
49+
- Image: `.png,.jpg,.jpeg,.webp,.gif,.svg`
50+
- Audio: `.mp3,.wav,.ogg,.m4a`
51+
- Video: `.mp4,.webm,.mov`
52+
- Font: `.ttf,.otf,.woff,.woff2`
53+
- Data now uses `managed-tool` mode with `Data/Table Tool required.`
54+
- Localization now uses `managed-tool` mode with `Localization Tool required.`
55+
- Shader now uses `advanced` mode.
56+
- Shader is hidden from normal users and appears only with Admin/Advanced mode.
57+
- Storage Path remains generated/read-only as:
58+
- `projects/<projectId>/<assetRole>/<usage>/<filename>`
59+
- The active demo project id remains the ULID:
60+
- `01K8M3K0EX7V5A3W9Q2Y6R4T1B`
61+
62+
## PR_26156_163 Validation
63+
- Updated targeted Asset Tool Playwright coverage for:
64+
- Dynamic picker switching.
65+
- Color hiding file picker and showing Palette Tool requirement.
66+
- Image/Audio/Video/Font file picker visibility and `accept` values.
67+
- Data/Localization managed-tool diagnostics.
68+
- Shader admin/advanced-only visibility.
69+
- No normal-user import/export JSON workflow.
70+
- Preserved existing upload success coverage for Image, Video, and Audio.
71+
- Preserved project-owned path and reset coverage from prior PRs.
72+
73+
## Validation Notes
74+
- Impacted lane: `asset-tool`.
75+
- Ran:
76+
- `node --check toolbox/assets/assets-mock-repository.js`
77+
- `node --check toolbox/assets/assets.js`
78+
- `node --check tests/playwright/tools/AssetToolMockRepository.spec.mjs`
79+
- `node ./scripts/run-targeted-test-lanes.mjs --lane asset-tool`
80+
- `Select-String -Path toolbox/assets/index.html,toolbox/assets/assets.js -Pattern '<style|style=|<script(?![^>]*\\bsrc=)|on(click|change|input|submit)=' -CaseSensitive:$false`
81+
- Result:
82+
- Targeted Asset Tool lane passed: 5/5.
83+
- Changed-file syntax checks passed.
84+
- Inline style/script/event-handler scan passed.
85+
86+
## Skipped Lanes
87+
- Project Workspace palette handoff lane skipped because this PR only adds the missing palette diagnostic and does not change Project Workspace behavior.
88+
- Full samples smoke skipped by request and because samples were not changed.
89+
- Broad workspace/navigation lanes skipped because no shared launch, navigation, Theme V2 CSS, parser, DB, or cross-tool runtime behavior changed.
90+
91+
## Manual Test Notes
92+
- Verified through the targeted Playwright lane:
93+
- Asset page loads without console/page/request failures.
94+
- Normal role view hides Shader.
95+
- Admin role view exposes Shader in `advanced` picker mode.
96+
- Color uses `palette` picker mode and shows Palette Tool required.
97+
- Data and Localization use `managed-tool` diagnostics.
98+
- File-based roles show file picker and role-specific `accept` values.
99+
- Normal user-facing output does not add import/export JSON workflow.
100+
101+
## Theme V2 Gap Findings
102+
- No Theme V2 gap found.
103+
- Existing Theme V2 form table/layout classes supported the added picker rows.
104+
- No new CSS was added.

0 commit comments

Comments
 (0)