Asset panel: double-click opens the tab, single click only selects (#71)
game-maker / suite (push) Failing after 8m11s
game-maker / suite (push) Failing after 8m11s
One rule for every asset type: a click on an asset row selects it, a double-click (or Enter, or creating it via +) opens its tab. Selection alone still switches tabs only for nodes, frames and template objects. - state.openAsset(id) = select + 'open' event; the editor maps the asset type to its tab via TAB_OF_ASSET. The two special clauses for state machine and shader assets in the selection handler are gone. - Creating via + and importing a texture from the picker open the tab; paste/drop of an image only selects. - 3 unit tests (event order, re-open of a selected asset, selection never fires open), 14 e2e checks in step 4. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
3da0ef1be2
commit
4d9c4982eb
7 files changed
+160
-15
No files matched your search
@@ -156,7 +156,9 @@ function adopt(
|
||||
*/
|
||||
export function importStoredImage(image: UploadedTexture, deps: TextureImportDeps): ImportOutcome {
|
||||
const outcome = adopt(image, 'Texture', image.file, deps);
|
||||
selectLast([outcome], deps);
|
||||
// Chosen in the picker, so this is "+ → Texture": the tab opens like for any created asset. A
|
||||
// pasted or dropped picture (`importImages`) only selects – it usually goes into the scene.
|
||||
if (outcome.assetId) deps.state.openAsset(outcome.assetId);
|
||||
deps.state.setNotice(
|
||||
outcome.error ??
|
||||
(outcome.reused ? 'That image is already in the project.' : 'Added the image to the project.'),
|
||||
|
||||
Reference in new issue
Block a user