Skip to content

feat: macOS/iOS: add option to disable or enable link previews when building a webview - #1534

Merged
lucasfernog merged 2 commits into
tauri-apps:devfrom
Simon-Laux:apple_allow_link_preview
Apr 6, 2025
Merged

feat: macOS/iOS: add option to disable or enable link previews when building a webview#1534
lucasfernog merged 2 commits into
tauri-apps:devfrom
Simon-Laux:apple_allow_link_preview

Conversation

@Simon-Laux

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

Copy link
Copy Markdown
Contributor

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

@pewsheen pewsheen 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.

Looks good with a nit

Comment thread 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
Copy Markdown
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

github-actions Bot commented Apr 6, 2025

Copy link
Copy Markdown
Contributor

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
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