|
1 | 1 | # Nutmeg Changelog |
2 | 2 |
|
| 3 | +## 0.1.4 |
| 4 | + |
| 5 | +- New: Support and documentation for sending `tracing` updates through a Nutmeg view. |
| 6 | + |
3 | 7 | ## 0.1.3 |
4 | 8 |
|
5 | 9 | Released 2023-05-24 |
6 | 10 |
|
7 | | -* New: [View::clear] temporarily removes the progress view if it is drawn, but |
| 11 | +- New: [View::clear] temporarily removes the progress view if it is drawn, but |
8 | 12 | allows it to pop back when the model is next updated. |
9 | 13 |
|
10 | | -* New: [Options] can be constructed as a `static` value: there's a new |
| 14 | +- New: [Options] can be constructed as a `static` value: there's a new |
11 | 15 | `const fn` [Options::new] constructor and the functions to set fields are also |
12 | 16 | `const`. |
13 | 17 |
|
14 | | -* New: [View::message_bytes] as a convenience for callers who already have |
| 18 | +- New: [View::message_bytes] as a convenience for callers who already have |
15 | 19 | a `[u8]` or `Bytes` or similar. |
16 | 20 |
|
17 | 21 | ## 0.1.2 |
18 | 22 |
|
19 | 23 | Released 2022-07-27 |
20 | 24 |
|
21 | | -* API change: Removed `View::new_stderr` and `View::write_to`. Instead, the view |
| 25 | +- API change: Removed `View::new_stderr` and `View::write_to`. Instead, the view |
22 | 26 | can be drawn on stderr or output can be captured using [Options::destination]. |
23 | 27 | This is better aligned with the idea that programs might have a central function |
24 | 28 | that constructs a [Options], as they will probably want to consistently |
25 | 29 | write to either stdout or stderr. |
26 | 30 |
|
27 | | -* New: Output can be captured for inspection in tests using [Options::destination], |
| 31 | +- New: Output can be captured for inspection in tests using [Options::destination], |
28 | 32 | [Destination::Capture], and [View::captured_output]. |
29 | 33 |
|
30 | | -* Improved: Nutmeg avoids redrawing if the model renders identical output to what |
| 34 | +- Improved: Nutmeg avoids redrawing if the model renders identical output to what |
31 | 35 | is already displayed, to avoid flicker. |
32 | 36 |
|
33 | 37 | ## 0.1.1 |
34 | 38 |
|
35 | 39 | Released 2022-03-22 |
36 | 40 |
|
37 | | -* API change: [View::message] takes the message as an `AsRef<str>`, meaning |
| 41 | +- API change: [View::message] takes the message as an `AsRef<str>`, meaning |
38 | 42 | it may be either a `&str` or `String`. This makes the common case where |
39 | 43 | the message is the result of `format!` a little easier. |
40 | 44 |
|
41 | 45 | ## 0.1.0 |
42 | 46 |
|
43 | 47 | Released 2022-03-22 |
44 | 48 |
|
45 | | -* API change: The "Write" type representing the destination is no longer |
| 49 | +- API change: The "Write" type representing the destination is no longer |
46 | 50 | part of the visible public signature of [View], to hide complexity and |
47 | 51 | since it is not helpful to most callers. |
48 | 52 |
|
49 | | -* API change: Renamed `View::to_stderr` to `View::new_stderr`. |
| 53 | +- API change: Renamed `View::to_stderr` to `View::new_stderr`. |
50 | 54 |
|
51 | | -* New: [percent_done] and [estimate_remaining] functions to help in rendering progress bars. |
| 55 | +- New: [percent_done] and [estimate_remaining] functions to help in rendering progress bars. |
52 | 56 |
|
53 | | -* New: The [models] mod provides some generally-useful basic models, |
| 57 | +- New: The [models] mod provides some generally-useful basic models, |
54 | 58 | specifically [models::StringPair], [models::UnboundedModel] and [models::LinearModel]. |
55 | 59 | These build only on the public interface of Nutmeg, so also constitute examples of what can be done in |
56 | 60 | application-defined models. |
57 | 61 |
|
58 | | -* New: [View::finish] removes the progress bar (if painted) and returns the [Model]. |
| 62 | +- New: [View::finish] removes the progress bar (if painted) and returns the [Model]. |
59 | 63 | [View::abandon] now also returns the model. |
60 | 64 |
|
61 | | -* New: [Model::final_message] to let the model render a message to be printed when work |
| 65 | +- New: [Model::final_message] to let the model render a message to be printed when work |
62 | 66 | is complete. |
63 | 67 |
|
64 | | -* New: The callback to [View::update] may return a value, and this is passed back to the caller |
| 68 | +- New: The callback to [View::update] may return a value, and this is passed back to the caller |
65 | 69 | of [View::update]. |
66 | 70 |
|
67 | | -* New: [models::BasicModel] allows simple cases to supply both an initial value |
| 71 | +- New: [models::BasicModel] allows simple cases to supply both an initial value |
68 | 72 | and a render function inline in the [View] constructor call, avoiding any |
69 | 73 | need to define a [Model] struct. |
70 | 74 |
|
71 | | -* New: [View::inspect_model] gives its callback a `&mut` to the model. |
| 75 | +- New: [View::inspect_model] gives its callback a `&mut` to the model. |
72 | 76 |
|
73 | | -* New: Progress bars constructed by [View::new] and `View::new_stderr` are disabled when |
| 77 | +- New: Progress bars constructed by [View::new] and `View::new_stderr` are disabled when |
74 | 78 | `$TERM=dumb`. |
75 | 79 |
|
76 | 80 | ## 0.0.2 |
77 | 81 |
|
78 | 82 | Released 2022-03-07 |
79 | 83 |
|
80 | | -* API change: Renamed `nutmeg::ViewOptions` to just `nutmeg::Options`. |
| 84 | +- API change: Renamed `nutmeg::ViewOptions` to just `nutmeg::Options`. |
81 | 85 |
|
82 | | -* Fixed: A bug that caused leftover text when multi-line bars shrink in width. |
| 86 | +- Fixed: A bug that caused leftover text when multi-line bars shrink in width. |
83 | 87 |
|
84 | | -* Fixed: The output from bars created with [View::new] and `View::to_stderr` in |
| 88 | +- Fixed: The output from bars created with [View::new] and `View::to_stderr` in |
85 | 89 | Rust tests is captured with the test output rather than leaking through |
86 | 90 | to cargo's output. |
87 | 91 |
|
88 | | -* New method [View::message] to print a message to the terminal, as an alternative |
| 92 | +- New method [View::message] to print a message to the terminal, as an alternative |
89 | 93 | to using `write!()`. |
90 | 94 |
|
91 | | -* New `example/multithreaded.rs` showing how a View and Model can be shared |
| 95 | +- New `example/multithreaded.rs` showing how a View and Model can be shared |
92 | 96 | across threads. |
93 | 97 |
|
94 | 98 | ## 0.0.1 |
95 | 99 |
|
96 | | -* Rate-limit updates to the terminal, controlled by |
| 100 | +- Rate-limit updates to the terminal, controlled by |
97 | 101 | `ViewOptions::update_interval` and `ViewOptions::print_holdoff`. |
98 | 102 |
|
99 | | -* Fix a bug where the bar was sometimes not correctly erased |
| 103 | +- Fix a bug where the bar was sometimes not correctly erased |
100 | 104 | by [View::suspend]. |
101 | 105 |
|
102 | | -* Change to [`parking_lot`](https://docs.rs/parking_lot) mutexes in the implementation. |
| 106 | +- Change to [`parking_lot`](https://docs.rs/parking_lot) mutexes in the implementation. |
103 | 107 |
|
104 | 108 | ## 0.0.0 |
105 | 109 |
|
106 | | -* The application has complete control of styling, including coloring etc. |
107 | | -* Draw and erase progress bars. |
108 | | -* Write messages "under" the progress bar with `writeln!(view, ...)`. The |
| 110 | +- The application has complete control of styling, including coloring etc. |
| 111 | +- Draw and erase progress bars. |
| 112 | +- Write messages "under" the progress bar with `writeln!(view, ...)`. The |
109 | 113 | bar is automatically suspended and restored. If the message has no final |
110 | 114 | newline, the bar remains suspended until the line is completed. |
0 commit comments