Skip to content

Implemented Essentials Launcher and Browser#172

Open
jsuarezruiz wants to merge 6 commits into
mainfrom
essentials-launcher
Open

Implemented Essentials Launcher and Browser#172
jsuarezruiz wants to merge 6 commits into
mainfrom
essentials-launcher

Conversation

@jsuarezruiz

Copy link
Copy Markdown
Member

Changes:

  • Launcher (ILauncher): Opens URIs via the OS default handler. Desktop uses Process.Start with UseShellExecute, browser uses window.open() via [JSImport]. Supports CanOpenAsync, OpenAsync, TryOpenAsync, and OpenAsync(OpenFileRequest).
  • Browser (IBrowser): Opens URLs in the system browser. Process.Start result on desktop, window.open() return on WASM (also detects popup blockers).
image image

Copilot AI review requested due to automatic review settings March 23, 2026 10:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds Avalonia-based implementations of MAUI Essentials Launcher and Browser services (desktop + WASM), wires them into the Essentials builder, and provides ControlGallery samples plus basic unit tests.

Changes:

  • Register AvaloniaLauncher and AvaloniaBrowser via UseAvaloniaEssentials.
  • Implement desktop (Process.Start + UseShellExecute) and browser/WASM (window.open() via JSImport) backends.
  • Add ControlGallery pages and basic tests for the new services.

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
tests/Avalonia.Controls.Maui.Essentials.Tests/AvaloniaLauncherTests.cs Adds scheme support and null request tests for AvaloniaLauncher.
tests/Avalonia.Controls.Maui.Essentials.Tests/AvaloniaBrowserTests.cs Adds a basic construction test for AvaloniaBrowser.
src/Avalonia.Controls.Maui.Essentials/MauiEssentialsBuilderExtensions.cs Registers Browser/Launcher defaults in the builder extension.
src/Avalonia.Controls.Maui.Essentials/Launcher/LauncherInterop.Browser.cs Adds JSImport binding for window.open.
src/Avalonia.Controls.Maui.Essentials/Launcher/AvaloniaLauncher.cs Introduces the cross-platform ILauncher implementation + partial platform hooks.
src/Avalonia.Controls.Maui.Essentials/Launcher/AvaloniaLauncher.Default.cs Desktop launcher implementation using Process.Start.
src/Avalonia.Controls.Maui.Essentials/Launcher/AvaloniaLauncher.Browser.cs WASM launcher implementation using JS interop.
src/Avalonia.Controls.Maui.Essentials/Browser/AvaloniaBrowser.cs Introduces the cross-platform IBrowser implementation + partial platform hook.
src/Avalonia.Controls.Maui.Essentials/Browser/AvaloniaBrowser.Default.cs Desktop browser implementation using Process.Start.
src/Avalonia.Controls.Maui.Essentials/Browser/AvaloniaBrowser.Browser.cs WASM browser implementation using JS interop.
samples/ControlGallery/ControlGallery/Pages/LauncherPage.xaml.cs Adds Launcher sample UI logic.
samples/ControlGallery/ControlGallery/Pages/LauncherPage.xaml Adds Launcher sample UI layout.
samples/ControlGallery/ControlGallery/Pages/BrowserPage.xaml.cs Adds Browser sample UI logic.
samples/ControlGallery/ControlGallery/Pages/BrowserPage.xaml Adds Browser sample UI layout.
samples/ControlGallery/ControlGallery/MainPage.xaml.cs Adds Browser/Launcher samples to the gallery navigation and list.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread samples/ControlGallery/ControlGallery/Pages/BrowserPage.xaml.cs Outdated
Comment thread samples/ControlGallery/ControlGallery/Pages/LauncherPage.xaml.cs Outdated
Comment thread src/Avalonia.Controls.Maui.Essentials/Launcher/AvaloniaLauncher.cs
Comment thread src/Avalonia.Controls.Maui.Essentials/Browser/AvaloniaBrowser.cs

@drasticactions drasticactions left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

https://docs.avaloniaui.net/docs/services/launcher

Avalonia has launcher functions that can bind these; we don't need to split between platforms here.

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