Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ All notable changes to this project will be documented in this file.
The format is based on [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 0.4.1 Under development
## 0.5.0 Under development

- build!: require `php-forge/debug` `^0.3`.

## 0.4.0 September 16, 2026

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"require": {
"php": ">=8.3",
"ui-awesome/html": "^0.6",
"php-forge/debug": "^0.2",
"php-forge/debug": "^0.3",
"psr/event-dispatcher": "^1.0"
},
"require-dev": {
Expand Down
2 changes: 1 addition & 1 deletion src/Debug/VitePanel.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public function present(array $data): PanelView
}
}

$view = $view->summary($count === 1 ? ' component' : ' components', $count)->active($count !== 0);
$view = $view->summary($count === 1 ? ' component' : ' components', $count);

if ($count === 0) {
return $view->emptyState(
Expand Down
14 changes: 1 addition & 13 deletions tests/Debug/ViteCollectorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use PHPForge\Vite\Asset\AssetCollection;
use PHPForge\Vite\Configuration\{DevelopmentConfiguration, ProductionConfiguration};
use PHPForge\Vite\Debug\{ViteCollector, VitePanel};
use PHPForge\Vite\Debug\ViteCollector;
use PHPForge\Vite\Development\InlineModuleProviderInterface;
use PHPForge\Vite\Event\AssetsResolved;
use PHPForge\Vite\Exception\ManifestNotFoundException;
Expand Down Expand Up @@ -51,10 +51,6 @@ public function testCaptureIsNullOutsideTheCycleAndEmptyInsideIt(): void
$collector->capture(),
'Observed empty capture, not missing.',
);
self::assertFalse(
(new VitePanel())->present(['components' => []])->isActive(),
'An empty capture must not activate the panel.',
);

$collector->shutdown();
}
Expand Down Expand Up @@ -96,10 +92,6 @@ public function testDevelopmentCaptureDescribesEveryResolutionInTheCycle(array $
$capture,
'Components must accumulate in resolution order.',
);
self::assertTrue(
(new VitePanel())->present($capture)->isActive(),
'Captured components must activate the panel.',
);

$collector->shutdown();
}
Expand Down Expand Up @@ -437,10 +429,6 @@ public function testProductionCaptureUsesTheResolvedManifestEvenAfterRemoval():

$collector->shutdown();

self::assertTrue(
(new VitePanel())->present($capture)->isActive(),
'A replayed capture must activate the panel.',
);

$collector->startup();

Expand Down
10 changes: 1 addition & 9 deletions tests/Debug/VitePanelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,6 @@ public function testMetadataAndEmptyCapture(): void

$view = $panel->present(['components' => []]);

self::assertFalse(
$view->isActive(),
'An empty capture must not activate navigation.',
);
self::assertSame(
[],
$view->toolbarMetrics(),
Expand All @@ -156,10 +152,6 @@ public function testModeLabelAndGroupRemainProviderOwned(string $mode, string $l
{
$view = (new VitePanel())->present(['components' => VitePanelProvider::components($mode)]);

self::assertTrue(
$view->isActive(),
'Captured components must activate the panel.',
);
self::assertSame(
$label,
self::toolbarValue($view->toolbarMetrics(), 0),
Expand Down Expand Up @@ -255,7 +247,7 @@ private static function describe(PanelView $view): array
];
}

return ['summary' => $summary, 'blocks' => $blocks, 'toolbar' => $toolbar, 'active' => $view->isActive()];
return ['summary' => $summary, 'blocks' => $blocks, 'toolbar' => $toolbar];
}

/**
Expand Down
6 changes: 2 additions & 4 deletions tests/Debug/fixtures/chunks.view.json
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,7 @@
"filterable": false
}
],
"toolbar": [],
"active": true
"toolbar": []
}
}
],
Expand All @@ -224,6 +223,5 @@
"style": "plain"
}
}
],
"active": true
]
}
6 changes: 2 additions & 4 deletions tests/Debug/fixtures/development.view.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,7 @@
"tone": null
}
],
"toolbar": [],
"active": true
"toolbar": []
}
}
],
Expand All @@ -149,6 +148,5 @@
"style": "plain"
}
}
],
"active": true
]
}
3 changes: 1 addition & 2 deletions tests/Debug/fixtures/empty.view.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,5 @@
]
}
],
"toolbar": [],
"active": false
"toolbar": []
}
9 changes: 3 additions & 6 deletions tests/Debug/fixtures/mixed.view.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,7 @@
"tone": null
}
],
"toolbar": [],
"active": true
"toolbar": []
}
},
{
Expand Down Expand Up @@ -256,8 +255,7 @@
"tone": null
}
],
"toolbar": [],
"active": true
"toolbar": []
}
}
],
Expand All @@ -270,6 +268,5 @@
"style": "plain"
}
}
],
"active": true
]
}
6 changes: 2 additions & 4 deletions tests/Debug/fixtures/production.view.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,7 @@
"tone": null
}
],
"toolbar": [],
"active": true
"toolbar": []
}
}
],
Expand All @@ -149,6 +148,5 @@
"style": "plain"
}
}
],
"active": true
]
}
6 changes: 2 additions & 4 deletions tests/Debug/fixtures/unavailable.view.json
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,7 @@
"tone": null
}
],
"toolbar": [],
"active": true
"toolbar": []
}
}
],
Expand All @@ -160,6 +159,5 @@
"style": "plain"
}
}
],
"active": true
]
}
6 changes: 2 additions & 4 deletions tests/Debug/fixtures/unknown.view.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,7 @@
"tone": null
}
],
"toolbar": [],
"active": true
"toolbar": []
}
}
],
Expand All @@ -149,6 +148,5 @@
"style": "plain"
}
}
],
"active": true
]
}
Loading