Releases: Aeastr/Portal
🚀 Stable API Release
This marks the first stable release of the package. While there are no new features introduced in this version, the following changes are noteworthy:
✅ Official support for Swift 6
The package now builds successfully with Swift 6. There are no known compatibility issues with the latest toolchain.
⚖️ Semantic Versioning begins here
The public API is considered stable as of this release. Any future breaking changes will result in a major version bump. Minor updates will be reserved for new parameters, features, or internal improvements that don’t affect existing developers.
Patch → Item-Based Transitions & Conditional View Fixes
Fix:
Added missing #if DEBUG condition around debug-only code.
This patch corrects an oversight from 0.0.3 where a debug block was unintentionally included in release builds.
No new features or breaking changes were introduced.
Refer to v0.0.3 for the full changelog.
Item-Based Transitions & Conditional View Fixes
✨ New Features
- Item-Based Transitions: Portal now embraces a data-driven approach similar to SwiftUI's
.sheet(item:...)
!.portalTransition(item: ...)
: A new variant that drives transitions based on aBinding<Optional<Item>>
whereItem
isIdentifiable
. The transition is automatically keyed to the specificitem.id
..portalSource(item:)
: Helper modifier to mark a source view, automatically using the providedIdentifiable
item's ID as the key..portalDestination(item:)
: Helper modifier to mark a destination view, automatically using the providedIdentifiable
item's ID as the key.- Benefit: This greatly simplifies state management for common list/grid -> detail transitions. You no longer need separate boolean flags and state variables to track which item was selected for the transition – just bind directly to your optional item state!
🛠️ Fixes & Improvements
- Conditional View Presentation: Improved reliability and presentation behavior when
.portalSource
or.portalDestination
views are embedded within conditional statements (likeif
orswitch
). Transitions should now activate more consistently in these scenarios.
📚 Documentation
- The README and documentation comments have been updated with examples for both the
isActive
and newitem
variants.
Thank you for using Portal! Please report any issues or feedback to help continue improving the library.
Improved Overlay Management, New Extension, and Documentation Cleanup
This release brings improvements to the Portal library’s architecture, API clarity, and documentation, while also cleaning up assets and focusing platform support.
Overlay Management Refactor
- Overlay window logic has been refactored for better reliability and lifecycle awareness.
- The overlay is now properly added and removed as the app’s scene becomes active or inactive, preventing resource leaks and ensuring consistent behavior.
- Overlay management has been moved to a dedicated manager for safer integration.
New .portalContainer()
Extension + hideStatusBar
- Introduced a new
.portalContainer(hideStatusBar:)
view extension, allowing you to easily wrap any view in a portal container with a single modifier. - Both the extension and the
PortalContainer
struct now support an optionalhideStatusBar
parameter, giving you control over status bar visibility when the overlay is active.
API and Documentation Improvements
- All public APIs, including
PortalContainer
,.portalContainer
,.portalSource
,.portalDestination
, and.portalTransition
, now have DocC comments. - Documentation for wrapper structs and modifiers has been clarified and made consistent, with clear separation between internal types and public-facing modifiers.
- Usage examples in the README have been updated for accuracy and clarity, including step-by-step guidance.
- Parameter documentation is now consistent across the codebase and README.
Asset Cleanup
- Unused and outdated assets have been removed, and present ones optimized, reducing package size and improving maintainability.
Platform Support Update
- macOS support has been temporarily removed to focus on iOS stability and polish. All documentation and README references to macOS have been removed for now.
Other Notable Changes
- Improved code structure and organization for maintainability and future extensibility.
- Cleaned up and clarified feature lists in the README, removing overly markety language and ensuring technical accuracy.
- Ensured all UIKit operations are performed on the main thread for thread safety.
Thank you for using Portal! Please report any issues or feedback to help us continue improving the library.
Initial Release
Portal v0.0.1 lays the groundwork for seamless cross‐view element animations in SwiftUI.
It introduces:
PortalContainer: installs overlay & manages transition state
.portalSource(id:) / .portalDestination(id:): mark exactly which views to animate
.portalTransition(id:animate:animation:delay:layer:completion:): drive the floating layer with custom timing
Compatibility back to iOS 15 / macOS 13
Known Issues & Caveats
- Shadows may flicker during animation—use compositingGroup() or pixel‑snap workarounds
- Hide timing is tied to an explicit duration parameter; there’s no automatic duration extraction
- Edge‑case layout updates (e.g. dynamic view resizing) are not yet fully handled
API is still evolving—expect breaking changes in upcoming releases
Feel free to experiment and file issues or feature requests on GitHub!