feedback_engine 0.4.1 → 0.4.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 +4 -4
- data/CHANGELOG.md +9 -0
- data/README.md +36 -3
- data/Rakefile +14 -3
- data/config/locales/feedback_engine.ar.yml +1 -1
- data/config/locales/feedback_engine.bg.yml +1 -1
- data/config/locales/feedback_engine.bn.yml +1 -1
- data/config/locales/feedback_engine.de.yml +1 -1
- data/config/locales/feedback_engine.el.yml +1 -1
- data/config/locales/feedback_engine.en.yml +1 -1
- data/config/locales/feedback_engine.es.yml +1 -1
- data/config/locales/feedback_engine.fr.yml +1 -1
- data/config/locales/feedback_engine.hi.yml +1 -1
- data/config/locales/feedback_engine.hr.yml +1 -1
- data/config/locales/feedback_engine.id.yml +1 -1
- data/config/locales/feedback_engine.it.yml +1 -1
- data/config/locales/feedback_engine.ja.yml +1 -1
- data/config/locales/feedback_engine.ko.yml +1 -1
- data/config/locales/feedback_engine.lb.yml +1 -1
- data/config/locales/feedback_engine.nl.yml +1 -1
- data/config/locales/feedback_engine.pl.yml +1 -1
- data/config/locales/feedback_engine.pt.yml +1 -1
- data/config/locales/feedback_engine.ro.yml +1 -1
- data/config/locales/feedback_engine.ru.yml +1 -1
- data/config/locales/feedback_engine.th.yml +1 -1
- data/config/locales/feedback_engine.tr.yml +1 -1
- data/config/locales/feedback_engine.uk.yml +1 -1
- data/config/locales/feedback_engine.ur.yml +1 -1
- data/config/locales/feedback_engine.vi.yml +1 -1
- data/config/locales/feedback_engine.zh-CN.yml +1 -1
- data/lib/feedback_engine/version.rb +1 -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: 39367932533823837a4fd7aea327721b0a7602f1126c4aa22957da7f446e4216
|
|
4
|
+
data.tar.gz: 8083993df53341407986e39e1c35abdff31b81cb4e919757e541fe2213511658
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0a1c398155420791fab17aa5cfd0fadfd14402bbb08b13c551e7ae35f2409a5c22fb315980a92f5bd8edd69102b3e875533f71a3b61bc35ee35e26096dde8121
|
|
7
|
+
data.tar.gz: 31ad4cd63d5dba0dab5f97c237d3ebd49d54ed7bb78b7e13d890bc7f8df6bd41a199caebcdd9559f637e0479f63f1d2c48330ac70537470b9987f4c997faf9c8
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.4.2 (2026-07-25)
|
|
4
|
+
|
|
5
|
+
- The default title CTA (`feedback_engine.title`, used as the modal heading
|
|
6
|
+
and by host-rendered triggers) now reads "Send bug/feature request" instead
|
|
7
|
+
of "Send feedback", localized in all 26 bundled languages.
|
|
8
|
+
- The test suite migrated from RSpec to Minitest (development-only change;
|
|
9
|
+
nothing in the shipped gem is affected). `bundle exec rake test` and
|
|
10
|
+
`rake test:system` replace the rspec commands.
|
|
11
|
+
|
|
3
12
|
## 0.4.1 (2026-07-23)
|
|
4
13
|
|
|
5
14
|
- The widget JavaScript moved from `app/assets/` to `lib/` (it was always
|
data/README.md
CHANGED
|
@@ -171,10 +171,42 @@ any element and (optionally) hide the button:
|
|
|
171
171
|
config.show_button = false # optional
|
|
172
172
|
```
|
|
173
173
|
|
|
174
|
+
Gate the trigger with the same check the widget uses — `feedback_engine_tag`
|
|
175
|
+
renders nothing when `config.enabled` rejects the request, so an unguarded
|
|
176
|
+
trigger would be a dead button for those users. The gem ships a
|
|
177
|
+
`feedback_engine.title` label ("Send bug/feature request") in every bundled language, so
|
|
178
|
+
a localized trigger needs no keys of your own:
|
|
179
|
+
|
|
174
180
|
```erb
|
|
175
|
-
|
|
181
|
+
<% if FeedbackEngine.enabled?(request) %>
|
|
182
|
+
<button data-feedback-engine-open><%= t("feedback_engine.title") %></button>
|
|
183
|
+
<% end %>
|
|
176
184
|
```
|
|
177
185
|
|
|
186
|
+
### Loading the widget only where it's used
|
|
187
|
+
|
|
188
|
+
`feedback_engine_tag` in the layout puts the widget on every page. If your
|
|
189
|
+
only trigger lives on one page, render the tag on that page instead — for
|
|
190
|
+
example into the layout's `<head>` via `content_for`:
|
|
191
|
+
|
|
192
|
+
```erb
|
|
193
|
+
<%# app/views/layouts/application.html.erb %>
|
|
194
|
+
<head>
|
|
195
|
+
...
|
|
196
|
+
<%= yield :head %>
|
|
197
|
+
</head>
|
|
198
|
+
|
|
199
|
+
<%# app/views/users/show.html.erb — the page with the trigger %>
|
|
200
|
+
<% content_for :head, feedback_engine_tag %>
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
This is Turbo-safe: the script installs its document-level listeners once per
|
|
204
|
+
session and re-renders on `turbo:load` (see [Turbo](#turbo)), whether it
|
|
205
|
+
arrives on the first page load or a later visit. The trade-off: a
|
|
206
|
+
`data-feedback-engine-open` element on a page that never rendered the tag
|
|
207
|
+
silently does nothing — if triggers may appear on several pages, keep the tag
|
|
208
|
+
in the layout.
|
|
209
|
+
|
|
178
210
|
### Protecting the dashboard
|
|
179
211
|
|
|
180
212
|
The dashboard (index/show/triage) is gated by `config.authorize_admin`, which
|
|
@@ -291,11 +323,12 @@ document-level listeners once and re-renders on `turbo:load`.
|
|
|
291
323
|
|
|
292
324
|
```bash
|
|
293
325
|
bin/setup # or: bundle install
|
|
294
|
-
bundle exec
|
|
326
|
+
bundle exec rake test # unit + integration
|
|
327
|
+
bundle exec rake test:system # browser tests (headless Chrome)
|
|
295
328
|
bundle exec rubocop
|
|
296
329
|
```
|
|
297
330
|
|
|
298
|
-
Tests run against a dummy Rails app under `
|
|
331
|
+
Tests run against a dummy Rails app under `test/dummy`; the widget itself is
|
|
299
332
|
covered by Capybara system tests in a real browser. CI runs the suite across
|
|
300
333
|
Rails 7.1 / 7.2 / 8.0 / 8.1 and Ruby 3.2–3.4 (per-version Gemfiles live in
|
|
301
334
|
`gemfiles/`).
|
data/Rakefile
CHANGED
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require 'bundler/gem_tasks'
|
|
4
|
-
require '
|
|
4
|
+
require 'rake/testtask'
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
Rake::TestTask.new(:test) do |t|
|
|
7
|
+
t.libs << 'test'
|
|
8
|
+
t.test_files = FileList['test/**/*_test.rb'].exclude('test/system/**/*')
|
|
9
|
+
end
|
|
7
10
|
|
|
8
|
-
|
|
11
|
+
namespace :test do
|
|
12
|
+
desc 'Run browser (system) tests'
|
|
13
|
+
Rake::TestTask.new(:system) do |t|
|
|
14
|
+
t.libs << 'test'
|
|
15
|
+
t.test_files = FileList['test/system/**/*_test.rb']
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
task default: :test
|