Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces a new SwiftUI tooltip library called TooltipKitUI, complementing the existing UIKit-based ToolTipKit. The implementation provides a declarative API for adding customizable tooltips to SwiftUI views with features like automatic positioning, highlight effects, and extensive styling options.
Key Changes
- Added complete TooltipKitUI module with SwiftUI-based tooltip implementation supporting iOS 14+
- Implemented custom shape rendering for tooltips with dynamic arrow positioning
- Created comprehensive documentation with usage examples and configuration parameters in README
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| Sources/TooltipKitUI/Views/TooltipOverlay.swift | Core positioning logic for tooltips with automatic placement above/below targets |
| Sources/TooltipKitUI/Views/TooltipKitUI.swift | Main tooltip view component with title/description rendering |
| Sources/TooltipKitUI/Views/TooltipContainer.swift | Container wrapper that manages tooltip presentation and overlay |
| Sources/TooltipKitUI/Utils/TooltipPreferenceKey.swift | SwiftUI preference key for passing tooltip data up the view hierarchy |
| Sources/TooltipKitUI/Shapes/TooltipShape.swift | Custom shape drawing rounded rectangles with directional arrows |
| Sources/TooltipKitUI/Modifiers/TooltipModifier.swift | View modifier extension providing .tooltip() API for any SwiftUI view |
| Sources/TooltipKitUI/Models/TooltipPreferenceData.swift | Data model for tooltip preference values with frame and config |
| Sources/TooltipKitUI/Models/TooltipConfig.swift | Configuration struct with customization options and ArrowDirection enum |
| Sources/TooltipKitUI/Manager/TooltipManager.swift | State manager for tooltip dismissal coordination |
| Sample/Sample/ViewController.swift | Added button to navigate to SwiftUI preview screen |
| Sample/Sample/SwiftUI/TooltipPreviewScreen.swift | Interactive demo screen for testing tooltip customization |
| Sample/Sample.xcodeproj/project.pbxproj | Project file updates to include new SwiftUI files and TooltipKitUI dependency |
| README.md | Comprehensive documentation for TooltipKitUI with API reference and examples |
| Package.swift | Added TooltipKitUI library target to Swift package |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Rashidium
previously approved these changes
Dec 8, 2025
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.
No description provided.