Skip to content

Conversation

@Simon-Laux
Copy link
Contributor

@Simon-Laux Simon-Laux commented Mar 28, 2025

macOS/iOS: add option to disable or enable link previews when building a webview (the webkit api has it enabled by default)

  • WebViewBuilderExtDarwin.allow_link_preview(allow_link_preview: bool)

I personally only need this to disable link previews, so I would be fine with setting a different default for tauri (like turning it off by default). Or even always disable it and don't expose api to change it.

…g a webview (the webkit api has it enabled by default)

  - `WebViewBuilderExtDarwin.allow_link_preview(allow_link_preview: bool)`
@Simon-Laux Simon-Laux requested a review from a team as a code owner March 28, 2025 17:54
@Simon-Laux Simon-Laux changed the title macOS/iOS: add option to disable or enable link previews when building a webview feat: macOS/iOS: add option to disable or enable link previews when building a webview Mar 28, 2025
Copy link
Contributor

@pewsheen pewsheen left a comment

Choose a reason for hiding this comment

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

Looks good with a nit

src/lib.rs Outdated
/// Default is true.
///
/// See https://docs.rs/objc2-web-kit/latest/objc2_web_kit/struct.WKWebView.html#method.allowsLinkPreview
fn allow_link_preview(self, allow_link_preview: bool) -> Self;
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we use with_link_preview to align with other builder method's naming style

@github-actions
Copy link
Contributor

github-actions bot commented Apr 6, 2025

Package Changes Through 1d5504c

There are 1 changes which include wry with minor

Planned Package Versions

The following package releases are the planned based on the context of changes in this pull request.

package current next
wry 0.50.5 0.51.0

Add another change file through the GitHub UI by following this link.


Read about change files or the docs at github.com/jbolda/covector

@lucasfernog lucasfernog merged commit ecbced2 into tauri-apps:dev Apr 6, 2025
12 checks passed
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