ideasbugs 0.6.0 → 0.6.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: 6658dd5686d24377bb3d968e620282473b8b4769a02f11cfcc4ef5fbf2ba4ae9
4
- data.tar.gz: a12d3f136d6c693f020a56b703b1c3bd050527e2045585dc1a080197977827bb
3
+ metadata.gz: 5bbc8755793805b68de161f826264fd1efeb09d776c3d9ae13e85dadbd9857e8
4
+ data.tar.gz: dee97815aa8142790ab29a60d0f6f3d47a7933d38282ff83a42eca12a2bd0fe8
5
5
  SHA512:
6
- metadata.gz: b002bc9672adf86e27a2b59e62c88b745d4b6a1449777f78308627abc8894d92b9538191ff562e9b3cf271fed9adaa3ec0425ba05b9148505f3bab963112c59d
7
- data.tar.gz: f05923a9dd619623f615c756261100e0c726b6a80e592dd1dc9ada985226f88e76ed12a5333eb67d375e4478e94e1f40a160df4f46b44bebc779b592e55e1a93
6
+ metadata.gz: '09b4187c7b39c246ebe4e82fe99aa0cd5f55e537bd272af920f8bebc5aad2da715c690c32258924cb32230afab05cfd8b84b060972810d6b6f26c361d06b9e65'
7
+ data.tar.gz: 160aab501244d3ee7ebaa7c52a27854973e2cd454d9af6d3e4b0773186cb5ee5354540a27899e14efec0a59cbe8ae18193f85f0ff23becc203a099f358ff2393
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.6.1 (2026-07-26)
4
+
5
+ - The widget's injected stylesheet now refreshes when its content changes
6
+ instead of once-and-never-again — so a shipped widget update takes effect on
7
+ the next Turbo visit instead of needing a full page reload (Turbo keeps
8
+ `<head>` across visits, which could otherwise pin old CSS while fresh
9
+ widget.js runs). Backported from livechat 0.4.5.
10
+
3
11
  ## 0.6.0 (2026-07-26)
4
12
 
5
13
  - **Multi-tenancy.** Give each customer/tenant its own board — its own widget
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Ideasbugs
4
- VERSION = '0.6.0'
4
+ VERSION = '0.6.1'
5
5
  end
@@ -368,7 +368,6 @@
368
368
  // --- styles -------------------------------------------------------------------
369
369
 
370
370
  function injectStyles() {
371
- if (document.getElementById("idb-styles")) return;
372
371
  var css = [
373
372
  "#idb-button{position:fixed;bottom:16px;right:16px;z-index:" + Z + ";",
374
373
  "padding:10px 16px;border:0;border-radius:999px;cursor:pointer;",
@@ -416,6 +415,13 @@
416
415
  "#idb-dialog .idb-actions{padding-bottom:calc(0px + env(safe-area-inset-bottom))}",
417
416
  "}"
418
417
  ].join("");
418
+ // Re-inject only when the CSS changed. Turbo keeps <head> across visits, so
419
+ // a stale <style> would otherwise pin old CSS after a shipped update, even
420
+ // while fresh widget.js runs — as self-freshening as the fingerprinted URL.
421
+ var existing = document.getElementById("idb-styles");
422
+ if (existing && existing.textContent === css) return;
423
+ if (existing) existing.remove();
424
+
419
425
  var style = document.createElement("style");
420
426
  style.id = "idb-styles";
421
427
  style.textContent = css;
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ideasbugs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yaroslav Shmarov