Skip to content

Commit

Permalink
Add more details about TerminalMenus API changes to NEWS (#36210)
Browse files Browse the repository at this point in the history
  • Loading branch information
timholy committed Jun 11, 2020
1 parent 70d8497 commit 38f2c59
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,21 @@ Standard library changes
improved support for dynamic menus. These changes are compatible with the previous
(deprecated) interface, so are non-breaking.

The new API offers several enhancements:

+ Menus are configured in their constructors via keyword arguments
+ For custom menu types, the new `Config` and `MultiSelectConfig` replace the global `CONFIG` Dict
+ `request(menu; cursor=1)` allows you to control the initial cursor position in the menu (defaults to first item)
+ `MultiSelectMenu` allows you to pass a list of initially-selected items with the `selected` keyword argument
+ `writeLine` was deprecated to `writeline`, and `writeline` methods are not expected to print the cursor indicator.
The old `writeLine` continues to work, and any of its method extensions should print the cursor indicator as before.
+ `printMenu` has been deprecated to `printmenu`, and it both accepts a state input and returns a state output
that controls the number of terminal lines erased when the menu is next refreshed. This plus related changes
makes `printmenu` work properly when the number of menu items might change depending on user choices.
+ `numoptions`, returning the number of items in the menu, has been added as an alternative to implementing `options`
+ `suppress_output` (primarily a testing option) has been added as a keyword argument to `request`,
rather than a configuration option

#### SparseArrays

* Display large sparse matrices with a Unicode "spy" plot of their nonzero patterns, and display small sparse matrices by an `Matrix`-like 2d layout of their contents.
Expand Down

0 comments on commit 38f2c59

Please sign in to comment.