Repository navigation
Conversation
…ebar foot The iPad's toolbar layout never mounted ChromeLayer, where the phone keeps the download question, the Now line and the Downloads page. A site's first download asked a question nothing showed, so it never started. - Downloads button in the sidebar foot (always) and in the toolbar while the sidebar is away, as the Mac's Hoard button: its popover asks a site's first file, then lists every file. Site Controls gains Downloaded Here and shows the Downloads page; its Downloads permission had the mic's mark. - A chat's column stands beside the workspace instead of over its toolbar. - The page keeps its card inset with the sidebar hidden, and the address capsule is the Mac's 36 points, centered between equal side groups. - Pins follow the Mac's SideBar.pinColumns: rows fill the width, stay even. - Settings moves to the app menu with ⌘, (the gear goes); ⇧⌘N opens a private tab; the sidebar's + holds New Private Tab and Spaces and Chats. - Site Controls in the bar-less toolbar; share sheets point under the toolbar on iPad; topController skips a popover on its way out. - The iPad Settings card: its head 12 points in from the top, and a tap beside it closes it.
Every navigation was asked for with preferredContentMode .mobile, so an iPad got Google's and other sites' phone pages. An iPad now leaves WebKit its recommended mode (desktop at full width, mobile in a narrow window), and a site's switch in Site Controls asks for its mobile site instead, kept as Site.mobile. The iPhone keeps mobile unless a site asks desktop.
The iPad had a full-width toolbar row over everything, unlike the Mac, where the sidebar runs the window's height and the page is a card. - The sidebar's header holds its door, All Tabs, and Back, Forward and Reload; the address is a plate under it (the Mac's Show Address Bar off). Show Address Bar on moves the address and the page's doors into a band over the card; a split keeps a band on each page with its own Back, split menu and close. - Show Tabs in Sidebar off (⇧⌘S, Settings, the door's hold) puts the tabs in the Mac's tab bar across the top. The sidebar away, the band holds the door, + and All Tabs. ⇧⌘\ shows All Tabs. - Spaces are pages side by side in the sidebar, sliding on Motion.space (the Mac's 0.2 s spring); a sideways swipe pages them as the Mac's two fingers do. The foot shows the space in front in color, the rest dimmed. - Rows have the Mac's 36-point ground and 10-point radius inside a 44-point target, with pointer highlights. - All Tabs grows its cards out of and back into the page card, and the sidebar and tab bar fade with the bar instead of popping back after. - ⌘, stays Yab's while Settings is up: declining it handed the key to the system's own Settings item, which left Yab for the Settings app.
… in Split View - Keys and the iPad's menu bar: Zoom In, Zoom Out and Actual Size (⌘= ⌘- ⌘0) and Show Reader (⇧⌘R) in View, Stop Loading (⌘.) beside Reload, Copy Link (⇧⌘C) in Edit, Print… (⌘P) in File. - Print… and Save as PDF in Site Controls › More: the system's print panel with WebKit's print formatter, and the page as one PDF to the share sheet. - A held link offers Open in Split View where a split can stand. - A tab's hold offers Duplicate Tab.
Typing a command's name, or another word for it, offers it as a Yab row with its keys: Zoom In, Show Reader, Print, Copy Link, New Private Tab, Show Tabs in Sidebar and the rest of the keys' menu actions that have something to do now. A whole name leads every other row, as AGENTS.md asks of the Mac's field; a begun one stands under the first row. mayUse splits into the covered check and offers(key), which the field asks: the keys stay the field's while it is up, so a chosen command runs once it has closed.
The plate drew them from prototype art while the iPad, the page menu and the Mac use MacGlyph's yabReload and yabStop.
A shared DeviceWord gives "iPad" or "iPhone" for the strings that name this device. Split View, Separate Split View, Close Split, Pin Tab, Unpin Tab, Keep Tab, Don't Keep Tab and Rename Tab… now match the Mac's menus.
The tablet tree mounted ChromeLayer while All Tabs was up, so the phone's plate, back button and the stack's circle faded in over the page as the gallery closed (chromeOpacity returning to 1) and vanished only when it was gone. The iPad's All Tabs lives in the sidebar: the phone chrome is no longer mounted there, the circle is not drawn, and the other cards fade in place rather than flying into a circle the iPad doesn't have.
… button A PDF or another document a tab opens (Word, Excel, PowerPoint, iWork, rich text) becomes a file: kept in Downloads without asking and shown in QuickLook, which saves and shares it; WebKit's inline view had no way to keep it. A tab out of sight still shows it inline. A tab whose first load became a file (a new window's PDF or attachment) was cancelled because there was no page to restore; it now keeps the file, and a page-opened window that was only that file closes back to its opener. On iPad, Download Linked File throws a disc from where the link was held into the downloads button, as the Mac's Hoard does: the button shows the progress ring while it runs and the file's icon until the list or file opens, giving a little at each arrival.
WKWebView.url can still name the file for a moment after the file is whole, then reads the source again with no navigation and no change to history (measured: /file at completion, /second 800 ms later, about one run in eighteen). The tests read it at that moment and failed now and then; they now wait for it to come back.
[Medium impact] The PR changes the main browsing experience on iPad and several shared page workflows. Do not merge until private document presentation and the two tablet control failures are fixed. Findings
SummaryThis PR gives iPad a Mac-style workspace, more keyboard and field commands, desktop website defaults, and document downloads that open in QuickLook.
Review checked source code only; iOS builds and simulator tests were not run here.
|
| pages.onViewDownload = { [weak self] tab, entry in | ||
| guard let self, let file = downloads.entry(entry), | ||
| browser.tab?.id == tab || browser.tab(tab) == nil else { return } | ||
| downloads.flashTaken() | ||
| openDownload(file) |
There was a problem hiding this comment.
Private files reopen outside Private. Start a document download in a private tab, close that tab while another private tab remains, then return to an ordinary page. The transfer continues, and
browser.tab(tab) == nil lets its completion open the private document over that ordinary page. This also opens documents from closed public tabs over unrelated pages.
Track the actual opener instead of treating every missing tab as permission to present, and check the current privacy and foreground state before opening QuickLook.
How this was verified: Private transfers survive individual tab closures, and the completion opens QuickLook whenever the source tab is missing without checking which page or privacy state is now in front.
| @@ -150,7 +174,7 @@ struct TabletWorkspaceView: View { | |||
| let frame = plan.pane(second) | |||
| let focused = id == app.browser.tab?.id | |||
| VStack(spacing: 0) { | |||
| if paneBars { TabletPaneBar(tab: tab) } | |||
| if paneBars { TabletPageBand(tab: tab, plan: chrome, split: plan.split) } | |||
There was a problem hiding this comment.
Empty spaces lose every control. With tabs in the sidebar and the sidebar hidden, closing the last selected tab makes
ids empty. The address band now lives inside this loop, so its New Tab and Sidebar buttons disappear too. The old window-level toolbar remained available in this state.
Keep an empty-page band or another touch control outside the tab loop so the person can open a tab or restore the sidebar.
| private var side: CGFloat { | ||
| // Both ends as wide as the wider, so the site stays centered. | ||
| let leading = (plan.bandWorkspace ? 1 : 0) + (plan.bandNav ? 3 : 0) | ||
| let trailing = 1 + (split ? 2 : 0) + (plan.bandWorkspace ? 2 + (app.showsToolbarDownloads(sidebarShown: false) ? 1 : 0) : 0) | ||
| return Metrics.Tablet.door * CGFloat(max(leading, trailing)) |
There was a problem hiding this comment.
Narrow splits cut off controls. Hide the sidebar, open Split View, and resize one pane to the supported 320-point minimum.
side reserves 180 points at each end, or 216 when downloads are shown. Those fixed ends alone need 360 or 432 points, before the address and padding. The clipped pane therefore cuts off controls and leaves no usable address area.
Use a layout that fits the minimum pane width rather than reserving both full groups on both sides.
| if !tab.isMail, tab.navigationURL != nil { | ||
| item("Duplicate Tab", .yabTabPlus) { app.duplicate(tab) } |
There was a problem hiding this comment.
Remote tabs cannot be duplicated. This menu belongs to a tab from the Mac, but
duplicate passes its remote ID to openHeldLink. That function requires the source ID to exist in the local BrowserStore and returns immediately when it does not. Choosing the new item on a Mac-only tab therefore does nothing.
Create the local copy in the row's space without requiring a local source tab.
| // Yab's own menu actions, as the Mac's field finds them. | ||
| rows = Words.withCommands(rows, typed: field.words, commands: commandCandidates) |
There was a problem hiding this comment.
Private command rows do nothing. The new command rows are added in Private too, but
choose rejects every .command before reaching the new switch case. Typing an exact command such as Reload Page puts that dead row first, so Return neither runs the command nor searches the words.
Either offer only commands that Private can run and allow them through, or leave those rows out of private results.
| var commandCandidates: [CommandCandidate] { | ||
| BrowserKey.all.filter { $0.commandable && offers($0) } | ||
| .map { CommandCandidate(token: $0.token, title: $0.title, aliases: $0.aliases, shortcut: $0.shortcut) } |
There was a problem hiding this comment.
New actions evade command search.
commandCandidates only includes BrowserKey.all, which has no entries for the new Save as PDF, Duplicate Tab, or Split View actions. Typing those menu names therefore cannot find the actions. The repository requires new menu actions to be available by name in the command field.
Add command entries with the right availability checks, including actions that have no keyboard shortcut.
|
Thanks, this is a lot of good work. 99 files is too much to review and ship as one, so please split it. First, on its own: a private tab's download opening outside private mode, that's a privacy bug and we'd take it at once. Then the downloads button, desktop pages and PDFs as separate PRs, and the layout and keys last. Each commit already stands alone, so it should mostly be opening PRs from them. |
|
Replaced by four smaller PRs, as the review asked for:
Every Greptile finding here is fixed in them. |
What changes
On iPad, Yab now lays out and behaves like the Mac. The sidebar runs the window's height and the page is a card. The Mac's keys, menus and downloads button are there. Sites send their desktop pages, as Safari's do. A PDF opens as a file you can save. There is no issue for this yet; it is offered for review as a whole, and each commit stands on its own if you'd rather take part of it.
Why it happened
Each commit's message has its full cause; the main ones:
ChromeLayer, where the phone keeps the download question. A site's first file asked a question nothing showed. The iPad now has the Mac's downloads button (Hoard), in the sidebar foot and in the band while the sidebar is away.preferredContentMode = .mobile. The iPad now leaves WebKit its recommended mode, and Site Controls asks for the mobile site instead (Site.mobile).ChromeLayerwhile All Tabs was up, and it faded in aschromeOpacitywent back to 1. It is no longer mounted there. The stack's circle isn't drawn on iPad either, and the other cards fade where they are.The rest follows the Mac rather than fixing a cause:
Motion.space;MacGlyph);Proof
mainand pass here, among them:TabletWorkspaceTests(chrome plan, pin columns, paging, geometry)BrowserKeysTests(Settings stays Yab's, page keys, covered)CommandRowsTestsPageMenuTests(desktop sites)DownloadStoreTests(flights, waiting, document types)PageDownloadTests: a PDF opens for the viewer and keeps its source; a PDF as a tab's first load still opensTabStackTests: the iPad closing plan-YabState tablet.strip,tablet.band,tablet.hidden,downloads.now).Checked on
Checklist
xcodebuild test:TabletWorkspaceTests,TabletLayoutTests,BrowserKeysTests,CommandRowsTestsandPageMenuTestsDownloadStoreTests,PageDownloadTests,TabStackTestsandSettingsColumnTestsTabletWorkspaceUITests,TabletChromeUITests,TabletArcSplitUITestsandTabletLayoutUITests(before the rebase ontomain;TabletWorkspaceUITests' All Tabs case again after it)mainhere:TabletLayoutTests.testNativeTabletKeepsBothWebViewsAndDraftsWhileResizingAndRotating(scroll offset in the simulator)DownloadsUITests' ask and held-link cases, which are phone-shaped on iPadPageDownloadTests.testNativeRequestDownloadReportsItsAPIFrameWithoutNavigatingTheActualDocument, which cancels before the request reaches the test server about one run in six./design-check --base origin/mainis clean.NativeActions.swiftis untouched); the iPad's new rows are iPad-only layout preferences.