feat: restore info bubble as SwiftUI popover on badge icons#239
Open
feat: restore info bubble as SwiftUI popover on badge icons#239
Conversation
Restore the error/offline info bubble that was accidentally removed in PR #208 when InfoBubble was deleted. Replace the legacy MAAttachedWindow (2007 3rd-party ObjC library) with native SwiftUI .popover() modifiers on badge icons in HostsRowView. - Add ErrorPopoverView showing error title, description, and optional "Open in Browser" button - Make error and offline badge icons tappable with popover details - Remove dead MAAttachedWindow and NSToolbarPoofAnimator files - Clean up dead code in ListController.m left behind by PR #208 (showEditError:, locationOfHosts:, handleHostsFileRemoval:, etc.)
…-window # Conflicts: # Gas Mask.xcodeproj/project.pbxproj # Source/ListController.m
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.
Summary
InfoBubblewas deletedMAAttachedWindow(2007 3rd-party ObjC library) with native SwiftUI.popover()modifiers on badge icons inHostsRowViewScreenshots
Error popover with "Open in Browser" button (e.g. Server Not Found)
Error popover without URL (e.g. Download Failed)
Offline popover (No Internet Connection)
Changes
New file:
ErrorPopoverView.swift— SwiftUI view showing error title, optional description, and optional "Open in Browser" buttonModified:
HostsRowView.swift— Badge icons (error triangle, offline wifi.slash) are nowButtons that show a.popover()with error details on click. AddederrorTitle(for:)helper to mapErrorTypeenum values to human-readable titles. Added accessibility labels.ListController.m— Removed 6 dead methods (showEditError:,locationOfHosts:,rightCenterLocationOfHosts:,centerLocationOfHostsOnScreen:,handleHostsFileRemoval:,textShouldEndEditing:) and theNSToolbarPoofAnimatorimportDeleted:
MAAttachedWindow.h/m— Dead 3rd-party library with zero consumers since PR feat: removed bubble window #208NSToolbarPoofAnimator.h— Private API shim, only consumer was the removedhandleHostsFileRemoval:Net: +92 −1,269 lines (mostly deletions of dead code)
Test plan