From ce38adbe8f8e426417d6b600483a70f931da75fb Mon Sep 17 00:00:00 2001 From: Nikita Hovratov Date: Wed, 11 Sep 2024 12:59:36 +0200 Subject: [PATCH] [TASK] Better UX for make command (cherry picked from commit cd56ae82f1cc1a2b0144d4e3e2a7528220625941) --- Classes/Command/CreateContentBlockCommand.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Classes/Command/CreateContentBlockCommand.php b/Classes/Command/CreateContentBlockCommand.php index b0dd5b18..05e57a40 100644 --- a/Classes/Command/CreateContentBlockCommand.php +++ b/Classes/Command/CreateContentBlockCommand.php @@ -122,21 +122,21 @@ protected function execute(InputInterface $input, OutputInterface $output): int if ($rootVendor !== '') { $default = $rootVendor; } - $contentBlockVendorQuestion = new Question('Enter your vendor name (lowercase, separated by dashes "-")', $default); + $contentBlockVendorQuestion = new Question('Define vendor (vendor-name/content-block-name)', $default); $contentBlockVendorQuestion->setValidator($this->validateName(...)); while (($vendor = $io->askQuestion($contentBlockVendorQuestion)) === false) { - $output->writeln('Your vendor name does not match the requirement.'); + $output->writeln('Your vendor name does not match the requirements.'); } } $vendor = strtolower($vendor); if ($input->getOption('name')) { $name = $input->getOption('name'); if (!ContentBlockNameValidator::isValid($name)) { - $output->writeln('Your Content Block name does not match the requirement.'); + $output->writeln('Your Content Block name does not match the requirements.'); return Command::INVALID; } } else { - $contentBlockNameQuestion = new Question('Enter your ' . $contentType->getHumanReadable() . ' name (lowercase, separated by dashes "-")'); + $contentBlockNameQuestion = new Question('Define name (' . $vendor . '/content-block-name)'); $contentBlockNameQuestion->setValidator($this->validateName(...)); while (($name = $io->askQuestion($contentBlockNameQuestion)) === false) { $output->writeln('Your Content Block name does not match the requirement.'); @@ -169,7 +169,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int $title = $input->getOption('title'); } else { $defaultTitle = $vendor . '/' . $name; - $question = new Question('Enter human-readable title', $defaultTitle); + $question = new Question('Define title', $defaultTitle); $title = $io->askQuestion($question); }