Skip to content

Commit 3bd36be

Browse files
committed
feat: update Inspector command to use 'theme' namespace
1 parent 78129bf commit 3bd36be

4 files changed

Lines changed: 29 additions & 12 deletions

File tree

.github/workflows/magento-compatibility.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,10 +171,10 @@ jobs:
171171
bin/magento mageforge:hyva:tokens Magent/lum --help || echo "Expected failure - TokensCommand"
172172
173173
echo "Test MageForge Inspector commands:"
174-
bin/magento mageforge:dev:inspector --help
174+
bin/magento mageforge:theme:inspector --help
175175
176176
echo "Test Inspector status command:"
177-
bin/magento mageforge:dev:inspector status
177+
bin/magento mageforge:theme:inspector status
178178
179179
- name: Test Summary
180180
run: |
@@ -331,10 +331,10 @@ jobs:
331331
bin/magento mageforge:hyva:tokens Magent/lum --help || echo "Expected failure - TokensCommand"
332332
333333
echo "Test MageForge Inspector commands:"
334-
bin/magento mageforge:dev:inspector --help
334+
bin/magento mageforge:theme:inspector --help
335335
336336
echo "Test Inspector status command:"
337-
bin/magento mageforge:dev:inspector status
337+
bin/magento mageforge:theme:inspector status
338338
339339
- name: Test Summary
340340
run: |

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ Please ensure that your Magento installation meets this requirement before insta
3737
| `mageforge:theme:build` | Builds selected themes (CSS/TailwindCSS) | `frontend:build` |
3838
| `mageforge:theme:watch` | Starts watch mode for theme development | `frontend:watch` |
3939
| `mageforge:theme:clean` | Clean theme static files and cache directories | `frontend:clean` |
40+
| `mageforge:theme:inspector` | Enable, disable or check status of Frontend Inspector | - |
4041
| `mageforge:hyva:compatibility:check`| Check modules for Hyvä theme compatibility issues | `hyva:check` |
4142
| `mageforge:hyva:tokens` | Generate Hyvä design tokens (Hyvä themes only) | `hyva:tokens` |
4243
| `mageforge:system:version` | Shows current and latest version of the module | `system:version` |
4344
| `mageforge:system:check` | Get system information (OS, PHP, Database, Node.js, etc.) | `system:check` |
44-
| `mageforge:dev:inspector` | Enable, disable or check status of Frontend Inspector | - |
4545

4646
---
4747

docs/commands.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ bin/magento mageforge:hyva:tokens Hyva/default
385385

386386
---
387387

388-
### 8. InspectorCommand (`mageforge:dev:inspector`)
388+
### 8. InspectorCommand (`mageforge:theme:inspector`)
389389

390390
**Purpose**: Enable, disable, or check status of the MageForge Frontend Inspector - an interactive element inspector for debugging templates, blocks, and modules in the frontend.
391391

@@ -401,13 +401,13 @@ bin/magento mageforge:hyva:tokens Hyva/default
401401

402402
```bash
403403
# Enable inspector
404-
bin/magento mageforge:dev:inspector enable
404+
bin/magento mageforge:theme:inspector enable
405405

406406
# Disable inspector
407-
bin/magento mageforge:dev:inspector disable
407+
bin/magento mageforge:theme:inspector disable
408408

409409
# Check status
410-
bin/magento mageforge:dev:inspector status
410+
bin/magento mageforge:theme:inspector status
411411
```
412412

413413
**Implementation Details**:

src/Console/Command/Dev/InspectorCommand.php

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,29 @@ public function __construct(
5252
*/
5353
protected function configure(): void
5454
{
55-
$this->setName($this->getCommandName('dev', 'inspector'))
56-
->setDescription('Enable, disable or check status of MageForge Frontend Inspector')
55+
$this->setName($this->getCommandName('theme', 'inspector'))
56+
->setDescription('Manage MageForge Frontend Inspector (Actions: enable|disable|status)')
5757
->addArgument(
5858
self::ARGUMENT_ACTION,
5959
InputArgument::REQUIRED,
6060
'Action to perform: enable, disable, or status'
61+
)
62+
->setHelp(
63+
<<<HELP
64+
The <info>%command.name%</info> command manages the MageForge Frontend Inspector:
65+
66+
<info>php %command.full_name%</info> <comment>enable</comment>
67+
Enable the inspector (requires developer mode)
68+
69+
<info>php %command.full_name%</info> <comment>disable</comment>
70+
Disable the inspector
71+
72+
<info>php %command.full_name%</info> <comment>status</comment>
73+
Show current inspector status
74+
75+
The inspector allows you to hover over frontend elements to see template paths,
76+
block classes, modules, and other metadata. Activate with Ctrl+Shift+I.
77+
HELP
6178
);
6279

6380
parent::configure();
@@ -168,7 +185,7 @@ private function showStatus(): int
168185
]);
169186
} elseif (!$isEnabled) {
170187
$this->io->newLine();
171-
$this->io->note('Run "bin/magento mageforge:dev:inspector enable" to activate the inspector.');
188+
$this->io->note('Run "bin/magento mageforge:theme:inspector enable" to activate the inspector.');
172189
} else {
173190
$this->io->newLine();
174191
$this->io->writeln('<info>✓</info> Inspector is active and ready to use!');

0 commit comments

Comments
 (0)