ideasbugs 0.8.0 → 0.8.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: 19b7014d62b42ad3b3a763edf8907a7e1e0d2a67ab7b5ae1001d1f3440cc0d67
4
- data.tar.gz: 0f327125389c6ccc2d57f180b09d24607f383d03ac1d70ad13c9c250d3670842
3
+ metadata.gz: c4390de5357b3eeb970200b70ebb66af317917ab3c9b76337242b1d43238029b
4
+ data.tar.gz: ce0a7e31168ddd41c5499dd4ec05662e6c868b2a4a0c897da5f0ec3820bee1ab
5
5
  SHA512:
6
- metadata.gz: f1f27d97cda7c058c8d12c4498e30a57a9bc3899ce61aca61cb4cb5b542c4359b48e69d7a00c8867ddddc421cb561fb843039d6ac36bce4b164d9c140229e421
7
- data.tar.gz: 9bca34a90ac4d1e4f15ddfb8263a0e8690aa61cb669f1519e83c43481e5e64c05133ec5317c4432b02484af66fdf2123f4574fbdb9710930bd1c0cdb94d3ed0f
6
+ metadata.gz: b6423fb59ebc7bcf5dd39bc5b1f21109229bc02ac29962055bac1304aed09d19aba4c3b45e5aee9ff04cc94a9d01dd25990f635bbe4278c88be3173779e205e8
7
+ data.tar.gz: 6733174ba361b78a61ed0e45a4a4d7f230356aa23937a5bc02aad90083cd0532fc7beaa51ee7e86649bb4274ce80a915f43fb682062b16efe5a8a1b1dc0b6999
data/AGENTS.md CHANGED
@@ -112,7 +112,7 @@ customer.feedback.open
112
112
  ### Do not
113
113
 
114
114
  - **Do not copy the widget JavaScript into `app/javascript`, or add a `<script>` tag for it.** `ideasbugs_tag` renders what is needed and the engine serves the code same-origin. There is no build step and nothing for esbuild/importmap/Tailwind to know about.
115
- - **Do not build your own dashboard.** Use the mounted one; `config.admin_layout = "admin/application"` renders it inside an existing admin shell.
115
+ - **Do not rebuild the dashboard, and do not edit views inside the gem.** To put it inside an admin you already have, set `config.base_controller_class = "Admin::BaseController"` — it inherits that controller's layout, helpers, authentication and request context. For the shell alone, `config.admin_layout = "admin/application"`. Both work with nothing else wired up: the dashboard's own assets are declared by its views, not the layout.
116
116
  - **Do not expose screenshots by blob URL** — the gated route exists so a leaked signed URL cannot hand over a customer's screenshot.
117
117
  - **Do not set config outside the initializer.** `rate_limit` in particular is read once when the controller class loads; assigning config per-request mutates it process-wide.
118
118
  - **Do not convert the status strings to an enum** (see above).
@@ -134,6 +134,7 @@ Everything is optional; a fresh install works with zero config. Full list with c
134
134
  | `max_screenshots`, `max_screenshot_size` | `3`, `5.megabytes` | Enforced server-side |
135
135
  | `storage_service` | app default | A `storage.yml` key for a dedicated bucket |
136
136
  | `show_button`, `button_label` | `true`, localized | `false` = open from `data-ideasbugs-open` |
137
+ | `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. |
137
138
  | `admin_layout` | `ideasbugs/application` | Render inside your admin shell |
138
139
  | `rate_limit` | `{ to: 10, within: 60 }` | Rails 7.2+; ignored on 7.1. `nil` disables |
139
140
  | `mount_path` | `"/feedback"` | Keep in sync with `mount_ideasbugs at:` |
@@ -143,6 +144,8 @@ Everything is optional; a fresh install works with zero config. Full list with c
143
144
 
144
145
  | Symptom | Cause |
145
146
  | --- | --- |
147
+ | `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. |
148
+ | `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. |
146
149
  | `/feedback` returns 403 "Set Ideasbugs.config.authorize_admin to grant access" | Exactly what it says: still at the development-only default |
147
150
  | No Feedback button | `ideasbugs_tag` missing from the rendered layout, `config.enabled` false, or `show_button = false` with no opener of your own |
148
151
  | Submissions rejected with an invalid-token error | The layout is missing `csrf_meta_tags` |
@@ -152,6 +155,10 @@ Everything is optional; a fresh install works with zero config. Full list with c
152
155
 
153
156
  ---
154
157
 
158
+ ## One family
159
+
160
+ `testimonials`, `livechat`, `product_tours`, `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.
161
+
155
162
  ## Working on the gem itself
156
163
 
