Fix remaining DevFlow support for Comet apps#68
Open
davidortinau wants to merge 5 commits intofeature/cometfrom
Open
Fix remaining DevFlow support for Comet apps#68davidortinau wants to merge 5 commits intofeature/cometfrom
davidortinau wants to merge 5 commits intofeature/cometfrom
Conversation
… items on pushed views FIX 1 — DevFlow VisualTreeWalker IView branch: - Add ResolveIViewWindowBounds, ResolveIViewPlatformVisibility, PopulateIViewNativeInfo virtual methods to VisualTreeWalker (Core) with platform overrides (Agent) - IView branch now resolves bounds from handler's native view (UIView.ConvertRectToView on iOS, GetLocationInWindow on Android, TransformToVisual on Windows) - Visibility checked via native view Hidden/Alpha/size instead of IView.Visibility alone - Text extraction checks ILabel, ITextButton, IEntry, IEditor, ISearchBar interfaces - CometViewResolver.TryExtractText() added for reflection-based text fallback FIX 2 — CometViewController safe area: - LoadView() checks ISafeAreaView.IgnoreSafeArea before setting EdgesForExtendedLayout - ViewWillAppear re-checks safe area and propagates background color to container view - Eliminates white/black letterboxing when views use .IgnoreSafeArea() FIX 3 — Toolbar items on pushed views: - Add View.ToolbarItems() and View.GetToolbarItems() environment-based extensions - Add EnvironmentKeys.View.ToolbarItems constant - Extract toolbar creation into reusable ApplyToolbarItems() in NavigationViewHandler - Pushed views' own toolbar items take priority over NavigationView's items Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
CometApp implements IApplication but not Microsoft.Maui.Controls.Application, so Application.Current is never set and DevFlow's retry loop always fails. This left _app=null and ALL DevFlow endpoints returned 'Agent not bound to app'. Changes: - Add _iApp field + BoundApplication property (prefers Application, falls back to IApplication) - Add StartServerOnly() with TryResolveIApplicationFromDI() using IPlatformApplication.Current - Add BindIApp() for late-binding IApplication instances - Replace all _app references with BoundApplication in endpoint handlers - Add IApplication overloads for WalkTree, GetElementById, HitTestByBounds, Query, QueryCss - Fix HitTestByBounds to safely cast IWindow→Window for Page/Navigation access - AgentServiceExtensions: fall back to StartServerOnly() when Application.Current stays null - Add TryBubbleCometGestureTap for walking parent chain to find tap gestures - Add case IView iViewNoHandler in HandleTap for views without platform handlers Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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
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.
Summary
This follow-up PR keeps the remaining DevFlow for Comet work separate from the broader Comet feature status.
What it fixes
IApplication/Comet app binding whenApplication.Currentis unavailableNotes
feature/cometso it can move independently of the larger repo-level discussionValidation
Comet.Testscurrently has one unrelated pre-existing template-surface failure (TemplateCurrentSurfaceValidationTests.SingleProjectTemplateTargetsCurrentMauiAndDropsLegacyDependencies)