/
CHANGELOG
418 lines (364 loc) · 17.2 KB
/
CHANGELOG
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
1.8 -> 1.9
----------
Package changes:
* Depend on newer time 1.5 that has absorbed old-locale (fixes #67)
* Expand version bounds on filepath dependency to support GHC 7.10
API changes:
* API: List: Add listFind*By functions.
Bug fixes:
* Fixed space leaks by making some things strict
1.7.1 -> 1.8
------------
Package changes:
* Now builds against vty >= 5. Note: this release of vty-ui does NOT make
any special effort to support the new features in vty 5. Rather, this
release is intended only to permit users to avoid building vty 4. A future
release of vty-ui will include support for vty 5 features.
* All demo programs are compiledd with -threaded due to vty5 requirement
API changes:
* Util: replace region_* functions from vty 4
* Edit: added setCharFilter to control which characters are permitted
* Added support for callbacks on entry-switch events for collections
- Added addToCollectionWithCallbacks which behaves like addToCollection
except that it accepts two callbacks.
- Those callbacks are invoked when switching views in a collection.
* List: Changed how the selection attributes are set and used when rendering
the list.
- Removed the attribute parameter to list constructors. Instead, the
attributes from the context are used as defaults and setters (specified
here) are used to set focus attributes.
- Added two functions to set the selection attributes for list items when
the list is focused and unfocused: setSelectedUnfocusedAttr and
setSelectedFocusedAttr
* API: add setEditRewriter to control presentation of edit widget contents
(e.g. to support password editors) (fixes #47)
Bug fixes:
* Check lower size bounds correctly when deciding whether to bail on padding
a widget (fixes #46)
* Docs: remove stale mention of wRef binding (fixes #54)
* List: item widget focus attributes take precedence over list focus
attributes (fixes #49)
* Mention enumitem.sty dependency in README (addresses #48)
* Manual: correct description of getListItem's return value
1.7 -> 1.7.1
------------
Package changes:
* Add an explicit upper bound on vty < 5
* Allow mtl-2.2, QucikCheck-2.7
1.6.1 -> 1.7
------------
Package changes:
* Relaxed version bounds for 'array' and 'unix' packages to permit GHC 7.8
builds
API changes:
* List: list creation now requires specification of item widget height
* List: removed BadListWidgetSizePolicy exception
* List: added scrollToBeginning, scrollToEnd functions
* Added Graphics.Vty.Widgets.Text
.appendText
.prependText
.appendTextWithAttrs
.prependTextWithAttrs
* Added Graphics.Vty.Widgets.Core.onResize to register event handlers for when
a widget's size changes at render time
* Added List functions listFindFirst and listFindAll (thanks Moritz Angermann
<moritz.angermann@stoeger-it.de>)
Bug fixes:
* Fixed documentation bugs in Chapter 3 (thanks Alexander Berntsen
<alexander@plaimi.net>)
* Fixed bugs in example code (thanks Adam Wheeler <adamwhlr@gmail.com>)
* List: scrolling a list with no elements no longer crashes with V.! error
* Core: Use correct constructor to set Shift-Tab as the previous focus
keybinding (fixes #31)
* Edit: now supports limiting line length via set/getEditMaxLength (fixes #33)
* TextZipper: ignore more invalid cursor positions (fixes #29)
* h/vFixed: add sufficient padding to prevent empty images from disrupting
fixed dimensions (fixes #34)
* Corrected documentation for boxFixed
* TextZipper: permit setting cursor position to column after end of line
(fixes #41)
Other changes:
* List widgets now permit selecting elements before the first time the list
has been rendered (thanks Moritz Angermann <moritz.angermann@stoeger-it.de>)
* Edit widgets now bring in old content on the left on backspace rather than
hiding what is being deleted (fixes #35
* List: the list item widget's default attribute apply to any padding added to
it
* mergeFocusGroups now just requires at least one non-empty group
* Fixed the documentation for hFill
* Added a collection programming demo
1.6 -> 1.6.1
------------
Bug fixes:
* Group: forward position to current child widget (fixes #24) (thanks
github.com/zydeon)
* List: report correct item position in NewItemEvents
Adding an item to a list previously emitted a NewItemEvent with the new
size of the list as first parameter even though the documentation says
otherwise, so we now report the position of the new item instead of the
list size (thanks, Hans-Peter Deifel <hpdeifel@gmx.de>)
* Performance: event loop now reads and processes all available events
between UI updates
* Only show cursor in widgets that need it: hides the cursor in static
widgets like borders or texts. Also, container widgets like padding or
centering now show the cursor only if their clients would (thanks,
Hans-Peter Deifel <hpdeifel@gmx.de>)
Package changes:
* Allow building against QuickCheck 2.7 (fixes #21)
1.5.1 -> 1.6
------------
Package changes:
* Added library dependency on "text" package.
* Added tests dependency on "random" package.
* Now the vty-ui-tests binary builds by default and can be turned off
with the 'no-tests' flag.
* Increased the declared cabal version to 1.8.
* Moved the demo sources into demos/ and added vty-ui as dependency
for each. This helps to avoid redundant library compilation for
each demo program.
* Removed some dubious Darwin-specific cabal directives.
API changes:
* Modified all widget constructors and functions to use Text values
where previously they used Strings.
* Renamed List.newStringList to newTextList.
* Added TextClip, a module which implements one- and two-dimensional
text clipping. The implementation respects Unicode character
width.
* Added TextZipper, a module which implements a two-dimensional text
editor in zipper fash ion.
* Added a "Phys" newtype to express physical column values (as
opposed to character indices). This is used in logical-to-physical
conversions and computations which have to take account of
character width.
* Exported Edit.applyEdit for applying generic text zipper
transformations to Edit widgets.
Misc changes:
* Modified FormattedText widgets to take account of Unicode character
widths so that wide characters are rendered properly. Also
modified some widgets to use FormattedText instead of direct Vty
rendering to take advantage of this feature.
* Refactored the Edit widget to use TextZipper and TextClip modules
to properly account for character width. Edit widgets now support
multi-column characters and show beginning-of-line and end-of-line
indicators ("$") in cases where wide characters cannot be shown due
to display clipping.
* Added some QuickCheck properties for TextClip and TextZipper.
Other notes:
* Deprecation notice: Text.Trans.Tokenize will either be removed
entirely or severely refactored in a future release.
Bug fixes:
* Fixed bug in Text.Trans.Tokenize.wrapStream which prevented
over-long words from being wrapped properly, as well as lines where
short words followed over-long ones.
1.5 -> 1.5.1
------------
Bug fixes:
* getEditText widget no longer adds a spurious newline onto the end
of the text it returns
* Text edit widgets now properly report text change events when
killing to end-of-line (i.e. with C-k)
* Edit widgets now correctly set internal state when setting to the
empty string, and reset the cursor position to (0, 0)
* Edit widgets now pad correctly when the line limit and rendering
region size permit it
* Directory browser widgets now add their top-level widget (the value
of dirBrowserWidget) to the focus group instead of the List widget
contained in the browser
1.4 -> 1.5
----------
Package changes:
* Now builds against GHC 7.4.1 (thanks github.com/elliottt); relaxes
dependencies on time (to 1.4), array (to 0.5), and filepath (to
1.4)
* Now depends on vector >= 0.9.
* Added a basic README.
* Added demo programs specific to the ProgressBar and Edit widgets
to fully showcase their functionality.
API changes:
* Moved Alignment-related code from the Table module into its own
module, Graphics.Vty.Widgets.Alignment
* Progress bars can now have a text label and the label can have an
alignment (left, right, or center). Added functions
setProgressText and setProgressTextAlignment. The progress bar
widget type is now 'Widget ProgressBar', instead of 'ProgressBar'
with a record field to access its widget. Lastly, the progress
bar constructor takes Attrs, not Colors, to control the display of
the two halves of the progress bar (its background and a text
label).
* The newWidget implementation constructor now takes the initial
widget state as a parameter to avoid returning WidgetImpl values
with an 'undefined' state.
* Generalized the 'Edit' widget type to support single- and
multi-line editing modes. Added functions getEditCurrentLine,
getEditLineLimit, setEditLineLimit, and multiLineEditWidget. The
'editWidget' behaves as before and creates a single-line edit
widget. Dropped support for limiting the amount of text in a
single-line edit widget, but added the ability to control the
number of lines in a multi-line edit widget. Since it's possible
to get two-dimensional cursor position values for multi-line Edit
widgets as a result of these changes, onCursorMove now provides a
tuple of (row, column) to its handlers.
Bug fixes / improvements:
* Fixed a bug where hFixed and vFixed widgets were adding too much
padding to their child widgets, thus breaking the space guarantees
they were intended to make. As an example, if you wrap a widget
in a vFixed wrapper with ten lines of height, the bug caused
vFixed to sometimes result in widgets that were more than ten
lines in height (and similarly for width/hFixed).
* Fixed a bug where sometimes text widgets didn't apply the right
amount of trailing padding to short text lines, resulting in weird
background attribute rendering issues.
* Added some strictness hints to several modules
* Improved space performance of the List widget by using Vectors to
store the list contents
* newWidget now returns a WidgetImpl with a default (trivial)
render_ implementation.
* Improved the documentation of some functions in Core.
* Greatly simplified and improved the ListDemo program so it is more
useful for learning how to use the List widget.
* The main event loop no longer calls reserve_display on shutdown
(which was just wrong). This leads to a cleaner terminal state
when a vty-ui application exits, since Vty's shutdown function was
already trying to do the right thing.
1.3.1 -> 1.4
------------
API changes:
* The "highlight" text formatter has been moved to a separate
package, vty-ui-extras, so that vty-ui doesn't depend on any
concrete regular expression implementations.
* The "Formatter" type now forms a monoid.
* The "TableRow" type now forms a monoid.
* The fields of the "ColumnSpec" type are now exported.
* The methods of the "RowLike" type class are now exported.
1.3 -> 1.3.1
------------
Bug fixes:
* Now builds on GHC 7.2, due to addition of FlexibleInstances pragma
to Core
Warning fixes:
* DirBrowser now uses Control.Exception.catch
Package fixes:
* Data-Files no longer lists unshipped minted.sty; you'll have to
install Minted yourself
1.2 -> 1.3
----------
API changes:
* Added Graphics.Vty.Widgets.Group module to provide an abstraction
for a collection of widgets with the same role in the interface.
* Added Graphics.Vty.Widgets.Text.setTextFormatter function
* Added Graphics.Vty.Widgets.Text.getTextFormatter function
* Added Graphics.Vty.Widgets.Core.appendFocusGroup function
* Graphics.Vty.Widgets.DirBrowser: name and export the type of the
directory browser's internal widget (DirBrowserWidgetType)
* Added Graphics.Vty.Widgets.Text.setTextAppearFocused function;
change the default behavior of text widgets so that by default,
they do NOT use the focused attribute when focused. The previous
behavior was such that a focused text widget would use the focused
attribute in effect when being rendered, but this doesn't make
sense in all cases. Now there is a specific API for turning that
on, and the default is to supress the behavior. Use cases for
turning it on include cases where a text widget is part of a
larger widget which has a meaningful focused appearance (e.g.,
buttons).
* Added Text.plainTextWithAttrs convenience constructor
Internal changes:
* Default render context now has a somewhat more reasonable default
focus attribute
Manual changes:
* Fixed ordering of sections in Chapter 4
* Added section on the Group module
Bug fixes:
* Default cursor location is hidden for empty widgets, fixes case
where an empty widget showed the cursor and resulted in a
Data.Word crash
* Boxes with fixed-size children now refuse to draw without enough
space
* Bordered widgets now refuse to draw without enough space
* Focus groups can now be empty for interfaces where no widgets need
focus (still, if you want to do this, add key event handlers to
the focus group itself)
* Minted LaTeX style wasn't being included in the sdist.
Package changes:
* Allow dependency on Vty 4.7. NOTE: if you are importing Vty
unqualified, 4.7 now exports a "pad" function which conflicts with
the "pad" function exported by the "All" and "Padding" modules.
* Extend 'unix' dependency range to 2.5
* Add source-repository to the package description
* Depend on Cabal >= 1.6
1.1 -> 1.2
----------
API changes:
* 'highlight' now takes any regular expression that is an instance
of 'RegexLike' and matches Strings. This means we don't depend on
pcre-light any more, but just Text.Regex.Base. One of the demo
programs now depends on the 'regex-pcre' package since pcre-light
didn't provide any instances of RegexLike.
* Text.Trans.Tokenize, the module used to tokenize text and operate
on token streams for the FormattedText widget, is now part of the
public API. This is because anyone wishing to write a Formatter
will need access to its types, and it contains other nifty
functionality.
* The 'Text' type has been removed in favor of types from
Text.Trans.Tokenize.
* Formatters (defined in the Text module) now take TextStreams
(defined in Text.Trans.Tokenize).
* The implementation of the wrapping and truncation logic in
Text.Trans.Tokenize has been greatly simplified thanks to the type
refactoring in that module.
* The implementation of the 'wrap' Formatter has been greatly
simplified thanks to the type refactoring in Text.Trans.Tokenize.
It should also be a bit easier to write Formatters now.
* Text.Trans.Tokenize.truncLine is now called truncateLine.
* Text.Trans.Tokenize.wrapLine is now called wrapStream.
* The test suite for Text.Trans.Tokenize has been bulked up a bit.
* The event loop implementation now uses TChans from STM instead of
Chans from Control.Concurrent; we also depend in 'stm' as a
result.
Manual changes:
* The 'Text' material was updated with information on text widget
update functions.
* The 'Text' material was fixed to document the arguments to
'textWidget' in the correct order.
1.0.1 -> 1.1
------------
API changes:
* Interface change: List: newList no longer takes a widget
constructor; addToList and friends take the widget instead
* Interface change: stop using MonadIO, use IO instead. The real
issue here was that the library was failing to make good on an
attempted promise of sequencing vty-ui actions with an arbitrary
IO-based monad transformer stack, in particular because event
handlers could not be sequenced in the same MonadIO instance as
everything else.
API additions:
* Add shutdownUi signal to stop event loop (fixes issue #3)
* List: add setSelected and getListItem functions
* List: add insertIntoList for arbitrary insertion
Internal changes:
* Box: query child widgets for cursor position info
* List: use at least a one-row-high item height to support emtpy list
items (e.g., empty text widgets)
* List: removeFromList: when the list is focused, manage focus state
of widgets involved
* List: forward key events to currently-selected item; also focus and
unfocus items as selection changes
* Edit: move {remove,inject} to Util
* FormattedText: do not provide cursor positioning info.
Misc:
* Util.mergeAttr: Vty uses bitwise OR to merge styles, but that means
we cannot turn style bits off, so we just replace the style mask
entirely
* cabal file: loosen library dependencies a bit.
* ListDemo: focus the edit widget initially.
1.0 -> 1.0.1
------------
Bug fixes:
List:
* removeFromList now recomputes scrolling window info correctly.
* removeFromList fixes new selected index when pos > sel.
* clearList now sets the selectedIndex correctly.
Core:
* mergeFocusGroups now correctly preserves existing handlers and
establishes new FocusGroup manipulation handlers.
* resetFocusGroup now uses the right index range (was resetting
the focused element to zero, now -1)