collavre 0.8.2 → 0.8.3
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/app/assets/stylesheets/collavre/comments_popup.css +4 -2
- data/app/assets/stylesheets/collavre/creatives.css +7 -0
- data/app/assets/stylesheets/collavre/dark_mode.css +25 -5
- data/app/javascript/controllers/comments/popup_controller.js +19 -0
- data/app/javascript/controllers/creatives/expansion_controller.js +8 -0
- data/lib/collavre/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: 82e806ce0c2a6e03029c43d817fb83a6c8114e04bf13be10b05b16fefbeb253c
|
|
4
|
+
data.tar.gz: bfa7142c80cd7868c4ad9375a7b9f96ceed0b9b35ad031a6962f92a9d655f029
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e443416101117e0e3440f60d889f4c317fc19d59e5d3e92fdc511f1caf0fee52470e3e37b036709fbc63eea01d266c622e25ded80dc584d77c7fd0e2feed257b
|
|
7
|
+
data.tar.gz: 33e264807609298b92f8786f755bce2ef7846e653d6d5b4c7ff0eb1c267cf0273a56753d8e3758cf99e8300d14f1f6cfbde99b21e9f99e39645e44d3a0ec58e6
|
|
@@ -10,9 +10,11 @@
|
|
|
10
10
|
min-width: 200px;
|
|
11
11
|
min-height: 200px;
|
|
12
12
|
background: var(--surface-bg);
|
|
13
|
-
border:
|
|
13
|
+
border: var(--border-1) solid var(--color-active);
|
|
14
14
|
border-radius: var(--radius-3);
|
|
15
|
-
box-shadow: var(--shadow-3)
|
|
15
|
+
box-shadow: var(--shadow-3),
|
|
16
|
+
0 0 6px color-mix(in srgb, var(--color-active) 25%, transparent),
|
|
17
|
+
0 0 14px color-mix(in srgb, var(--color-active) 12%, transparent);
|
|
16
18
|
padding: 1em;
|
|
17
19
|
flex-direction: column;
|
|
18
20
|
transition: top 0.25s ease, left 0.25s ease, width 0.25s ease, height 0.25s ease,
|
|
@@ -440,6 +440,13 @@ creative-tree-row:not([expanded]) .creative-toggle-btn {
|
|
|
440
440
|
background-color: var(--border-drag-over);
|
|
441
441
|
}
|
|
442
442
|
|
|
443
|
+
creative-tree-row.chat-active .creative-row {
|
|
444
|
+
border: var(--border-1) solid var(--color-active);
|
|
445
|
+
border-radius: var(--radius-2);
|
|
446
|
+
box-shadow: 0 0 6px color-mix(in srgb, var(--color-active) 25%, transparent),
|
|
447
|
+
0 0 14px color-mix(in srgb, var(--color-active) 12%, transparent);
|
|
448
|
+
}
|
|
449
|
+
|
|
443
450
|
.creative-row:hover,
|
|
444
451
|
.creative-row.level-1:hover,
|
|
445
452
|
.creative-row.level-2:hover,
|
|
@@ -79,12 +79,7 @@ body.dark-mode {
|
|
|
79
79
|
/* ============================================================================
|
|
80
80
|
* BASE ELEMENT STYLES
|
|
81
81
|
* ============================================================================ */
|
|
82
|
-
html {
|
|
83
|
-
scroll-behavior: smooth;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
82
|
@media (prefers-reduced-motion: reduce) {
|
|
87
|
-
html { scroll-behavior: auto; }
|
|
88
83
|
|
|
89
84
|
/* Collapse decorative transitions to instant; state changes still
|
|
90
85
|
apply but without visible motion (hover bg, theme switch, etc.). */
|
|
@@ -302,3 +297,28 @@ input[type="datetime-local"]::-webkit-datetime-edit-minute-field {
|
|
|
302
297
|
.inline-block {
|
|
303
298
|
display: inline-block;
|
|
304
299
|
}
|
|
300
|
+
|
|
301
|
+
/* --- Dark mode: stronger glow for visibility on dark backgrounds --- */
|
|
302
|
+
body.dark-mode #comments-popup {
|
|
303
|
+
box-shadow: var(--shadow-3),
|
|
304
|
+
0 0 8px color-mix(in srgb, var(--color-active) 45%, transparent),
|
|
305
|
+
0 0 20px color-mix(in srgb, var(--color-active) 25%, transparent);
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
body.dark-mode creative-tree-row.chat-active .creative-row {
|
|
309
|
+
box-shadow: 0 0 8px color-mix(in srgb, var(--color-active) 45%, transparent),
|
|
310
|
+
0 0 20px color-mix(in srgb, var(--color-active) 25%, transparent);
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
@media (prefers-color-scheme: dark) {
|
|
314
|
+
body:not(.light-mode):not(.dark-mode) #comments-popup {
|
|
315
|
+
box-shadow: var(--shadow-3),
|
|
316
|
+
0 0 8px color-mix(in srgb, var(--color-active) 45%, transparent),
|
|
317
|
+
0 0 20px color-mix(in srgb, var(--color-active) 25%, transparent);
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
body:not(.light-mode):not(.dark-mode) creative-tree-row.chat-active .creative-row {
|
|
321
|
+
box-shadow: 0 0 8px color-mix(in srgb, var(--color-active) 45%, transparent),
|
|
322
|
+
0 0 20px color-mix(in srgb, var(--color-active) 25%, transparent);
|
|
323
|
+
}
|
|
324
|
+
}
|
|
@@ -157,6 +157,8 @@ export default class extends Controller {
|
|
|
157
157
|
this.element.dataset.canComment = canComment ? 'true' : 'false'
|
|
158
158
|
this.titleTarget.textContent = snippet
|
|
159
159
|
|
|
160
|
+
this._markChatActiveRow(resolvedCreativeId)
|
|
161
|
+
|
|
160
162
|
this.prepareSize()
|
|
161
163
|
|
|
162
164
|
this.showPopup()
|
|
@@ -184,6 +186,8 @@ export default class extends Controller {
|
|
|
184
186
|
this.element.dataset.canComment = canComment ? 'true' : 'false'
|
|
185
187
|
this.titleTarget.textContent = snippet
|
|
186
188
|
|
|
189
|
+
this._markChatActiveRow(resolvedCreativeId)
|
|
190
|
+
|
|
187
191
|
this.showPopup()
|
|
188
192
|
|
|
189
193
|
await this.notifyChildControllers({ creativeId: resolvedCreativeId, canComment })
|
|
@@ -268,6 +272,8 @@ export default class extends Controller {
|
|
|
268
272
|
}
|
|
269
273
|
}))
|
|
270
274
|
|
|
275
|
+
this._clearChatActiveRow()
|
|
276
|
+
|
|
271
277
|
this.element.style.display = 'none'
|
|
272
278
|
this.element.classList.remove('open')
|
|
273
279
|
this.element.style.width = ''
|
|
@@ -855,4 +861,17 @@ export default class extends Controller {
|
|
|
855
861
|
this.openFromUrlTimeout = null
|
|
856
862
|
}
|
|
857
863
|
}
|
|
864
|
+
|
|
865
|
+
_markChatActiveRow(creativeId) {
|
|
866
|
+
this._clearChatActiveRow()
|
|
867
|
+
if (!creativeId) return
|
|
868
|
+
const row = document.querySelector(`creative-tree-row[creative-id="${creativeId}"]`)
|
|
869
|
+
if (row) row.classList.add('chat-active')
|
|
870
|
+
}
|
|
871
|
+
|
|
872
|
+
_clearChatActiveRow() {
|
|
873
|
+
document.querySelectorAll('creative-tree-row.chat-active').forEach(el => {
|
|
874
|
+
el.classList.remove('chat-active')
|
|
875
|
+
})
|
|
876
|
+
}
|
|
858
877
|
}
|
|
@@ -100,6 +100,7 @@ export default class extends Controller {
|
|
|
100
100
|
const childrenDiv = this.childrenContainerFor(row)
|
|
101
101
|
this.ensureLoaded(row, childrenDiv).then((hasChildren) => {
|
|
102
102
|
if (!hasChildren || !childrenDiv) {
|
|
103
|
+
row.hasChildren = false
|
|
103
104
|
this.collapseRow(row, { persist: false })
|
|
104
105
|
return
|
|
105
106
|
}
|
|
@@ -177,6 +178,13 @@ export default class extends Controller {
|
|
|
177
178
|
|
|
178
179
|
syncInitialState(row) {
|
|
179
180
|
const childrenDiv = this.childrenContainerFor(row)
|
|
181
|
+
|
|
182
|
+
// If the row claims it has children but no children container exists,
|
|
183
|
+
// correct the hasChildren flag so the chevron is hidden.
|
|
184
|
+
if (row.hasChildren && !childrenDiv) {
|
|
185
|
+
row.hasChildren = false
|
|
186
|
+
}
|
|
187
|
+
|
|
180
188
|
const shouldExpand =
|
|
181
189
|
this.allExpanded ||
|
|
182
190
|
row.expanded ||
|
data/lib/collavre/version.rb
CHANGED