product_tours 0.2.1 → 0.2.2

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: c5697fc7dc20daec82a4712f08945016ca7711416a5508add8529c2746e78656
4
- data.tar.gz: 1166b36aa9fbf1459e0ff9398fc31bd7e63d8d40ddf0eae2d1ce3d19fb390c0a
3
+ metadata.gz: 6b0129cca5d98bc11af9f2a43127778eeb3a86b0b4ff06b8ae87dece57ad69c0
4
+ data.tar.gz: 74f8b8de528cc13b188113ed76ea79167b562cd9e4ad8753a278c41a0331ddfd
5
5
  SHA512:
6
- metadata.gz: d61b51725c95c9b74b89606939ac5c2ffacfdff0fecbb665311211bdee26b1cf153e1097e0ec6c9086e62e4bcc31cf503f144915e71796b4d02422b571195623
7
- data.tar.gz: d915baf97fe12b691469cc20b838876906ca7fe761b3d07878ad27e64b26b00555f84db4b66ce2fbf1f04e4ba173badb3c8feb261d242d33edf46967936d4c8c
6
+ metadata.gz: 3e0d415289f543c0dc05c0b5546eb60d7700619633b0aa9c9b3605c4b7f01658337f9f55728fbb00814eaa5f06d2f1cf89e7b90c4ec154c1847aad8deca91515
7
+ data.tar.gz: c28e01d259545cc4f09b930b46c340a3f7981336dc1fe1f681bedaf92f37543d53fb4657f6625affd793c4bce42560bdf1ced10eaf4683de8f00129c729a9ad2
data/AGENTS.md CHANGED
@@ -107,6 +107,7 @@ There are five options. That is the whole surface.
107
107
  | --- | --- | --- |
108
108
  | `authorize_admin` | development only | **Who can read and edit tutorials. Set before deploying.** |
109
109
  | `enabled` | everyone | Per-request gate for the widget and its endpoints |
110
+ | `base_controller_class` | `ActionController::Base` | Controller the dashboard inherits. Name your admin's and it adopts that layout, helpers, authentication and request context. Public endpoints never inherit it. |
110
111
  | `admin_layout` | `product_tours/application` | Render the dashboard inside your admin shell |
111
112
  | `mount_path` | `"/product_tours"` | Keep in sync with `mount_product_tours at:` |
112
113
  | `storage_service` | app default | Active Storage service for uploaded video (a `storage.yml` key) |
@@ -117,6 +118,8 @@ There are five options. That is the whole surface.
117
118
 
118
119
  | Symptom | Cause |
119
120
  | --- | --- |
121
+ | `NameError` for one of your own helpers in the dashboard | `isolate_namespace` scopes `helper` to the engine. Use `config.base_controller_class` so the dashboard inherits your helpers, rather than `admin_layout` alone. |
122
+ | `NotNullViolation` attaching a file on a uuid-keyed app | The tables were generated bigint. Set `primary_key_type` in `config.generators` before installing, or migrate them to uuid. |
120
123
  | The trigger button does nothing | No tutorial with that key, or it is still a draft, or `product_tours_tag` is missing from the layout. Subscribe to `product_tours.unresolved_trigger` to see which |
121
124
  | `/product_tours` returns 403 "Set ProductTours.config.authorize_admin to grant access" | Exactly what it says: still at the development-only default |
122
125
  | Key rejected on save | It must match `/\A[a-z0-9]+(?:[._-][a-z0-9]+)*\z/` — no capitals, no spaces |
@@ -127,6 +130,10 @@ There are five options. That is the whole surface.
127
130
 
128
131
  ---
129
132
 
133
+ ## One family
134
+
135
+ `testimonials`, `ideasbugs`, `livechat`, `i18n_proofreading` are the sibling engines. Same install shape, same host hooks (`base_controller_class`, `admin_layout`), same scoped dashboard CSS, same `primary_key_type`-aware migrations — so what you learn here transfers.
136
+
130
137
  ## Working on the gem itself
131
138
 
