-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ECS #432
Conversation
For what I care about this looks great to me. Removes the boilerplate for view creation and no longer has duplicated locations for events/styles. 👍 |
Some exciting updates.
(
"some button",
(
().style(|s| s.width(100).height(20).background(Color::GRAY),
"another button".style(|s| s.color(Color::RED)),
)
).style(|s| s.flex_col()) |
I definite like Into view for stacks. I'm on the fence though whether we should implement it for the empty tuple and I feel like I'd be fine with it though / maybe would come to love it |
Yeah I'm a bit worried about fn your_view() -> impl IntoView {
(
"some button",
(
().style(|s| s.width(100).height(20).background(Color::GRAY),
"another button".style(|s| s.color(Color::RED)),
)
).style(|s| s.flex_col());
} This compiles, but then you would be surprised why it doesn't show anything. |
Added Simplified |
This PR adds
VIEW_STORAGE
which stores all theView
,ViewState
, parent/child relationship between views, andTaffyTree
. The benefits:ViewData
any more.ViewData
was introduced so that it can store the initialStyle
,EventListener
without go through theUpdateMessages
. Now we have "direct" access toViewState
so this is not needed.UpdateMessages
update_state
doesn't need to go through the view tree by id_path dispatch, since we have "direct" access toView
AppState