livechat 0.4.4 → 0.4.6
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/CHANGELOG.md +18 -0
- data/app/views/layouts/livechat/application.html.erb +11 -1
- data/app/views/livechat/conversations/show.html.erb +3 -0
- data/lib/livechat/version.rb +1 -1
- data/lib/livechat/widget.js +9 -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: daa490b0c4d70500971447e501bd9a8a83bbdf6c0d9d73e093becc84319b3988
|
|
4
|
+
data.tar.gz: 1199336c0fa8ab2ee68d338d01a5c80e60361611e257fdaff5228b3eb8f577c2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 12e47c2e8b8ff3c412531cbb88033aebde6aaebea5cd0f9fd28cc64ee16e79c32e8448a7e0b2f3d8b951e3f176d2e83566e280b6401d8897c765fd6b76428e7a
|
|
7
|
+
data.tar.gz: e32220e0923be59ccabdf99fb3ea93816c203dbecaae4faa769b84aeb36a3f96735f8719b1d8d2e3a1ca23f841ebc0d8b12b6ea66562f8c3e82ebb7e3484cb20
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.4.6
|
|
4
|
+
|
|
5
|
+
- Inbox conversation page no longer scrolls the whole page. It now fills the
|
|
6
|
+
viewport with the message thread as the only scrolling region and the reply
|
|
7
|
+
composer pinned at the bottom — so sending a reply keeps you at the newest
|
|
8
|
+
message instead of jumping the page up to the redirect anchor. (A real
|
|
9
|
+
chat-app layout, matching the visitor widget.)
|
|
10
|
+
|
|
11
|
+
## 0.4.5
|
|
12
|
+
|
|
13
|
+
- The widget's injected stylesheet now refreshes itself when its content
|
|
14
|
+
changes, instead of being injected once and never replaced. Turbo keeps
|
|
15
|
+
`<head>` across visits, so a tab that moved from an old widget build to a new
|
|
16
|
+
one (after you ship an update) could keep the stale `<style>` and show new
|
|
17
|
+
markup with old CSS until a full reload — now the styles are as
|
|
18
|
+
self-freshening as the fingerprinted script URL. (Fixes 0.4.4's composer and
|
|
19
|
+
header CSS not taking effect until a hard reload.)
|
|
20
|
+
|
|
3
21
|
## 0.4.4
|
|
4
22
|
|
|
5
23
|
- Expand / collapse the chat on desktop. A new header control grows the panel
|
|
@@ -115,9 +115,19 @@
|
|
|
115
115
|
display: flex; align-items: center; justify-content: center;
|
|
116
116
|
background: var(--accent); border-color: var(--accent); color: var(--accent-text);
|
|
117
117
|
border-radius: 10px; }
|
|
118
|
+
/* Conversation page: fill the viewport and scroll the THREAD, not the
|
|
119
|
+
page — so a reply never jumps the page, and the composer stays put. */
|
|
120
|
+
.lvc-convo, .lvc-convo .container { height: 100vh; height: 100dvh; }
|
|
121
|
+
.lvc-convo { overflow: hidden; }
|
|
122
|
+
.lvc-convo .container { display: flex; flex-direction: column; padding-bottom: 16px; }
|
|
123
|
+
.lvc-convo .breadcrumb, .lvc-convo .head-row, .lvc-convo .context-line,
|
|
124
|
+
.lvc-convo .flash { flex: 0 0 auto; }
|
|
125
|
+
.lvc-convo .card { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
|
|
126
|
+
.lvc-convo .thread { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
|
|
127
|
+
.lvc-convo .reply { flex: 0 0 auto; }
|
|
118
128
|
</style>
|
|
119
129
|
</head>
|
|
120
|
-
<body>
|
|
130
|
+
<body class="<%= yield(:body_class) %>">
|
|
121
131
|
<div class="container">
|
|
122
132
|
<% if flash[:alert].present? %>
|
|
123
133
|
<p class="flash alert"><%= flash[:alert] %></p>
|
data/lib/livechat/version.rb
CHANGED
data/lib/livechat/widget.js
CHANGED
|
@@ -831,7 +831,6 @@
|
|
|
831
831
|
// --- styles -------------------------------------------------------------------
|
|
832
832
|
|
|
833
833
|
function injectStyles() {
|
|
834
|
-
if (document.getElementById("lvc-styles")) return;
|
|
835
834
|
var css =
|
|
836
835
|
"#lvc-root{--lvc-accent:#2563eb;--lvc-accent-text:#fff;--lvc-surface:#fff;" +
|
|
837
836
|
"--lvc-text:#1c2024;--lvc-muted:#6b7280;--lvc-border:#e5e7eb;--lvc-bg:#f6f7f9;" +
|
|
@@ -963,6 +962,15 @@
|
|
|
963
962
|
"font-size:11px;font-weight:700;line-height:18px;align-items:center;" +
|
|
964
963
|
"justify-content:center;vertical-align:middle}";
|
|
965
964
|
|
|
965
|
+
// Re-inject only when the stylesheet content actually changed. Turbo keeps
|
|
966
|
+
// <head> across visits, so a tab that transitions from an old widget build
|
|
967
|
+
// to a new one (a shipped update) would otherwise keep the stale <style>
|
|
968
|
+
// and pin old CSS even while fresh widget.js runs. Comparing content makes
|
|
969
|
+
// the styles as self-freshening as the fingerprinted script URL.
|
|
970
|
+
var existing = document.getElementById("lvc-styles");
|
|
971
|
+
if (existing && existing.textContent === css) return;
|
|
972
|
+
if (existing) existing.remove();
|
|
973
|
+
|
|
966
974
|
var style = document.createElement("style");
|
|
967
975
|
style.id = "lvc-styles";
|
|
968
976
|
style.textContent = css;
|