Releases: dmackdev/egui_json_tree
v0.13.0 - Auto reset expanded when `DefaultExpand` changes
What's Changed
- Support automatic reset of expanded arrays/objects when
DefaultExpand
setting changes by @dmackdev in #47 - Update editor demo by @dmackdev in #48
Full Changelog: v0.12.1...v0.13.0
🧳 Migration
By default, JsonTree
now automatically resets expanded arrays and objects when the DefaultExpand
setting changes between frames. You can safely remove any calls to JsonTreeResponse::reset_expanded
that were done when the DefaultExpand
setting changed.
If you wish to opt-out of this behaviour, you can disable it via JsonTree::auto_reset_expanded(false)
when constructing the tree.
v0.12.1 - Fix `DefaultExpand::SearchResultsOrAll` empty string case
What's Changed
Full Changelog: v0.12.0...v0.12.1
v0.12.0 - Update to egui 0.32
What's Changed
- update egui to 0.32 by @dmackdev in #45
- add DefaultExpand::SearchResultsOrAll variant by @solarsail in #44
New Contributors
- @solarsail made their first contribution in #44
Full Changelog: v0.11.0...v0.12.0
🧳 Migration
- Update MSRV to 1.85.
v0.11.0 - Update to egui 0.31
v0.10.0 - Text Wrapping Options
What's Changed
Full Changelog: v0.9.0...v0.10.0
⭐ Added
- Adds support for configuring wrapping options for primitive values rendered in the
JsonTree
.JsonTreeStyle
can be configured with a newJsonTreeWrappingConfig
to control the wrapping for primitive values in various scenarios and visual states. This can also be used to truncate long text within the visualisation.
See new "Wrapping" demo:
https://github.com/user-attachments/assets/72d48162-403e-468b-8146-e135ba0dc5c4
v0.9.0
What's Changed
- Refactor JSON path ID tracking to reduce allocations by @dmackdev in #35
- Expose collapsing state in render hook by @dmackdev in #36
- update egui to 0.30 by @dmackdev in #40
Full Changelog: v0.8.0...v0.9.0
⭐ Added
- Exposes
CollapsingState
on property and expandable delimiterRenderContext
structs so the render hook can mutate or inspect the expanded state of arrays/objects. See this in action in the JSON Editor UI demo - when new element is added to a collapsed array/object, it expands automatically.
v0.8.0
What's Changed
- add web target for demo and deploy to gh pages by @dmackdev in #26
- Automatic dark/light theming by @dmackdev in #30
- Make sidebar collapsible for demo by @dmackdev in #31
- Refactor
JsonTreeStyle
by @dmackdev in #34
Full Changelog: v0.7.1...v0.8.0
🧳 Migration
- Colour fields have been moved within
JsonTreeStyle
into aOption<JsonTreeVisuals>
field. abbreviate_root
andtoggle_buttons_state
fields have been moved intoJsonTreeStyle
. There are no longer corresponding builder methods onJsonTree
.- Set the
JsonTreeStyle::visuals
field to use a desired colour scheme. Otherwise a default dark or light theme will be used based on theegui::Visuals::dark_mode
field.
⭐ Added
- Builder methods to
JsonTreeStyle
for more fluent construction.
v0.7.1 - Toggle Button Customisation
What's Changed
New Feature: Toggle Button Customisation
Adds support to control visibility/interactivity of toggle buttons via 3 states: visible and enabled, visible and disabled, and hidden.
Configure the JsonTree
via the new builder method toggle_buttons_state
as follows:
JsonTree::new("id", &value)
.toggle_buttons_state(ToggleButtonsState::VisibleDisabled)
.show(ui);
Screen.Recording.2024-10-05.at.15.45.20.mov
Full Changelog: v0.7.0...v0.7.1
v0.7.0 - Update to `egui` 0.29
v0.6.0 - New render hook for improved rendering customisation
✨ Highlights
- New
JsonTree::on_render
andJsonTree::on_render_if
hooks provide more granular rendering customisation of the tree via a user-defined closure. This also provides access to the actual JSON value involved in the render event, in its original type as passed to theJsonTree
constructor. - Added new JSON Editor UI demo to exemplify
JsonTree::on_render
usage.
Screen.Recording.2024-06-22.at.19.43.19.mov
🧳 Migration
- Update
egui
to0.28
. - Update MSRV to
1.76
. - Replace
JsonTree::response_callback
withJsonTree::on_render
. See Copy to Clipboard demo for updated code.
⭐ Added
- Add
JsonPointerSegment
enum for array indices/object keys. - Add
JsonPointer
for JSON pointer utilities.