pestle
pestle copied to clipboard
Magento 2 generate menu parent menus shown on one line
With build 1.4.3, the parent menu's are shown on one line:
evs@evs-ubuntu:~/www/pulsestorm $ p71 pestle.phar magento2:generate:menu
Current working directory: '/home/evs/www/pulsestorm'
Module Name? (Pulsestorm_HelloGenerate)] Pulsestorm_MenuTutorial
Is this a new top level menu? (Y/N) (N)]
Select Parent Menu: [1] System(Magento_Backend::system)[2] Catalog(Magento_Catalog::catalog)[3] Sales(Magento_Sales::sales)[4] Find Partners & Extensions(Magento_Marketplace::partners)[5] Reports(Magento_Reports::report)[6] Dashboard(Magento_Backend::dashboard)[7] System(Magento_Backend::system)[8] Marketing(Magento_Backend::marketing)[9] Content(Magento_Backend::content)[10] Stores(Magento_Backend::stores)[11] Customers(Magento_Customer::customer)[12] (Magento_Backend::system_currency)[13] Top Level Example(Pulsestorm_MenuTutorial::top_level_example) ()]
They should be shown one on each line.
Thanks for the bug report @evs-xsarus -- because this is formatting related (i.e. doesn't change the structure of the XML, it's just how the tags are formatting) it'll probably be a low priority fix.
That said, the XML is generated over here: https://github.com/astorm/pestle/issues/353 If you wanted to make a PR we'd be happy to accept it.
Looking at the code in https://github.com/astorm/pestle/blob/master/modules/pulsestorm/magento2/cli/generate/menu/module.php#L42 and https://github.com/astorm/pestle/blob/master/modules/pulsestorm/magento2/cli/generate/menu/module.php#L64 I can only assume the building of texts is correct using the \t and \n. The error is in displaying those texts where the \t and \n don't seem to be understood in my terminal.
I'm using Ubuntu 18.04 and tested on several terminals (gnome-term, xdterm, tilda, guake, terminator).