# Version 3.16 #

## guidata Version 3.16.0 ##

✨ New features:

* **Local automatic sliders for numeric `DataSet` items** — `DataSetEditLayout` (and derived group boxes/dialogs) can now opt into adding sliders to editable, bounded numeric items without changing shared `DataItem` declarations or affecting other forms. Enable it with `DataSetEditLayout(..., auto_sliders=True)`; the policy is inherited by nested groups and tabs. Editable items need finite, ordered, representable bounds to receive a slider — integer parity (`even`) and `nonzero` ranges crossing zero are respected, unusable items remain text-only. For floats, a usable positive `step` is reused when practical, otherwise the new `slider_steps` parameter sets the normalized resolution (default 1000). The text field always keeps the exact underlying value, independently of the slider thumb resolution. Use `item.set_prop("display", auto_slider=False)` to exclude a specific item from the policy. An optional `slider_callback(pressed)` reports drag start/end without affecting the existing `change_callback` value-change notifications. `slider=True` on individual items keeps its previous behavior unchanged.

* **`HistogramRangeItem` — histogram-backed interval selection** — added a new `DataItem` that edits two distinct `FloatItem` fields of the same dataset through a single histogram-backed range editor widget. The caller supplies a rendering payload (bin `counts`, a finite ordered `domain`, optional `y_max`, `minimum_width`, `auto_range` and `reset_range` proposals); guidata never inspects source arrays or computes a range on its own. The default `"range"` presentation shows a plain interval selector suitable for generic measurements (durations, thresholds, …); setting `display.presentation` to `"brightness_contrast"` adds brightness/contrast sliders and a linear transfer function overlay for image-oriented use cases. The item is transient: only the two linked numeric fields are persisted (HDF5/JSON/INI), so applications must restore the histogram context after loading before editing is possible. A `display.callback(instance, item, value)` is invoked once per valid edited pair, with both bounds already applied to the working dataset, matching the behavior of other guidata live callbacks. The JSON Schema exporter emits a dedicated `"histogram_range"` kind with `x-guidata-minimum-field`, `x-guidata-maximum-field` and `x-guidata-histogram-presentation` extension keywords so portable renderers can reproduce the same behavior. See the [examples](../examples.rst) and [`HistogramRangeItem` reference](../reference/dataset/dataitems.rst) documentation for a complete, tested duration-selection walkthrough.

🛠 Bug fixes:

* **Empty optional numeric fields rejected in forms** — `IntItem` and `FloatItem` declared with `allow_none=True` accepted `None` when set programmatically, but `check_value` rejected it, so an empty optional field was highlighted as invalid and `DataSetEditLayout.check_all_values()` refused the whole form (e.g. on dialog validation). `check_value` now accepts `None` for optional numeric items, while still validating non-`None` values against their constraints (`min`, `max`, `nonzero`, `even`) and rejecting `None` for required items. Text fields only accept `None` from an empty input: malformed entries (e.g. `abc` in a numeric field) remain invalid instead of being stored as `None`.
