Skip to content

Commit 15bca38

Browse files
committed
Merge branch 'navigation-refactor' of github.com:liveviewnative/liveview-client-swiftui into cached-navigation-title
2 parents 3274da8 + 81ea974 commit 15bca38

File tree

7 files changed

+2
-187
lines changed

7 files changed

+2
-187
lines changed

Sources/LiveViewNative/BuiltinRegistry.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,6 @@ struct BuiltinRegistry {
4747

4848
case "phx-form":
4949
PhxForm<R>(element: element, context: context)
50-
case "phx-hero":
51-
// PhxHeroView(element: element, context: context)
52-
fatalError()
5350
case "phx-submit-button":
5451
PhxSubmitButton(element: element, context: context)
5552
default:

Sources/LiveViewNative/LiveView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,6 @@ public struct LiveView<R: CustomRegistry>: View {
115115
}
116116

117117
private var navigationRoot: some View {
118-
NavStackEntryView(.init(url: session.url, coordinator: rootCoordinator))
118+
NavStackEntryView(.init(url: rootCoordinator.url, coordinator: rootCoordinator))
119119
}
120120
}

Sources/LiveViewNative/LiveViewNative.docc/Elements/Hero.md

Lines changed: 0 additions & 8 deletions
This file was deleted.

Sources/LiveViewNative/LiveViewNative.docc/SupportedElements.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ LiveViewNative supports DOM elements similar to but distinct from their Web coun
1919
- <doc:Image>
2020
- <doc:AsyncImage>
2121
- <doc:NavigationLink>
22-
- <doc:Hero>
2322
- <doc:Button>
2423

2524
### Forms

Sources/LiveViewNative/Views/Images/AsyncImage.swift

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,7 @@ struct AsyncImage<R: CustomRegistry>: View {
2121
SwiftUI.AsyncImage(url: url, scale: scale ?? 1, transaction: Transaction(animation: .default)) { phase in
2222
switch phase {
2323
case .success(let image):
24-
let configured = configureImage(image)
25-
configured
26-
// when using an AsyncImage in the hero transition overlay, it never resolves to the actual image
27-
// so when the source AsyncImage resolves, we use a preference to communicate the resulting
28-
// Image up to the overlay view, in case it needs to be used
29-
// .preference(key: HeroViewOverrideKey.self, value: HeroViewOverride(configured))
24+
configureImage(image)
3025
case .failure(let error):
3126
SwiftUI.Text(error.localizedDescription)
3227
case .empty:

Sources/LiveViewNative/Views/Layout Containers/Presentation Containers/NavigationLink.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ struct NavigationLink<R: CustomRegistry>: View {
1313
@ObservedElement private var element: ElementNode
1414
private let context: LiveContext<R>
1515
@EnvironmentObject private var navCoordinator: NavigationCoordinator<R>
16-
// @State private var source: HeroViewSourceKey.Value = nil
17-
// @State private var overrideView: HeroViewOverrideKey.Value = nil
1816
@State private var doNavigationCancellable: AnyCancellable?
1917

2018
init(element: ElementNode, context: LiveContext<R>) {

Sources/LiveViewNative/Views/PhxHeroView.swift

Lines changed: 0 additions & 166 deletions
This file was deleted.

0 commit comments

Comments
 (0)