cushy/CHANGELOG.md
Jonathan Johnson 4c9e2d5989
Dynamic::compare_swap + Validations now block
This sounds like a regression, but it was masking a "race condition".
DynamicGuard runs the change callbacks on drop in a background thread.
Validations was using the guard to not have to lock twice.

This led to an issue where the invalid count might be non-zero due to
the callbacks not being invoked, preventing the closure from being
invoked even though there are no validation errors.

Introducing compare_swap gives a higher-level API for Validations to
use, and it also ensures the callbacks are able to be run in the current
thread.
2023-12-21 09:12:24 -08:00

77 lines
2.7 KiB
Markdown

# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## Unreleased
### Breaking Changes
- Many bounds required `UnwindSafe` due to a misunderstanding on how to handle
this trait in `appit`. All requirements for `UnwindSafe` have been removed.
### Changed
- [#92][92]: When a Window is resizable and the root widget's `layout()`
function returns a size larger than the window's inner size, the window will
no longer be resized to fit. The content will be forced to render in the given
space, which may result in clipping.
Using a `Resize` widget in the root hierarchy allows setting minimum width and
heights for the content.
[92]: https://github.com/khonsulabs/gooey/issues/92
### Added
- `Validations::validate_result` attaches a `Dynamic<Result<T,E>>` to the
validations. This was already available on `when` conditioned validations.
- `Dynamic::[try_]compare_swap` allows swapping the contents of a dynamic after
verifying the current contents.
## v0.1.3 (2023-12-19)
### Added
- [#94][94]`Window::inner_size` allows setting a dynamic that will be
synchronized with the window's inner size. When the dynamic is set to a new
value, a resize request will be sent to the operating system. When the
window's size is changed by the operating system, this dynamic will be updated
with the new value.
This dynamic is also accessible through `RunningWindow::inner_size`, which is
accessible through contexts passed into various `Widget` functions.
- `Progress` now implements `Default` by returning `Progress::Indeterminant`.
- `WeakDynamic<T>` now implements `Debug` when `T` is `Debug`.
### Fixed
- [#97][97]: `Dynamic` callback invocations could be missed for a value when
multiple threads were updating values at the same time. Now it is
guaranteed that each callback will observe the latest value at least once.
Cycles on the same thread are still detected and logged to prevent infinite
loops from callback chain cycles.
- An integer underflow has been fixed in the Grid/Stack widgets.
- Padding is now rounded to the nearest whole pixel when applied across widgets.
[94]: https://github.com/khonsulabs/gooey/pull/94
[97]: https://github.com/khonsulabs/gooey/issues/97
## v0.1.2 (2023-12-18)
### Fixed
- Gooey now compiles for Windows. An indirect dependency, `appit`, also needs to
be updated to v0.1.1. Running `cargo update` should be enough to update
`appit`.
## v0.1.1 (2023-12-18)
This release only contains fixed links in the README. No code was changed.
## v0.1.0 (2023-12-18)
This is the initial alpha release of Gooey.