Skip to content

Commit 2c26551

Browse files
committed
Remove HeroView usage
1 parent 322f360 commit 2c26551

File tree

5 files changed

+1
-20
lines changed

5 files changed

+1
-20
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/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>) {

0 commit comments

Comments
 (0)