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 +4 -4
- data/lib/atomic_view/components/timeline_component.rb +7 -3
- data/lib/atomic_view/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2cfa124ea9d90829cb7c8879e99d63b4c0e5587f4ee294ca19557f9dc0b92699
|
|
4
|
+
data.tar.gz: 972a88497711cd0d4c1f9e323346886b9eed136c350120ab0e6adfbb62764f25
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
data/lib/atomic_view/version.rb
CHANGED