-
Notifications
You must be signed in to change notification settings - Fork 41
Event cache#164 #442
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
Closed
Closed
Event cache#164 #442
Conversation
This file contains hidden or 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
This removes unnecessary redraws of the parent view stack too.
Previously, the `BackPressed` event in Makepad wasn't handled correctly, and could not be properly represented via the `hits()` API. Now, we have modified it in Makepad to include an internal `handled` boolean which is set to `true` once a widget has handled that event, ensuring that multiple widgets can't respond to a single `Backpressed`. We also fixed the StackNavigation widget to ensure that it will only respond to a `BackPressed` event if no other child widget had already handled it previously. Together, this fixes the issue where a UserProfileSlidingPane would be hidden *AND* the StackNavigation widget would return to the root RoomsList view upon a *single* `BackPressed` event. Now, it takes two separate `BackPressed` events for that to happen, which matches the user's expectations.
The general idea is to let child widgets handle a given event before their parent widget handles it. If a given child widget handles that event, the parent widget won't handle it duplicately. However, if no child widgets handle it, then the event will be able to be handled by the parent widget. Now, a child widget can handle an event and then mark it as not-handled, meaning that another widget will *also* be able to handle it. Note that this Makepad change still preserves the historical behavior of an event being marked as handled by default upon *any* call to `event.hits()`, so if you want to override that behavior, you have to explicitly call `EventHandled::mark_as_handled(false)` for that specific `Hit` variant. This also removes the our use on the previous callback-based implementation of `hits_without_mark_as_handled()`, which was a lot harder to use and less flexible. See makepad/makepad#673 for more details.
Due to a minor display bug in CalloutTooltip, we need to ensure that all emitted tooltip actions are also triggered on `FingerHoverIn` *and* `FingerHoverOver`, even though it ideally should not be necessary to re-trigger redundant tooltip actions on a simple `FingerHoverOver`.
45f4355 to
0c13d27
Compare
1 task
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.
Added offline sync