Skip to content

feat(flyout): Implement FlyoutBase.OverlayInputPassThroughElement - #12853

Closed
ramezgerges wants to merge 3 commits into
unoplatform:masterfrom
ramezgerges:flyout_passthrough
Closed

ramezgerges wants to merge 3 commits into
unoplatform:masterfrom
ramezgerges:flyout_passthrough

Conversation

@ramezgerges

@ramezgerges ramezgerges commented Jul 10, 2023 •

Copy link
Copy Markdown
Contributor

GitHub Issue (If applicable): closes #12681

PR Type

What kind of change does this PR introduce?

What is the current behavior?

What is the new behavior?

Copilot Summary

🤖 Generated by Copilot at 4096839

This pull request adds a new feature to the Flyout control that allows it to ignore pointer input on a specified element. It also improves the pointer input handling for Flyout controls and makes some methods more accessible and flexible for reuse. It affects the files FlyoutBase.cs, FlyoutPopupPanel.cs, PopupPanel.cs, VisualTreeHelper.cs, and UITests.Shared.projitems.

PR Checklist

Please check if your PR fulfills the following requirements:

Other information

Internal Issue (If applicable):

@github-actions github-actions Bot added the area/automation Categorizes an issue or PR as relevant to project automation label Jul 10, 2023
// Skipping already declared property AllowFocusOnInteraction
// Skipping already declared property Target
#if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || false || __NETSTD_REFERENCE__ || __MACOS__

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm trying stuff out on skia for now.

new PointerEventArgs(args.GetCurrentPoint(null), args.KeyModifiers),
args.OriginalSource as UIElement);

elementToBeHit.OnPointerDown(eventArgs);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if this will exactly match the behaviour on Windows. I haven't tested this yet, but I'm not sure of the order of events in the case of having event handlers with HandledEventsToo. Should the first event completely propagate to the top and only then trigger the new event, or should the new event be triggered within the first event propagation cycle (like I've done here)?

while (child.MoveNext())
{
var childResult = SearchDownForTopMostElementAt(posRelToElement, child.Current!, getVisibility, isChildStale);
var childResult = SearchDownForTopMostElementAt(posRelToElement, child.Current!, getVisibility, isChildStale, childrenFilter);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dr1rrb Do you know why the recursive call didn't originally include the childrenFilter? I wanted to apply the filter to all the recursive calls, and I thought that was the original intent as well, so I changed it. If that's not correct, I could add a new method that does what I want.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes most probably a bug ... BTW just noticed that this filter is no longer used, if you don't need it we could just remove it.

@ramezgerges
ramezgerges marked this pull request as ready for review July 11, 2023 10:15
@ramezgerges
ramezgerges marked this pull request as draft August 17, 2023 20:15
@jeromelaban

Copy link
Copy Markdown
Member

@ramezgerges I think we can close this one as #13968 implements it.

@ramezgerges
ramezgerges deleted the flyout_passthrough branch October 20, 2023 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/automation Categorizes an issue or PR as relevant to project automation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flyout.OverlayInputPassThroughElement does not appear to work in WASM

4 participants