Repository navigation
Move to PlatformHeads 0.12.0 and drop the copies it now holds - #1025
Merged
Merged
Conversation
The seven pins move together to 0.12.0, which shares the macOS tray's flat menu, the update report and the menu renderer. The macOS tray hands its menu over as TrayMenuItem.Flatten writes it, with TrayMenuItem.Flags as the DETRAY_* bits, which have the same values, and the library reads it back with StatusMenuItem.tree and writes it with StatusMenuItem.describe. The ABI does not change. TrayUpdate asks ToolUpdate.WindowsScriptStops which viewer the update would stop, and reports through ToolUpdateOutcome.Report, in the words it used. The viewer's context menu is drawn by PaletteMenuRenderer in the colours it had.
Co-authored-by: SimonCropp <122666+SimonCropp@users.noreply.github.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.
PlatformHeads 0.12.0 (PlatformHeads#13) now has the macOS tray's flat menu, the update report and the menu renderer that DiffEngine kept copies of. This moves the seven pins to 0.12.0 and deletes the copies.
Pins. All seven move to 0.12.0 together, and
claude.mdsays so.macOS tray menu. The ABI is unchanged:
detray.h's structs andDETRAY_VERSIONstay as they are, and the header now notes that its flags are PlatformHeads' values.MacTray.Sendhands the menu over asTrayMenuItem.Flattenwrites it, with(int) item.Flagsas theDETRAY_*bits, which have the same values.MacTray.Flatten,MacTray.FlagsandDetray's flag constants are deleted.MenuItems.read(Swift) now reads the array throughStatusMenuItem.tree.detray_describewrites withStatusMenuItem.describe.MacTrayTests.EachItemFollowsTheItemWhoseSubmenuItIsInis deleted, since it now tested PlatformHeads' ownFlatten.TheLibraryRebuildsTheMenuItWasHandedstays: it hands the menu across the real library and reads it back, on the macOS job.build-nativeshould propose rebuiltdiffengine_traybinaries into this branch.Update.
TrayUpdate.CloseOwningViewernow asksToolUpdate.WindowsScriptStopswhether the update would stop the viewer. That makesTrayUpdate.Stopsredundant, so it's deleted. The test that checks DiffEngine's own layout, with the viewer inside the tray's store, now asksWindowsScriptStops.TrayUpdate.Reportgoes throughToolUpdateOutcome.Reportwith the same words and the same log lines. Its tests are unchanged.Viewer context menu.
ViewerMenuusesPaletteMenuRenderer(MenuTheme.Colours), andMenuThemenow holds only the palette. The old table set the same members PlatformHeads' does, to the same colours, so theContextMenuTestssnapshots haven't changed.Tests. Locally on Windows, the Release build had no errors. Of 3,845 tests in the whole solution, 3,793 passed, 49 were skipped and 3 failed. The three are the ListenerTable tests that always fail on this machine's Windows build (10.0.26300), and they don't touch anything this PR changes. The Swift and the macOS round trip run only on CI.