gyscos / gyscos/cursive

Make it easier to build view groups

Open
#419 0 comments 4 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.