Skip to content
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

[NET10] Replace the obsolete RunJavaScriptTextInputPanel #28531

Draft
wants to merge 8 commits into
base: net10.0
Choose a base branch
from

Conversation

jsuarezruiz
Copy link
Contributor

Description of Change

Replace the obsolete RunJavaScriptTextInputPanel.

Issues Fixed

Fixes #28135

@jsuarezruiz jsuarezruiz added area-blazor Blazor Hybrid / Desktop, BlazorWebView t/housekeeping ♻︎ labels Mar 20, 2025
@Copilot Copilot bot review requested due to automatic review settings March 20, 2025 11:07
@jsuarezruiz jsuarezruiz requested review from a team as code owners March 20, 2025 11:07
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR replaces the obsolete RunJavaScriptTextInputPanel with a new public API method and adds a decrement functionality in the Blazor sample page.

  • Replaces the obsolete method with a new signature and updated parameter list in the iOS WebView manager.
  • Removes deprecated warning suppression and updates logic for presenting the alert controller.
  • Introduces a new Decrement button and corresponding logic in the Blazor sample page with a JavaScript confirmation.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/BlazorWebView/src/Maui/iOS/IOSWebViewManager.cs Replaces obsolete RunJavaScriptTextInputPanel with new ShowJavaScriptTextInputPanel and adjusts alert controller presentation logic.
src/Controls/samples/Controls.Sample/Pages/Blazor/Index.razor Adds a new Decrement button with confirmation functionality via JSRuntime.
Comments suppressed due to low confidence (1)

src/Controls/samples/Controls.Sample/Pages/Blazor/Index.razor:23

  • The new Decrement method with asynchronous confirmation should be accompanied by test cases in TestCases.HostApp and TestCases.Shared.Tests.
async Task Decrement()

@jsuarezruiz jsuarezruiz marked this pull request as draft March 20, 2025 11:13
#pragma warning restore CS0672 // Member overrides obsolete member

[Export("webView(_:runJavaScriptTextInputPanelWithPrompt:defaultText:initiatedByFrame:completionHandler:)")]
public void RunJavaScriptTextInputPanelWithPrompt(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jsuarezruiz jsuarezruiz changed the title [net10.0] Replace the obsolete RunJavaScriptTextInputPanel [NET10] Replace the obsolete RunJavaScriptTextInputPanel Mar 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-blazor Blazor Hybrid / Desktop, BlazorWebView t/housekeeping ♻︎
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant