turbo-native-initializer 0.0.9 → 0.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 63c66dce1bdfbd20b3121e4034d519eed50c5b6795ad483ec651a71d69121f14
4
- data.tar.gz: 4acf0d37888f87ebbbff7e0c7c625e0f796bbc2a548700239b0bdb855cc0e4cc
3
+ metadata.gz: 52ff35d610a3d846038f5e159c46a04fe6c9426d4975b09654c2a55744b9ae9d
4
+ data.tar.gz: 4646660e51e7e5e6b0721a19f9b74506305a5f119c2d3afe29310991f82fc7e6
5
5
  SHA512:
6
- metadata.gz: 808a4c22b0d0cb17628c68be7a652cf83d5109957d5d19cb9660529e6463cdfaeafa6c534ed117cb329838ea83ad70a75d57e6ce39a750f5f314c4572098b6b1
7
- data.tar.gz: 03477cafb6f46d4f8a6746d4537321f2c7a8b38d4a2b5fb59d9c6581d3696bbc6b3677cd539f7e7d5173ac53e2304f650991071df35f91ca84e969c6749730a8
6
+ metadata.gz: 5c147b87af14885a7561e407875cbf2b417cd5368409c0ee5e48b1a200c058500e565bd373e922f0e548fa5c27d9923fed2fd93353ea4cb3ac7478f28a38cb3b
7
+ data.tar.gz: b654caa260551c993b93fbb31d52e68ba38e2ae8959c55f6205df49972bf0db81e87482724f5f0fac10e84b0c5c90edc1eb47c4e1bb71b43feb6ea6280a7ec3b
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.0.10] - 2023-09-12
4
+
5
+ - Replace navigation when going to the same url (iOS)
6
+ - Better looking dismiss modal button (iOS)
7
+ - Disable link previews (iOS)
8
+
3
9
  ## [0.0.9] - 2023-09-11
4
10
 
5
11
  - Fix retry button in modals (iOS)
@@ -22,9 +22,14 @@ class TurboNavigationController : UINavigationController {
22
22
  }
23
23
 
24
24
  // - Create view controller appropriate for url/properties
25
- // - Navigate to that with the correct presentation
26
25
  let viewController = makeViewController(for: url, properties: properties)
27
- navigate(to: viewController, action: options.action, properties: properties)
26
+
27
+ // - Navigate to that with the correct presentation
28
+ if session.activeVisitable?.visitableURL != url {
29
+ navigate(to: viewController, action: options.action, properties: properties)
30
+ } else {
31
+ navigate(to: viewController, action: .replace, properties: properties)
32
+ }
28
33
 
29
34
  // Initiate the visit with Turbo
30
35
  if isVisitable(properties) {
@@ -13,7 +13,7 @@ final class ViewController: VisitableViewController, ErrorPresenter {
13
13
  }
14
14
 
15
15
  private lazy var dismissModalButton = {
16
- UIBarButtonItem(barButtonSystemItem: .cancel, target: self, action: #selector(dismissModal))
16
+ UIBarButtonItem(image: UIImage(systemName: "chevron.down"), style: .plain, target: self, action: #selector(dismissModal))
17
17
  }()
18
18
 
19
19
  @objc private func dismissModal() {
@@ -40,6 +40,7 @@ final class SceneDelegate: UIResponder {
40
40
 
41
41
  let webView = WKWebView(frame: .zero, configuration: configuration)
42
42
  webView.uiDelegate = self
43
+ webView.allowsLinkPreview = false
43
44
 
44
45
  let session = Session(webView: webView)
45
46
  session.delegate = self
@@ -24,7 +24,13 @@ class TurboNavigationController : UINavigationController {
24
24
  // - Create view controller appropriate for url/properties
25
25
  // - Navigate to that with the correct presentation
26
26
  let viewController = makeViewController(for: url, properties: properties)
27
- navigate(to: viewController, action: options.action, properties: properties)
27
+
28
+ // - Navigate to that with the correct presentation
29
+ if session.activeVisitable?.visitableURL != url {
30
+ navigate(to: viewController, action: options.action, properties: properties)
31
+ } else {
32
+ navigate(to: viewController, action: .replace, properties: properties)
33
+ }
28
34
 
29
35
  // Initiate the visit with Turbo
30
36
  if isVisitable(properties) {
@@ -13,7 +13,7 @@ final class ViewController: VisitableViewController, ErrorPresenter {
13
13
  }
14
14
 
15
15
  private lazy var dismissModalButton = {
16
- UIBarButtonItem(barButtonSystemItem: .cancel, target: self, action: #selector(dismissModal))
16
+ UIBarButtonItem(image: UIImage(systemName: "chevron.down"), style: .plain, target: self, action: #selector(dismissModal))
17
17
  }()
18
18
 
19
19
  @objc private func dismissModal() {
@@ -54,6 +54,7 @@ final class SceneDelegate: UIResponder {
54
54
 
55
55
  let webView = WKWebView(frame: .zero, configuration: configuration)
56
56
  webView.uiDelegate = self
57
+ webView.allowsLinkPreview = false
57
58
 
58
59
  let session = Session(webView: webView)
59
60
  session.delegate = self
@@ -1,3 +1,3 @@
1
1
  module TurboNativeInitializer
2
- VERSION = "0.0.9"
2
+ VERSION = "0.0.10"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: turbo-native-initializer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nixon
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-09-11 00:00:00.000000000 Z
11
+ date: 2023-09-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor