Make it easier to build view groups
Open
- Dominant language
- Rust
- Stars
- 4.8k
- Forks
- 270
- Avg merge
- 5d 19h
- Merged PRs (30d)
- 2
Description
Currently, writing a new layout/view group needs a bit of boilerplate/repeated code.
This includes:
* Forwarding events to the active view
* Forwarding `call_on_any` to all views
* Forwarding `focus_view` to all views
* Handling a layout cache
* Exposing a `Vec`-like interface: add/get/remove/...
And with the upcoming `ViewPath` selector, there will be some more copy-pasted code to select the nth child.
Could we reduce the amount of duplicated code? Reduce the barrier to writing view groups correctly? Provide a more unified interface to access views? Does a `ViewGroup` trait make sense?
Contributor guide
Assessment
This issue has not been assessed yet.