132
139
  ```bash
data/README.md CHANGED
@@ -359,6 +359,25 @@ Rails app and the exact point where installation or authoring felt confusing.
359
359
  translation proofreading.
360
360
  - [SupeRails](https://superails.com) — Rails screencasts.
361
361
 
362
+ ## One family
363
+
364
+ Five Rails engines built on the same backbone, so adopting a second one is
365
+ mostly muscle memory:
366
+
367
+ | Gem | What it does |
368
+ | --- | --- |
369
+ | [testimonials](https://github.com/yshmarov/testimonials) | Testimonials, reviews and NPS — text and video, collected in your own app |
370
+ | [ideasbugs](https://github.com/yshmarov/ideasbugs) | In-app bug reports and feature requests, with a triage queue |
371
+ | [livechat](https://github.com/yshmarov/livechat) | Live chat between your visitors and your agents, self-hosted |
372
+ | **product_tours** *(this gem)* | Product tours and video tutorials, shown in-app at the right moment |
373
+ | [i18n_proofreading](https://github.com/yshmarov/i18n_proofreading) | In-context translation fixes suggested by your own users |
374
+
375
+ They share the install shape (`generate <gem>:install`, mount, one initializer),
376
+ the same host hooks (`base_controller_class` to inherit your admin's controller,
377
+ `admin_layout` for just the shell), a dashboard stylesheet scoped so it
378
+ cannot touch your own CSS, and migrations that follow your app's
379
+ `primary_key_type`.
380
+
362
381
  ## License
363
382
 
364
383
  MIT. If it saved you a subscription, a
@@ -73,18 +73,6 @@
73
73
  }
74
74
  }
75
75
 
76
- /* Page frame — the gem's own layout only. */
77
- .pt-page { font-family: system-ui, -apple-system, "Segoe UI", sans-serif; letter-spacing: 0; }
78
- .pt-page { margin: 0; min-height: 100vh; background: var(--pt-bg); color: var(--pt-text); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
79
- .pt-index, .pt-index .container { height: 100vh; height: 100dvh; }
80
- .pt-index { overflow: hidden; }
81
- .pt-index .container { display: flex; max-width: 1280px; flex-direction: column; padding-bottom: 16px; }
82
- .pt-index .page-head { flex: 0 0 auto; }
83
- .pt-show { min-height: 100vh; overflow: auto; }
84
- .pt-show .post-panel { width: 100%; }
85
- .pt-show .detail-scroll { overflow: visible; }
86
- .pt-form-page .container { max-width: 820px; }
87
-
88
76
  /* Dashboard components — any layout. */
89
77
  .pt-dashboard {
90
78
  /* A scoping device, not a layout one: without this the wrapper would
@@ -224,3 +212,16 @@
224
212
  & .rich-content { min-height: 160px; padding: 12px; outline: none; overflow-wrap: anywhere; }
225
213
  & .rich-content:focus { box-shadow: inset 0 0 0 2px var(--pt-accent); }
226
214
  }
215
+
216
+ /* Page frame — the gem's own layout only. Last, so it wins the
217
+ specificity ties against the component layer above. */
218
+ .pt-page { font-family: system-ui, -apple-system, "Segoe UI", sans-serif; letter-spacing: 0; }
219
+ .pt-page { margin: 0; min-height: 100vh; background: var(--pt-bg); color: var(--pt-text); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
220
+ .pt-index, .pt-index .container { height: 100vh; height: 100dvh; }
221
+ .pt-index { overflow: hidden; }
222
+ .pt-index .container { display: flex; max-width: 1280px; flex-direction: column; padding-bottom: 16px; }
223
+ .pt-index .page-head { flex: 0 0 auto; }
224
+ .pt-show { min-height: 100vh; overflow: auto; }
225
+ .pt-show .post-panel { width: 100%; }
226
+ .pt-show .detail-scroll { overflow: visible; }
227
+ .pt-form-page .container { max-width: 820px; }
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ProductTours
4
- VERSION = '0.2.1'
4
+ VERSION = '0.2.2'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: product_tours
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yaroslav Shmarov