Skip to content

MAUI Gesture Recognizer Auto-Breadcrumbs #4124

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

Merged
merged 32 commits into from
May 12, 2025
Merged

Conversation

aritchie
Copy link
Collaborator

@aritchie aritchie commented Apr 17, 2025

This is not a current enhancement request. This is being done to see how well we can "dig" into the view hierarchy as we look for auto instrumentation on things like command execution.

This is here for discussion to decide if we should bring it into the product.

TODOs

  • Unit Tests - like other event binders, this will be....difficult

@aritchie aritchie requested a review from bruno-garcia April 17, 2025 14:23
@bruno-garcia
Copy link
Member

@aritchie should we add this in?

I think we might want to disable this functionality from the native SDKs if we do, I believe they have a similar thing going there, but since we don't sync those from native to C# (only the other way around), if we add this here we get them in all evnets, C# and native ones.

@aritchie aritchie marked this pull request as ready for review May 9, 2025 18:31
Copy link
Collaborator

@jamescrosswell jamescrosswell left a comment

Choose a reason for hiding this comment

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

Some question, some suggestions. Looks like we're getting close! Will be great to have some visual runners finally.

@@ -1,17 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup Condition="'$(EnableMauiDeviceTestVisualRunner)' == 'true'">
Copy link
Collaborator

Choose a reason for hiding this comment

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

We could reverse this... only enable the maui device test visual runner property if the TFM is net9 or above.

That way we wouldn't have to fiddle with the TFMs in this csproj.

I think that would be cleaner and easier to reason about.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

But you don't want the visual runner on at all for CI. The net8 target gets angry about not having an INSTALL target.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah, I was thinking we might have a compound condition for EnableMauiDeviceTestVisualRunner... something like:

Condition="'$(GITHUB_ACTIONS)' == 'true' and $([MSBuild]::IsTargetFrameworkCompatible('net9.0', $(TargetFramework)))"

So the visual tests would only be run locally and only when targeting net9.0 and later...

This csproj file wouldn't have to change then. It could target net8.0 and net9.0.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I really don't like overcomplicating stuff on flags that only we're going to touch. It will be forced to be net9.0 because of the TFMs in the target. I can't use the original TFM setup in the device tests project. I think we need to leave this one for now.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Furthermore, if the visual runner flag gets left as true... the xharness device tests will fail on CI.... so we've got safety anyhow.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I really don't like overcomplicating stuff

Yeah, that's what I'm trying to avoid as well. The above seems very complicated to me - and when combined with all the other flags we have I can see it being quite hard to grasp in the future. So I'm looking at ways to simplify it.

I'll play around with it locally to see if what I'm proposing would even work and whether it would actually make things simpler or more complex (sometimes these things sound good in theory but the reality is something different).

Copy link
Collaborator

Choose a reason for hiding this comment

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

OK, I think I got it going... but man MS Build is painful to work with sometimes 😢

This is hopefully a bit neater and it means you don't have to manually enable visual tests when running locally (they're always enabled locally when running the device tests against net9.0 and later targets).

@jamescrosswell jamescrosswell self-requested a review May 12, 2025 03:10
@@ -11,6 +11,11 @@
- Redact Authorization headers before sending events to Sentry ([#4164](https://github.com/getsentry/sentry-dotnet/pull/4164))
- Remove Strong Naming from Sentry.Hangfire ([#4099](https://github.com/getsentry/sentry-dotnet/pull/4099))

### Features
Copy link
Member

Choose a reason for hiding this comment

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

issue: Two Features section.

@aritchie aritchie merged commit f04930d into main May 12, 2025
26 checks passed
@aritchie aritchie deleted the maui_gestures_breadcrumbs branch May 12, 2025 15:12
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.

5 participants