-
Notifications
You must be signed in to change notification settings - Fork 25
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
Add Widget::update; use input data #396
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dhardy
force-pushed
the
work1
branch
5 times, most recently
from
July 18, 2023 19:38
de38d10
to
7a7bce3
Compare
We keep the Data: 'static bound on Window, if for no other reason than because EventMgr::add_window requires it.
This leaves a few examples broken for now
Under current limitations, map_fn could only ever return one of its two input parameters anyway.
This was requirement was not compiler enforced due to use of unsafe transmute
The models are no longer used by any other part of Kas
This is now independent of kas-view code.
There are a few issues to be resolved in the following commits
Since the view size is small we can just update all visible children, in-line with the previous commit's new policy.
dhardy
changed the title
Add Adapt, Widget::update; examples/counter and sync-counter use input data
Add Widget::update; use input data
Jul 27, 2023
Design document (belatedly) posted: kas-gui/design#6 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This builds on #395, making use of input data.
Significant changes:
Action::EVENT_CONFIG
,Action::UPDATE
; removeAction::EMPTY
Events::update
,fn EventState::request_update
; call from configure andConfigMgr::update
; remove data fromEvents::configure
; removeEvent::Update
fn ConfigMgr::restrict_recursion_to
Events::handle_message
→Events::handle_messages
Node
/NodeMut
using dyn traits instead ofunsafe
Node::for_child
,for_children
,for_children_try
,for_path
ErasedStack
and ability to send messages via the proxyfn EventState::change_config
and configuration widgetkas::model
tokas-view
; revise data traits,Driver
trait, list filter mechanism; removeSingleView
and reviseListData
andMatrixData
to use input dataAdapt
,Map
,OnUpdate
EditGuard
and implsOverall the "input data" approach remains very performant, provides a more complete and integrated experience to
ListView
/MatrixView
, and allows significantly less boilerplate in many example UIs.There remain a few less-than-ideal items: inability to pass messages to children (e.g. the Gallery's filter list copies both selection mode and filter string to data since this is currently the only provided method of passing data to children); menus possibly need a redesign.