/
CHANGELOG
233 lines (203 loc) · 9.62 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
1.5 -> 1.5.1
------------
Bug fixes:
* getEditText widget no longer adds a spurious newline onto the end
of the text it returns
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)