Lists add and delete items right in the list header and rows
The layer, frame and shape lists still had their add and delete buttons scattered below the list, each in its own layout. They now live in the shared SortableList, so every list works the same way. - SortableList gets an optional header with the title on the left and a + on the right, plus an optional x per row next to the eye. - The keepOne option hides the x on the last remaining row, so a pixel art image and a tilemap always keep one layer. - Pixel art layers and frames and tilemap layers use header, + and x. Only Merge down and Duplicate stay below the lists. - Vector art shapes get the x but no +. Add shape stays below the list and Delete shapes stays for a multi-selection. - The section headings in the pixel art column use the same style as the list titles and the inspector. Findings: - The wait loop added to check 47i for #196 only waited for the right half of the shape. If the texture landed between the two reads, the left half was still blue and the check failed. It now waits for both halves. Tests: - ./check.sh: 138 files, 2052 tests, exit 0. - GM_STEPS=39,40,47,48 (fresh): ALL PASSED, 156 checks (was 154). - GM_STEPS=47,48 (fresh, final): ALL PASSED, 86 checks. - Two new e2e checks: x on a shape (47) and x on a frame (48). The tilemap check in 40 now uses the x instead of Delete layer. - Counter-check: with the x not reporting to its owner, exactly the two new checks fail. - Check total 1266 in README and wiki is computed (1264 + 2). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
5b9b57fd19
commit
ae0247d86f
11 files changed
+264
-100
No files matched your search
@@ -28,6 +28,7 @@ import type { InspectorHost } from '../../src/editor/inspector/host';
|
||||
import {
|
||||
buildShapeListSection,
|
||||
buildShapeSection,
|
||||
currentShapeList,
|
||||
refreshShapeSection,
|
||||
setFillTexture,
|
||||
setPaintKind,
|
||||
@@ -195,7 +196,8 @@ describe('shape rows', () => {
|
||||
it('the asset itself shows the list and the way to add to it', () => {
|
||||
const { host, assetId } = withShapes(2);
|
||||
buildShapeListSection(host, findAssetOf(host.state.project, assetId, 'vectorart')!);
|
||||
expect(texts(host)).toContain('SHAPES');
|
||||
// The list carries its "SHAPES" header itself.
|
||||
expect(currentShapeList()?.shownIds).toHaveLength(2);
|
||||
expect(texts(host)).toContain('The top row is drawn over the ones below it.');
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user