rfcs icon indicating copy to clipboard operation
rfcs copied to clipboard

UI Central Dogma and A High-Level Compositional Design

Open alice-i-cecile opened this issue 4 years ago • 3 comments

RENDERED

This meta-RFC lays out a vision for work to be done to achieve a complete solution for bevy_ui. By breaking the problem down into a central dataflow and many competing UI-like behaviors, we can create a modular design that can be designed, implemented and replaced in smaller chunks and reused in flexible ways for designs that straddle gameplay and "classical UI".

This is intended to be an extremely collaborative process: please comment and make pull requests aggressively.

This RFC contains several benchmark paper prototypes, intended to be designed and completed by community members to share their visions of what an ideal UI looks like. Feel free to submit yours in the appropriate section (in a collapsible section) regardless of how many you've completed or the status of your prototypes / RFCs.

P.S. This RFC uses the proposed lightly tweaked template from #21 to improve clarity <3

alice-i-cecile avatar Apr 26 '21 23:04 alice-i-cecile

Here's a little sketch of something redux/FRP like implemented with traits: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=c68897abd01df00dc38a6c9153052adb

B-Reif avatar Apr 27 '21 19:04 B-Reif

To expand on "external tools":

Data-driven ... How do we interface with external tools, if at all?

A few developer tools to consider:

  • An inspection tool, like a browser's dev tools or the React devtools, can help for inspecting the current state
  • A changelog, like the Redux devtools, can help for inspecting app state and action history
  • A "headless" mode can help for testing without rendering

It's worth considering these kinds of tools when designing the API. For instance, these kinds of tools usually benefit from serializable state.

B-Reif avatar Apr 28 '21 01:04 B-Reif

Two more examples I'd like to add:

  1. A sudoku grid: lots of subtle complexity there. Was completely infeasible under the current UI; see: https://github.com/bevyengine/bevy/discussions/2235.
  2. A dynamically generated flow-chart. Very very useful for our editor.

alice-i-cecile avatar May 24 '21 00:05 alice-i-cecile