Conversation
…ort, intro) Hold any promotional section on the New Tab page — the "Open on GitHub" rows, the "Extension not working? Report it" pill, or the intro card — and a small glass "Hide this" menu pops up; tapping it removes the section and keeps it hidden on every future New Tab. The page is served with baseURL nil (no persistent localStorage), so the choice is persisted natively: the hold menu navigates to bbnewtab://hide/<id>, which the nav delegate intercepts, records in AppSettings.newTabHiddenSections, and cancels (the JS already removed the element for instant feedback). The renderer omits any hidden section server-side so it never flashes. Long-press is a manual 450 ms touch-hold (callout/selection suppressed on .hideable), and the link tap that would otherwise follow the hold is cancelled. Hideable ids: github, report, intro. swiftc -parse clean; the inline JS validates (node --check). No automated test — it's native long-press UI, device-observable. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Companion to the long-press hide: Settings › Appearance now shows "Restore hidden New Tab sections" whenever the user has dismissed any (the count drives a caption), clearing AppSettings.newTabHiddenSections so they all return on the next New Tab. The row is hidden when nothing is dismissed. swiftc -parse clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… works The long-press "Hide this" menu never appeared because the New Tab page's links are real <a href> in a WKWebView that has a UI delegate — so WebKit ignored the page's -webkit-touch-callout:none and showed its own link menu (Copy Link / Open in New Tab) instead. Suppress the system context menu when the web view is showing the New Tab page (an actionProvider returning nil presents nothing), so the page's JS owns the long-press and pops the Hide menu. Real navigation (tap) and the post-long-press click cancel are unchanged; other pages keep WebKit's menu. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Long-press to hide the promotional sections on the New Tab page — the "Open on GitHub" rows, the "Extension not working? Report it" pill, and the intro card — as requested.
Hold the section → a small glass "Hide this" menu pops up → tap it → the section fades out and stays hidden on every future New Tab.
How
baseURL: nil(no persistentlocalStorage), so the choice is persisted natively: the menu navigates tobbnewtab://hide/<id>, which the nav delegate intercepts, records inAppSettings.newTabHiddenSections, and cancels (the JS already removed the element for instant feedback).-webkit-touch-callout/selection suppressed on.hideable); the link tap that would otherwise follow the hold is cancelled.github(both the guide row and the returning-user footer row),report,intro.Verification
swiftc -parseclean; the inline long-press JS validates (node --check); body length ~390 (< 500), file 503 (< 1000) so SwiftLint stays green. No automated test — it's native long-press UI, device-observable: hold a GitHub/Report/intro section → "Hide this" → it's gone now and on the next New Tab.🤖 Generated with Claude Code