atomic_view 0.2.0 → 0.2.1

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: 8f8b65a708eb61c363c49739577ef43d71266873a2ec2f64aea3d5d1e376b626
4
- data.tar.gz: 167cbbac4465b3bc599c0f86f13f2a9f19f7771ca5e545d7cda0372f298a5755
3
+ metadata.gz: 2cfa124ea9d90829cb7c8879e99d63b4c0e5587f4ee294ca19557f9dc0b92699
4
+ data.tar.gz: 972a88497711cd0d4c1f9e323346886b9eed136c350120ab0e6adfbb62764f25
5
5
  SHA512:
6
- metadata.gz: 3e5ca41fad05a869f0307bd23f1fe8a8c180370accfdff2f3ca5ddc66c84dd77133d60e85d3f1acdc5f2d8b978a2f27aea9eb6755ff362c351e2c23002e3ebd0
7
- data.tar.gz: 35197eb341f652950d8718dc154eed20900f222eb9e4de4187b2fc2ab33b370d28f24cd2990296162f9cad9dc45b36196aff6bfb91cd3145aea6b3c4ef679b54
6
+ metadata.gz: 3696f874e0d5e627a572be114d091a18d451427f9e980e79b8b9304a3965b0d5a11060d44b0f7a7711364553199127778dc86ffc8d86d45851a65184250861fb
7
+ data.tar.gz: db66b0814f6c2b03969d1d4f0b422f1494768d24699d308e522deefcd5a629e77bf4382263a573765188ead91c986e0618b52700c8ff897852852ae823578049
@@ -34,8 +34,9 @@ module AtomicView
34
34
  class TimelineComponent < AtomicView::Component
35
35
  renders_many :items, "ItemComponent"
36
36
 
37
- def initialize(**options)
37
+ def initialize(continues: false, **options)
38
38
  super()
39
+ @continues = continues
39
40
  @options = options
40
41
  end
41
42
 
@@ -43,12 +44,15 @@ module AtomicView
43
44
  class_names("flex flex-col", @options[:class])
44
45
  end
45
46
 
47
+ # `continues:` says this render is one page of a longer feed -- the connector
48
+ # keeps going past the last item, into whatever the next turbo frame appends
49
+ # or the stream prepends above.
46
50
  def item_wrapper_class(index)
47
- class_names("relative flex gap-3.5", "pb-6" => !last?(index))
51
+ class_names("relative flex gap-3.5", "pb-6" => !last?(index) || @continues)
48
52
  end
49
53
 
50
54
  def render_line?(index)
51
- !last?(index)
55
+ !last?(index) || @continues
52
56
  end
53
57
 
54
58
  private
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AtomicView
4
- VERSION = "0.2.0"
4
+ VERSION = "0.2.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: atomic_view
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joel Warrington