Introduced PreRender trait as a replacement for ListableWidget.
This change is non-breaking
It provides a more concise and clearer interface.
Migration Guide
Update trait implementations to use the new pre_render signature:
fn pre_render(&mut self, context: &PreRenderContext) -> u16 {
let main_axis_size = // The widgets size in the main axis
if context.is_selected {
self = // You can modify the selected item here
}
main_axis_size
}
Deprecated ListState::selected(). Use the struct field selected instead.
Updated examples
Add example for long lists
v0.8.3
Fix: Missing base style on truncated items
v0.8.2
Truncate last element correctly
Add tests
v0.8.1
Remove truncate paramter
v0.8.0
Add support for horizontal scroll
Breaking Change
The ListableWidgets trait method main_axis_size() was renamed to size with an additional scroll_direction parameter. This parameter can be ignored if the ListItem is only used in vertical or horizontal scroll mode, and not in both.
v0.7.2
Deprecate Listable trait in favor of ListableWidget
Migration: height() becomes main_axis_size()
Listable got deprectated, but old apps still compile
ListableWidget is more descriptive and using main_axis_size allows for reusing the trait in horizontal lists, which will come in the future
Introduced PreRender trait as a replacement for ListableWidget.
This change is non-breaking
It provides a more concise and clearer interface.
Migration Guide
Update trait implementations to use the new pre_render signature:
fn pre_render(&mut self, context: &PreRenderContext) -> u16 {
let main_axis_size = // The widgets size in the main axis
if context.is_selected {
self = // You can modify the selected item here
}
main_axis_size
}
Deprecated ListState::selected(). Use the struct field selected instead.
Updated examples
Add example for long lists
0.8.3 - 1 May 2024
Fix: Missing base style on truncated items
0.8.2 - 29 February 2024
Truncate last element correctly
Add tests
0.8.1 - 24 February 2024
Add support for horizontal scroll
Remove truncate option
Breaking Change
The ListableWidgets trait method main_axis_size() was renamed to
size with an additional scroll_direction parameter. This parameter
can be ignored if the ListItem is only used in vertical or horizontal
scroll mode, and not in both.
0.7.2 - 14 February 2024
Deprecate Listable trait in favor of ListableWidget
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps tui-widget-list from 0.7.1 to 0.10.0.
Release notes
Sourced from tui-widget-list's releases.
Changelog
Sourced from tui-widget-list's changelog.
... (truncated)
Commits
009b976
Bump ratatui to v0.27de6a8e2
Release v0.9ff82747
Merge pull request #16 from preiter93/v0.9eea2f1e
Add example for long lists6203672
Minimize calls to prerender1eb062c
Simplify update viewport methodadb2024
Simplify exampled1b6146
Add license6300695
Add doc to readme756a2ef
Add testsDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show