Skip to content

Conversation

@alanpoon
Copy link
Contributor

Added offline sync

alanpoon and others added 24 commits March 4, 2025 16:12
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`.
wip

wip (+8 squashed commits)
Squashed commits:
[374885b] wip
[fe92451] wip
[f29bf2e] wip
[29c9993] wip
[b75ce69] wip
[88fd73a] wip
[a391018] wip
[c8e69be] wip

wip

wip

wip

wip

wip

wip

wip

wip

wip
@alanpoon alanpoon closed this May 16, 2025
@alanpoon alanpoon deleted the event_cache#164 branch May 16, 2025 03:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants