Breaking changes
- Pinch zoom and swipe navigation in pages are off unless you turn them on. On Linux and Windows, pages no longer zoom on a pinch, and on Windows they no longer go back on a touchscreen swipe. Set
PageOptions.PinchZoomandPageOptions.SwipeNavigationto turn them on, now on macOS too. (#846)
Highlights
- Sessions for pages.
PageOptions.Sessiongives a page its own cookies, storage, caches and service workers, like Electron's partitions.NewSession(name)keeps a session on disk,NewEphemeralSessionkeeps it in memory, andSession.ClearDataclears it. (#848) - Page context menus you can change.
Page.OnContextMenutells you what was right-clicked and lets you edit, extend, replace or prevent the web view's own menu. (#849) - Menus drawn in your theme.
Element.PopoverMenudraws a context menu inside the window with your theme's look, with full keyboard and screen reader support.MenuItem.Radiomarks radio items in drawn and system menus. (#852) - Drive a running app from tests or agents.
plugins/automation, imported by a test build, lets another process list windows, read the accessibility tree, click, type, choose menu items, take screenshots and run scripts in pages, over a socket only the user can open. (#851) - Videos in native UI.
ui.Videoplays aui.VideoPlayer, starting with animated GIFs (ui.NewGIFDecoder). (#839) - Typesetting for books and editors.
TextLayout.Linestells where each line is,TextShapecan justify and indent paragraphs, soft hyphens break lines with a hyphen, andSpan.BaselineShiftraises footnote marks. Rich text getsTheme.FirstLineIndent,Theme.ParagraphSpacing,Document.VisibleParagraphsand paragraph IDs that survive edits. (#853, #850)
New
Pages
PageOptions.BackgroundThrottling: ThrottlingOffkeeps a page running at full speed while its window is hidden, minimized or covered. (#847)Page.SessionStateandPageOptions.SessionStatesave a page's back/forward list, scroll positions and form fields and bring them back at the next launch. Windows keeps the URL only. (#844)PageOptions.PictureInPicturelets a page's videos go into picture in picture, andPage.TogglePictureInPicturemoves one out or back from Go, on macOS and Windows. (#842)Page.CaptureState,OnCaptureStateChangedandSetCaptureStatetell when a page uses the camera, microphone or screen, and mute or stop it, on macOS and Linux. (#843)Page.SetAuthHandleranswers HTTP sign-in prompts (Basic, Digest, NTLM, Negotiate), andPage.SetCertificateErrorHandlerdecides about certificates that don't verify. (#845)PageOptions.Autoplay: AutoplayAllowlets a page play sound without a click, even in a hidden window. (#856, thanks @vst93)PageOptions.Untrustedshows someone else's pages, such as a plugin's UI or user HTML, with no access to your Go methods, events, permissions or other origins.CallerPagetells a custom scheme handler which page sent a request. (#829)PageOptions.PreloadAllFramesruns the preload script in iframes too. (#871)
Native UI
DecodeImagedecodes a picture that may be a bitmap or an SVG, andImageSizegives an image's natural size. (#868, requested by @tacshi in #867)
Networking and updates
- The new
netproxypackage follows the system's proxy settings, PAC files included, in Go's requests. Updates and the fetch and websocket plugins use it. (#799) Updater.SetSourcegets updates from your own update service, still checked against your build's signing key. (#820)
Build and distribution
windows.installerIncludeadds your own NSIS script to the Windows installer, withcustomInit,customInstallandcustomUnInstallhooks. (#819)windows.installDirNamenames the install folder, such asZhiLianfor 智链, while the app keeps its name everywhere else. (#854)macos.icontakes an.icns, so you can draw each size of your icon yourself. (#833, @ACAne0320)
Fixes
UI and apps
- Scrolling works over an editor's annotations, hunk actions and hover cards: the wheel goes on to the elements around one that doesn't take it. (#827)
- Screen readers read a row by the labels of what's inside it, such as "Done" for a check mark. (#826)
- Apps that free their images' pixels after upload no longer crash when drawing without a GPU. (#858, @yunforge)
- The update window shows an error's full detail. (#859, @sorrycc)
- The diff view's deletion bars stripe evenly across lines. (#880)
- The calendar's month arrows are centered. (#874, @kubk)
macOS
- Control-clicking a tray icon opens its right-click menu. (#818, @ACAne0320)
Windows
- Transparent native UI windows show what is behind them instead of black. (#660, @ACAne0320)
- Resizing a window quickly shows its background color at the new edges instead of black. (#855)
- Hidden windows no longer leave their embedded web views on screen, catching clicks. (#831)
- Upgrading with the installer keeps the app in the folder it's installed in. (#854)
Linux
- Native UI windows over a web view redraw only when their content changes, not on every frame the page paints. (#841)
- A window that hides itself from a button and shows again draws its content instead of staying blank. (#877)
Website
- The Showcase adds Liubai, Clipnest, Cleanzo, Little Reef, MyTwig and Godwit, and MixMusic's native UI. (#860 @fzn0x, #861 #862 @echoVic, #863 @HeroSizy, #869 @baranwang)
New Contributors
- @yunforge made their first contribution in #858
- @fzn0x made their first contribution in #860
- @cunninghamcard-bit made their first contribution in #866
- @kubk made their first contribution in #874
Full Changelog: v0.7.1...v0.7.2