Commit Graph

165 Commits

Author SHA1 Message Date
EdJoPaTo
9dcccba31d refactor: improve lifetime names 2024-05-15 13:51:54 +02:00
EdJoPaTo
04ecf5388f docs(state): improve comments 2024-05-15 13:51:54 +02:00
EdJoPaTo
a20134bdcd feat(example): debounce, top right corner performance info and update on resize 2024-05-15 13:51:54 +02:00
EdJoPaTo
65fd1c04ed refactor!: reuse text style of tree item
BREAKING CHANGE: TreeItem style is gone
2024-05-15 13:51:54 +02:00
EdJoPaTo
775e5cc4ef refactor(TreeItem): simplify with Self 2024-05-15 13:51:54 +02:00
EdJoPaTo
202e8d874c style: split import groups correctly 2024-05-15 13:51:54 +02:00
EdJoPaTo
be05a341f4 test: basic tests to ensure render doesnt panic
should use buffer assertions in the future but this is a start
2024-05-15 13:51:54 +02:00
EdJoPaTo
e9656f82d1 test(flatten): ensure depth works 2024-05-15 13:51:54 +02:00
EdJoPaTo
537dc8021e perf(flatten): fewer clones 2024-05-15 13:49:50 +02:00
EdJoPaTo
fdd2c5436a feat!: cache last tree structure to simplify events
Things like key up/down dont require the items anymore to be used.
Instead a cached last state from last render is used.
2024-05-15 12:49:37 +02:00
EdJoPaTo
701be9315d test(bench): add benchmark 2024-05-15 12:49:37 +02:00
EdJoPaTo
37ade72330 refactor(item): use keyword Self 2024-05-15 12:49:37 +02:00
EdJoPaTo
68d19b0a58 ci(rust): improve workflow 2024-05-15 12:49:37 +02:00
EdJoPaTo
d7415f40c7 build(cargo): specify lints in Cargo.toml 2024-03-15 03:17:52 +01:00
EdJoPaTo
a60eb5266b refactor: simplify docs and LSP hints with names exactly as exported 2024-03-14 11:55:10 +01:00
EdJoPaTo
d5f3635613 build: v0.19.0 2024-02-26 21:12:44 +01:00
EdJoPaTo
a2f8100fe7 refactor!: remove get_identifier_without_leaf
remove as its no longer used either internally or in mqttui for some time.
Either its quickly implemented yourself or `Vec::pop()` does the job better.
2024-02-26 20:49:21 +01:00
EdJoPaTo
ed9a54a55a feat(state)!: return true when something changed 2024-02-26 19:09:57 +01:00
EdJoPaTo
0a5c7d6cfb refactor(example): move draw to App::draw 2024-02-26 18:09:26 +01:00
EdJoPaTo
15f05be46c fix: do not move offset on unselect 2024-02-26 18:05:17 +01:00
EdJoPaTo
d3386fe016 build: v0.18.0 2024-02-24 18:39:38 +01:00
EdJoPaTo
83dd95b87f fix(scrollbar): calculate area margin from inside and outside of border areas 2024-02-24 18:39:34 +01:00
EdJoPaTo
9a0b26f5c9 refactor(scrollbar): use variable names over unnamed pair content 2024-02-24 11:21:48 +01:00
EdJoPaTo
49bfa7e5f0 refactor(example): restructure import / use 2024-02-24 11:18:09 +01:00
EdJoPaTo
b31a599a37 refactor(scrollbar): experimental prefix over feature
A feature flag has quite some complexity with it and is annyoing.
Write a rustdoc comment about it and be clear about it being experimental and include it as is.
2024-02-24 11:08:30 +01:00
EdJoPaTo
98b53e448f fix(scrollbar): workaround overscroll 2024-02-24 03:09:58 +01:00
EdJoPaTo
ce3b2b530e fix(scrollbar): change margin to individual start/end 2024-02-24 03:09:58 +01:00
EdJoPaTo
86458ffc39 perf: prefer into_iter() over clone() 2024-02-24 03:09:58 +01:00
EdJoPaTo
4130a800b8 perf: get item.height() less often on render 2024-02-24 03:09:58 +01:00
EdJoPaTo
2781a2d146 refactor: deconstruct Flattened for more speakable variables 2024-02-24 03:09:58 +01:00
EdJoPaTo
4e00f07c74 fix(scrollbar): use current height rather than available height
with item height = 1 its the same but with height != 1 its not
2024-02-24 00:04:39 +01:00
EdJoPaTo
85bfecc568 fix!: remove start_corner
While is somewhat works its not used and doesnt seem that useful
2024-02-23 23:51:37 +01:00
EdJoPaTo
9e93b3ecd1 fixup! feat: support for a scrollbar 2024-02-23 23:42:41 +01:00
EdJoPaTo
355d18bf41 ci: add workflow_dispatch for manual trigger 2024-02-23 23:29:28 +01:00
EdJoPaTo
ed9d91f58c fix(example): show state in bottom title 2024-02-22 19:41:23 +01:00
EdJoPaTo
8806c105ec docs(readme): link to ratatui and mention use case of mqttui 2024-02-22 19:32:23 +01:00
EdJoPaTo
92466615b1 feat: support for a scrollbar 2024-02-22 19:20:27 +01:00
EdJoPaTo
27cf513eeb feat(example): add more items
longer tree to play with
2024-02-22 19:05:31 +01:00
EdJoPaTo
ec359d513b refactor: use multi character variable name 2024-02-22 18:38:52 +01:00
EdJoPaTo
5d750b13b0 build(lint): warn on clippy::pedantic or clippy::nursery 2024-02-22 18:32:46 +01:00
EdJoPaTo
766d4f1d58 refactor: one struct per file 2024-02-22 18:32:35 +01:00
EdJoPaTo
3cafeaef0a ci: update actions 2024-02-03 03:26:49 +01:00
EdJoPaTo
5104ec582e build: v0.17.0 2024-02-03 03:16:45 +01:00
EdJoPaTo
01726df5ed feat: scroll independently from selection 2024-02-03 02:24:44 +01:00
EdJoPaTo
14b9e42cb2 refactor(example): merge into single file 2024-02-03 02:15:36 +01:00
EdJoPaTo
4cbe932332 build: update to ratatui 0.26 2024-02-03 01:05:47 +01:00
EdJoPaTo
969b78ab06 feat: select_*() returns whether it changed 2024-01-26 05:24:17 +01:00
EdJoPaTo
632a95f853 perf(key_left): remove clones
Selection access is mutable already. Operate on it directly.
2024-01-26 05:22:20 +01:00
EdJoPaTo
d1a241266f perf!: flatten -> TreeState::flatten
This allows to use internals without cloning

BREAKING CHANGE: flatten is not directly available anymore
2024-01-15 15:50:06 +01:00
EdJoPaTo
4545b9039b build: v0.16 for ratatui v0.25 2023-12-18 14:45:53 +01:00