CLI Menu v3.0.0 Release Notes
Release Date: 2018-05-17 // almost 6 years ago-
[3.0.0]
๐ Changed
- Optimise redrawing to reduce flickering (#83)
- ๐ Use parent menu terminal when creating sub menus to reduce object graph (#94)
- ๐จ Do not print right margin. Causes menu to wrap even when row fits in terminal (#116)
- CliMenu throws a \RuntimeException if it is opened with no items added (#146, #130)
- ๐ง Sub Menus are configured via closures (#155)
- โ Remove restriction of 1 character length for markers (#141)
- โ Remove the mandatory space after markers for now they can be of any length (#154)
โ Added
- โ Added type hints everywhere (#79)
- โ Added phpstan to the travis build (#79)
- Input dialogue system for prompting users. Comes with text, number and password inputs (#81)
- โ Added ability to pass already prepared CliMenuBuilder instance to CliMenuBuilder#addSubMenuFromBuilder (#85, 155)
- โ Added CliMenu#addItems & CliMenu#setItems to add multiple items and replace them (#86)
- โ Added custom control mapping - link any key to a callable to immediately execute it (#87)
- โ Added MenuMenuItem#getSubMenu (#92)
- โ Added alternate text to AsciiArtItem to display if the ascii art is too large for the current terminal (#93)
- โ Added the ability to pass existing MenuStyle instance to dialogues and inputs for consistent themes and reduced object graph (#99)
- โ Added CSS like borders (#100)
- โ Added option to auto center menu with CliMenuBuilder#setMarginAuto (#103)
- โ Added option to auto center menu with CliMenuBuilder#setMarginAuto (#103)
- โ Added support for 256 colours with automatic and manual fallback to 8 colours (#104)
- โ Added clear option to CliMenu#redraw useful for when reducing the terminal width (#117)
- โ Added ability to set top/bottom and left/right padding independently (#121)
- โ Added a new Split Item item type which allows displaying multiple items on one line (#127)
- โ Added setText methods to various items so they can be modified at runtime (#153)
- โ Added MenuStyle#hasChangedFromDefaults to check if a MenuStyle has been modified (#149)
- โ Added CliMenu#setTitle and CliMenu#setStyle (#155)
- โ Added CliMenuBuilder#getStyle to get the current style object for the menu
๐ Fixed
- ๐ Fixed sub menu go back button freezing menu (#88)
- ๐ Fixed centering ascii art items with trailing white space (#102)
- Enable cursor when exiting menu (#110)
- ๐ Fixed (#71) - changed padding calculation when row too long to stop php notices (#112)
- ๐ Fixed wordwrap helper (#134)
- ๐ Fixed selected item issues when adding/setting/removing items (#156)
- ๐ Fix infinite loop when no selectable items in menu (#159, #144)
โ Removed
- โฌ๏ธ Dropped PHP 5.x and PHP 7.0 support (#79)
- โ Removed the Terminal namespace which has been migrated to php-school/terminal (#81)
- โ Removed MenuStyle::getDefaultStyleValues (#149)
- โ Removed CliMenuBuilder#setTerminal (#149)
- โ Removed CliMenuBuilder#getSubMenu (#155)
- โ Removed CliMenuBuilder#getMenuStyle (#155)
- โ Removed CliMenuBuilder#end (#155)