-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Refactor FXIOS-14663 [Previews] Show full URL when link preview is disabled #31700
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
base: main
Are you sure you want to change the base?
Conversation
FilippoZazzeroni
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM @janbrasna thanks for bringing this up 😃
...ontend/Browser/BrowserViewController/Extensions/BrowserViewController+WebViewDelegates.swift
Outdated
Show resolved
Hide resolved
janbrasna
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding some corner cases for paper trail — these were the reasons only the normalized domain ended up used for the casual user in the first place.
But for those who prefer to know the destination instead of triggering the preview this might be actually still practical, over… well, not knowing:
| let showPreview = self.profile.prefs.boolForKey(PrefsKeys.ContextMenuShowLinkPreviews) ?? true | ||
| let urlTitle = !showPreview ? url.absoluteString : (url.normalizedHost ?? url.absoluteString) | ||
|
|
||
| let actions = createActions(isPrivate: isPrivate, | ||
| url: url, | ||
| addTab: self.addTab, | ||
| title: elements.title, | ||
| image: elements.image, | ||
| currentTab: currentTab, | ||
| webView: webView) | ||
| return UIMenu(title: url.normalizedHost ?? url.absoluteString, children: actions) | ||
| return UIMenu(title: urlTitle, children: actions) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not unlike Focus, the title is left for the UIMenu API/SDK to handle, and truncate and size the component as needed. This still provides some compromise between surfacing as much of the link content with still having reasonable affordance of the context menu items — I've picked some "worst case" examples as the corner case, when the menu items overflow and get clipped and scrollable:
![]() |
![]() |
![]() |
|---|
![]() |
![]() |
|---|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps a video would show the affordance in those worst examples:
Simulator.Screen.Recording.-.iPad.mini.A17.Pro.-.2026-01-17.at.17.06.07.mov
or depending on the distance between the edges some of the most crammed ones:
Simulator.Screen.Recording.-.iPhone.17.Pro.-.2026-01-17.at.17.34.01.mov
but it kinda feels right, esp. for some of those UUID–like links hashing content, like on G SERP outbound links or Amazon product links carrying over random tracking/session crud — if people need to inspect what they're about to click this feels appropriate.





📜 Tickets
Jira ticket FXIOS-14663
GitHub issue #31698
💡 Description
To offer previewing the actual destination URL query instead of loading the URL itself, to match some other browsers the tradeoffs in the real estate can be tied to the preference to show the page preview render or not — to have at least some idea about the target links when previews are disabled, or for users who want to verify the URL first before loading it. (This would also resolve #27090 and close #27719)
The default is not impacted, this only changes the link context menu title for users who deliberately disable loading the previews in settings.
🎥 Demos
This would only show full URL when preview is disabled; by default with preview enabled it's still the short version:
📝 Checklist