diff --git a/ChangeLog.md b/ChangeLog.md index 698fc81..25ca83a 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,8 +1,53 @@ # Revision history for reflex-vty -## Unreleased +## 0.2.0.0 * Remove text-icu dependency and switch to `wcwidth` from vty package to compute character width in `Data.Text.Zipper`. * `goToDisplayLinePosition` in `Data.Text.Zipper` correctly accounts for character width now. +* [#37](https://github.com/reflex-frp/reflex-vty/issues/37) `Layout` should support focus changes through nested layouts (thanks @pdlla for getting this started). +* _Breaking Change_: Layout and focus have been substantially refactored: + * Added `MonadFocus` to produce focusable elements, and manage focus state. See the "Focus" section of the Reflex.Vty.Widget.Layout module documentation. + * `Layout` no longer has any focus-tracking responsibility. See the "Layout" section of the Reflex.Vty.Widget.Layout module documentation. + * `tile` no longer takes a configuration record and no longer requires that its child widget return a focus request event. Focus requests are instead handled using calls to `requestFocus` in the child widget. + * Calls to `fixed` and `stretch` must now be replaced with `tile . fixed` and `tile . stretch` + * `stretch` now takes a minimum size argument + * Added `flex` which is equivalent to `stretch 0` + * `tabNavigation` no longer returns an `Event`. Instead it calls `requestFocus` directly with the appropriate `Refocus_Shift` value. + * Added `axis` (in `MonadLayout`), a lower-level primitive which is used to implement `row` and `col`. + * Added `region` (in `MonadLayout`), which is used to claim screen real estate and used to implement `tile` and `grout` + * Added `grout`, a container element that is not itself focusable (though its children can be) +* Add `HasVtyWidgetCtx` for `pane`-like sub-widget container behavior +* Add default instances for `HasVtyInput`, `HasFocus`, and `ImageWriter` +* _Breaking Change_: Remove `DynRegion` and `currentRegion`. Use `Dynamic t Region` and `current` instead. This also changes the type of `pane`'s argument. +* _Breaking Change_: The following functions are no longer specialized to `VtyWidget`: + * `pane`: Now requires `HasVtyWidgetCtx` instead + * `drag`: Now requires `HasVtyInput` instead + * `mouseDown`: Now requires `HasVtyInput` instead + * `mouseUp`: Now requires `HasVtyInput` instead + * `mouseScroll`: Now requires `HasVtyInput` instead + * `key`: Now requires `HasVtyInput` instead + * `keys`: Now requires `HasVtyInput` instead + * `keyCombo`: Now requires `HasVtyInput` instead + * `keyCombos`: Now requires `HasVtyInput` instead + * `splitV`: Now requires `HasVtyWidgetCtx` and `HasDisplaySize` instead + * `splitH`: Now requires `HasVtyWidgetCtx` and `HasDisplaySize` instead + * `splitVDrag`: Now requires `HasVtyWidgetCtx`, `HasVtyInput`, and `HasDisplaySize` instead + * `fill`: Now requires `ImageWriter` and `HasDisplaySize` instead + * `boxTitle`: Now requires `HasVtyWidgetCtx`, `ImageWriter`, and `HasDisplaySize` instead + * `box`: Now requires `HasVtyWidgetCtx`, `ImageWriter`, and `HasDisplaySize` instead + * `boxStatic`: Now requires `HasVtyWidgetCtx`, `ImageWriter`, and `HasDisplaySize` instead + * `richText`: Now requires `ImageWriter`, and `HasDisplaySize` instead + * `scrollableText`: Now requires `HasVtyInput`, `ImageWriter`, and `HasDisplaySize` instead + * `blank`: Now required `Monad` instead + * `button`: Now requires `HasFocus`, `HasVtyWidgetCtx`, `HasVtyInput`, `ImageWriter`, and `HasDisplaySize` instead + * `textButton`: Now requires `HasFocus`, `HasVtyWidgetCtx`, `HasVtyInput`, `ImageWriter`, and `HasDisplaySize` instead + * `textButtonStatic`: Now requires `HasFocus`, `HasVtyWidgetCtx`, `HasVtyInput`, `ImageWriter`, and `HasDisplaySize` instead + * `link`: Now requires `HasVtyInput`, `ImageWriter`, and `HasDisplaySize` instead + * `checkbox`: Now requires `HasFocus`, `HasVtyInput`, `ImageWriter`, and `HasDisplaySize` instead + * `textInput`: Now requires `HasFocus`, `HasVtyInput`, `ImageWriter`, and `HasDisplaySize` instead + * `multilineTextInput`: Now requires `HasFocus`, `HasVtyInput`, `ImageWriter`, and `HasDisplaySize` instead + * `textInputTile`: Now requires `HasVtyWidgetCtx`, `HasVtyInput`, `MonadLayout`, and `MonadFocus` instead +* _Breaking Change_: `CheckboxConfig` now has a field taking an `Event` to set the value of the checkbox. +* _Breaking Change_: `checkbox` now accepts keyboard input (spacebar to check and uncheck) and is displayed in bold when focused. ## 0.1.4.1 * Migrate to new dependent-sum / dependent-map (after the "some" package split) diff --git a/reflex-vty.cabal b/reflex-vty.cabal index 04961d9..ce87325 100644 --- a/reflex-vty.cabal +++ b/reflex-vty.cabal @@ -1,5 +1,5 @@ name: reflex-vty -version: 0.1.4.1 +version: 0.2.0.0 synopsis: Reflex FRP host and widgets for VTY applications description: Build terminal applications using functional reactive programming (FRP) with Reflex FRP ().