Open asset greyed out and real tab cards: Open asset in the scene object menu is only pickable for kinds with an editor of their own, the table of which asset opens which tab moved from Editor.ts into the new module assetTabs.ts with hasAssetEditor so the menu and the editor read the same list, Select asset stays as it was; tabs are drawn as index cards (new module TabButton.ts): the one showing is a light grey card instead of the aggressive blue, rounded above and square below, its name in plain weight and measured bold so it never clips itself, and a mouse down on the tab already showing keeps its colour; the padding left and right grew to 6 px in one place for both kinds of tab, Scene and Game carry an icon too (the scene one from the asset panel, a new game.svg play sign), Plugins and a plugin's own tab have none; new test hook menuEnabled next to menuRows and menuIcons, e2e 01 checks the greyed out entry on a sprite row, 14a-ii the card and the icons of the fixed tabs, 44a the icon at the wider padding (#176)
game-maker / gate (push) Successful in 2m5s
game-maker / suite (push) Successful in 7m0s

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
adminandClaude Opus 5 committed 2026-09-20 11:40:01 +02:00
1 parent 4b5b91eaaa
commit 60ea56a2ce
17 files changed
+287 -47

No files matched your search

+6 -3
View File
@@ -1,6 +1,6 @@
import { describe, expect, it } from 'vitest';
import { ASSET_TYPES } from '../../src/core/model/AssetTypes';
import { ASSET_ICON_SVG, LIST_ICON_SVG } from '../../src/editor/panels/assetIcons';
import { ASSET_ICON_SVG, GAME_ICON_SVG, LIST_ICON_SVG } from '../../src/editor/panels/assetIcons';
import { tintSvg } from '../../src/ui/svg';
import { SYMBOL_SVG } from '../../src/viewport/symbolIcons';
@@ -32,6 +32,7 @@ describe('icon files', () => {
...Object.entries(SYMBOL_SVG).map(([name, svg]) => [`symbol ${name}`, svg]),
...Object.entries(ASSET_ICON_SVG).map(([name, svg]) => [`asset ${name}`, svg]),
['list tab', LIST_ICON_SVG],
['game tab', GAME_ICON_SVG],
];
// Pixi draws the file's coordinates as they are and ignores the viewBox, so the viewBox only
@@ -45,12 +46,14 @@ describe('icon files', () => {
});
it('draws the asset icons in the 16 units a list row and a button reserve', () => {
for (const svg of [...Object.values(ASSET_ICON_SVG), LIST_ICON_SVG])
for (const svg of [...Object.values(ASSET_ICON_SVG), LIST_ICON_SVG, GAME_ICON_SVG])
expect(tags(svg)[0]!.attrs.viewBox).toBe('-8 -8 16 16');
});
it('gives the List tab a picture no asset type has', () => {
it('gives the List and Game tabs a picture no asset type has (#176)', () => {
expect(Object.values(ASSET_ICON_SVG)).not.toContain(LIST_ICON_SVG);
expect(Object.values(ASSET_ICON_SVG)).not.toContain(GAME_ICON_SVG);
expect(GAME_ICON_SVG).not.toBe(LIST_ICON_SVG);
});
it.each(icons)('%s uses only what the Pixi parser draws like a browser', (_, svg) => {