157
164
  ```bash
data/README.md CHANGED
@@ -340,6 +340,25 @@ against Ruby 3.2–3.4 (per-version Gemfiles in `gemfiles/`).
340
340
  reviews and NPS for Rails. Its NPS detractor hook feeds straight into this gem.
341
341
  - [SupeRails](https://superails.com) — Rails screencasts.
342
342
 
343
+ ## One family
344
+
345
+ Five Rails engines built on the same backbone, so adopting a second one is
346
+ mostly muscle memory:
347
+
348
+ | Gem | What it does |
349
+ | --- | --- |
350
+ | [testimonials](https://github.com/yshmarov/testimonials) | Testimonials, reviews and NPS — text and video, collected in your own app |
351
+ | **ideasbugs** *(this gem)* | In-app bug reports and feature requests, with a triage queue |
352
+ | [livechat](https://github.com/yshmarov/livechat) | Live chat between your visitors and your agents, self-hosted |
353
+ | [product_tours](https://github.com/yshmarov/product_tours) | Product tours and video tutorials, shown in-app at the right moment |
354
+ | [i18n_proofreading](https://github.com/yshmarov/i18n_proofreading) | In-context translation fixes suggested by your own users |
355
+
356
+ They share the install shape (`generate <gem>:install`, mount, one initializer),
357
+ the same host hooks (`base_controller_class` to inherit your admin's controller,
358
+ `admin_layout` for just the shell), a dashboard stylesheet scoped so it
359
+ cannot touch your own CSS, and migrations that follow your app's
360
+ `primary_key_type`.
361
+
343
362
  ## License
344
363
 
345
364
  MIT. Formerly published as `feedback_engine` — see the
@@ -60,16 +60,12 @@
60
60
  }
61
61
  }
62
62
 
63
- /* Page frame — the gem's own layout only. */
64
- .ib-page { margin: 0; background: var(--ib-bg); color: var(--ib-text); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
65
- .ib-index { overflow: hidden; }
66
- .ib-index .container { max-width: 1280px; display: flex; flex-direction: column; padding-bottom: 16px; }
67
- .ib-index .container > h1 { flex: 0 0 auto; margin-bottom: 14px; }
68
- .ib-show .feedback-panel { gap: 0; }
69
- .ib-show .detail-scroll { overflow: visible; }
70
-
71
63
  /* Dashboard components — any layout. */
72
64
  .ib-dashboard {
65
+ /* A scoping device, not a layout one: without this the wrapper would
66
+ become the flex/grid child that the content should be. */
67
+ display: contents;
68
+
73
69
  & * { box-sizing: border-box; }
74
70
  & a { color: var(--ib-accent); text-decoration: none; }
75
71
  & a:hover { text-decoration: underline; }
@@ -122,10 +118,6 @@
122
118
  & .feedback-panel { min-width: 0; display: flex; flex-direction: column; }
123
119
  & .feedback-panel .actions { flex: 0 0 auto; }
124
120
  & .feedback-panel .detail-scroll > .actions { margin: 0; }
125
- & /* Desktop triage: list on the left,
126
- & selected feedback on the right. */
127
- .ib-index,
128
- & .ib-index .container { height: 100vh; height: 100dvh; }
129
121
  & .triage-shell { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: minmax(320px, 400px) 1fr; gap: 16px; }
130
122
  & .triage-sidebar { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--ib-surface); border: 1px solid var(--ib-border); border-radius: 8px; overflow: hidden; }
131
123
  & .triage-sidebar .tabs { flex: 0 0 auto; margin: 12px 12px 0; padding: 0; background: transparent; border: 0; border-radius: 0; gap: 6px; flex-wrap: nowrap; }
@@ -159,6 +151,17 @@
159
151
  & .empty-state h2 { margin: 0 0 6px; font-size: 18px; }
160
152
  & .empty-state p { margin: 0; }
161
153
  & .mobile-back { display: none; }
162
- & /* Standalone show pages keep normal page scrolling. */
163
- .ib-show { min-height: 100vh; overflow: auto; }
164
154
  }
155
+
156
+ /* Page frame — the gem's own layout only. Last, so it wins the
157
+ specificity ties against the component layer above. */
158
+ .ib-page { margin: 0; background: var(--ib-bg); color: var(--ib-text); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
159
+ /* Desktop triage: list on the left, selected feedback on the right. */
160
+ .ib-index, .ib-index .container { height: 100vh; height: 100dvh; }
161
+ .ib-index { overflow: hidden; }
162
+ .ib-index .container { max-width: 1280px; display: flex; flex-direction: column; padding-bottom: 16px; }
163
+ .ib-index .container h1 { flex: 0 0 auto; margin-bottom: 14px; }
164
+ /* Standalone show pages keep normal page scrolling. */
165
+ .ib-show { min-height: 100vh; overflow: auto; }
166
+ .ib-show .feedback-panel { gap: 0; }
167
+ .ib-show .detail-scroll { overflow: visible; }
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Ideasbugs
4
- VERSION = '0.8.0'
4
+ VERSION = '0.8.2'
5
5
  end
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.8.0
4
+ version: 0.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yaroslav Shmarov