livechat 0.9.0 → 0.9.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: 93a0ce2c43a9f0ba3f3ce569aac6758962a949919d924ada0283ebd043c34216
4
- data.tar.gz: 961e891c713d52e780a52149b87230c8661da575a53b7a9356865db39241803b
3
+ metadata.gz: 77c8f578ea3bb8e56ae6e93c3ffc3194bbec65a1952d7e7f3e2152986bc12388
4
+ data.tar.gz: bb5e62c493d8aef5e20a82884ed43213f2671543bee6e06d2aa1a352a55f9d25
5
5
  SHA512:
6
- metadata.gz: 20925768376d8fd25aef9323616e9e506c3e39081350ff25166a10eeaeceafbdd2a728a6015fe15407de8d7ed981381ccb1747bc95d10690bd4f9d8e7100b3e6
7
- data.tar.gz: 78e714d488cc3ef8a29aafe63dc80f08069825c1fc78ff5294ce9c2ccce00cd84ffc2d2a44ad0c5b126d42ea7871ff99147621f3e5384fb844761bed607a9856
6
+ metadata.gz: f77110e02430ef730ac85ad64be4a05f4fd588035c384284e14374ebebbb40b3c5537df63e3d6128d20db2f1891836f54c90f223a087f123fa946893b8ea63d1
7
+ data.tar.gz: da4da0a2cfa71838e93434cdf3d0d88fd5a6fc15a24754369977d7e3064d5052b28cf6d29055db044b3132acbaf50d832f97a4eb6ef2a565d58edd37e27bbd84
data/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.9.1
4
+
5
+ - **The conversation heading reads as one block.** The visitor's email and locale
6
+ moved out of their own row and sit directly under the name, inside a
7
+ `.panel-titles` wrapper, and the open/resolved switch is pinned to the right
8
+ edge of the heading row with `margin-left: auto` rather than relying on the
9
+ row's `space-between` — a long name no longer drags the switch inward. If you
10
+ targeted `.context-line` as a child of `.detail-panel`, it is now a child of
11
+ `.panel-head`.
12
+
3
13
  ## 0.9.0
4
14
 
5
15
  - **One design system across the family.** The stylesheet now opens with a
@@ -1,6 +1,17 @@
1
1
  <div class="detail-panel">
2
2
  <div class="panel-head">
3
- <h1><%= conversation.display_name %> <span class="case-id">#<%= conversation.id %></span></h1>
3
+ <%# The name with the visitor's context directly under it, so the status
4
+ toggle on the right of the row clears both. %>
5
+ <div class="panel-titles">
6
+ <h1><%= conversation.display_name %> <span class="case-id">#<%= conversation.id %></span></h1>
7
+ <%# One quiet line of live context: who the visitor is and the language to answer in. %>
8
+ <p class="muted context-line">
9
+ <% context = [] %>
10
+ <% context << conversation.visitor_email if conversation.visitor_email.present? %>
11
+ <% context << conversation.locale if conversation.locale.present? %>
12
+ <%= safe_join(context, ' · ') %>
13
+ </p>
14
+ </div>
4
15
  <% if conversation.open? %>
5
16
  <%= button_to resolve_conversation_path(conversation), method: :post,
6
17
  form_class: 'status-toggle-form',
@@ -20,14 +31,6 @@
20
31
  <% end %>
21
32
  </div>
22
33
 
23
- <%# One quiet line of live context: who the visitor is and the language to answer in. %>
24
- <p class="muted context-line">
25
- <% context = [] %>
26
- <% context << conversation.visitor_email if conversation.visitor_email.present? %>
27
- <% context << conversation.locale if conversation.locale.present? %>
28
- <%= safe_join(context, ' · ') %>
29
- </p>
30
-
31
34
  <div class="card">
32
35
  <% last = messages.last %>
33
36
  <% cable = livechat_cable_data("livechat:conversation:#{conversation.id}") %>
@@ -290,8 +290,15 @@
290
290
  & .record-row.unread .record-copy { font-weight: 700; }
291
291
  & .record-side .avatars { min-height: 26px; }
292
292
 
293
+ /* The panel heading: the name with the visitor's context directly under it,
294
+ and the switch pushed to the far right of the row whatever the name's
295
+ length. `margin-left: auto` rather than the row's `space-between`, so a
296
+ third element in the row could never pull the switch back in. */
297
+ & .panel-titles { display: flex; min-width: 0; flex-direction: column; gap: 2px; }
298
+ & .context-line { margin: 0; overflow-wrap: anywhere; }
299
+
293
300
  /* One switch reading open|resolved, sliding to the side it is on. */
294
- & .status-toggle-form { flex: 0 0 auto; }
301
+ & .status-toggle-form { flex: 0 0 auto; margin-left: auto; }
295
302
  & .status-toggle { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 0; width: 176px; min-height: 36px; padding: 3px; border-radius: 999px; border: 1px solid var(--lvc-border); background: var(--lvc-bg); color: var(--lvc-muted); overflow: hidden; }
296
303
  & .status-toggle::before { content: ""; position: absolute; z-index: 0; top: 3px; bottom: 3px; width: calc(50% - 3px); border-radius: 999px; background: var(--lvc-surface); box-shadow: 0 1px 2px rgba(15, 23, 42, .12); transition: left .16s ease; }
297
304
  & .status-toggle.is-open::before { left: 3px; }
@@ -312,7 +319,6 @@
312
319
  & .avatar.color-5 { background: #0891b2; }
313
320
 
314
321
  /* The thread: the visitor on the left, agents on the right. */
315
- & .context-line { margin: -6px 0 16px; overflow-wrap: anywhere; }
316
322
  & .thread { display: flex; flex-direction: column; gap: 4px; padding: 16px; }
317
323
  & .thread .who { font-size: 12px; color: var(--lvc-muted); margin: 10px 4px 2px; }
318
324
  & .thread .who.visitor { text-align: left; }
@@ -362,8 +368,7 @@
362
368
 
363
369
  /* Inside the thread pane only the messages scroll, so a reply never jumps the
364
370
  page and the composer stays put. */
365
- & .detail-panel .panel-head,
366
- & .detail-panel .context-line { flex: 0 0 auto; }
371
+ & .detail-panel .panel-head { flex: 0 0 auto; }
367
372
  & .detail-panel .card { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; border-radius: 8px; }
368
373
  & .detail-panel .thread { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
369
374
  & .detail-panel .reply { flex: 0 0 auto; }
@@ -376,7 +381,6 @@
376
381
  .lvc-convo .container { display: flex; flex-direction: column; padding-bottom: 16px; }
377
382
  .lvc-convo .breadcrumb,
378
383
  .lvc-convo .panel-head,
379
- .lvc-convo .context-line,
380
384
  .lvc-convo .flash { flex: 0 0 auto; }
381
385
  .lvc-convo .detail-panel { flex: 1 1 auto; min-height: 0; }
382
386
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Livechat
4
- VERSION = '0.9.0'
4
+ VERSION = '0.9.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: livechat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yaroslav Shmarov