ideasbugs 0.9.0 → 0.10.0
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/AGENTS.md +1 -1
- data/CHANGELOG.md +17 -0
- data/app/views/ideasbugs/feedbacks/_feedback_panel.html.erb +19 -9
- data/lib/ideasbugs/dashboard.css +20 -0
- data/lib/ideasbugs/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: 383c2bf2c3fc0168a96e1e418398bc643b19c4364440604912d1e546543fc62a
|
|
4
|
+
data.tar.gz: c40e84232ccc55b2394adbe9421f297a3c93e6cdff98c8d31e50f7c40e8e9148
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 32f3a5e503b09ae996a87890f4aceb11ab337db5bae30a711d019d834e1a639ee985e7a71cb380038d7ef2799e3df4d5b9e4d06b686021ac19bab7411ad1c329
|
|
7
|
+
data.tar.gz: 0d11c01642ba6dea041d336461bcb69a65184190dcc28d544ca605a6827107a4fa7729f36fb71865ab6c07d251d4f3ae4af912feed8ac790614ed757778005a2
|
data/AGENTS.md
CHANGED
|
@@ -177,6 +177,6 @@ Conventions this codebase holds to — follow them rather than the first thing t
|
|
|
177
177
|
- **Attachments stream through the engine's gate**, never a public blob URL.
|
|
178
178
|
- **The widget is plain JS served same-origin by the engine** — no build step, no framework.
|
|
179
179
|
- **The dummy app pins `config.active_job.queue_adapter = :test`.** Do not remove it or let it drift back to the `:async` default. Attaching a screenshot enqueues Active Storage's analysis job, and `:async` runs it on a background thread that checks out its own connection — writes no test transaction covers, landing in the middle of whatever runs next. That is a suite that fails order-dependently in a test which never created a row, and it is miserable to trace back.
|
|
180
|
-
- **`lib/ideasbugs/dashboard.css` is half shared.** Everything above the `GEM-SPECIFIC` banner is the design system all five gems in the family ship — the same tokens, the same `.page-head`/`.tabs`/`.filters`/`.card`/`.badge`/`button`, the same `.dashboard-shell` + `.record-row` + `.detail-panel` two-pane dashboard — identical in every repo apart from the `ib` prefix. Diff it against a sibling before changing it, and carry the change to the other four. Anything only this gem has goes below the banner. New dashboard markup reuses the shared class names rather than inventing a domain-specific one.
|
|
180
|
+
- **`lib/ideasbugs/dashboard.css` is half shared.** Everything above the `GEM-SPECIFIC` banner is the design system all five gems in the family ship — the same tokens, the same `.page-head`/`.tabs`/`.filters`/`.card`/`.badge`/`button`/`.status-switch`, the same `.dashboard-shell` + `.record-row` + `.detail-panel` two-pane dashboard — identical in every repo apart from the `ib` prefix. Diff it against a sibling before changing it, and carry the change to the other four. Anything only this gem has goes below the banner. New dashboard markup reuses the shared class names rather than inventing a domain-specific one.
|
|
181
181
|
- Every user-facing change bumps `lib/ideasbugs/version.rb` and adds a `CHANGELOG.md` entry that says what it costs, not only what it adds.
|
|
182
182
|
- Commit messages are prose that explains the tradeoff — read `git log` before writing one.
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.10.0
|
|
4
|
+
|
|
5
|
+
- **Triage is one switch now.** Open, In review and Resolved sit in a single pill
|
|
6
|
+
in the panel heading — the status the report is in is lit in that status's
|
|
7
|
+
colour, the other two are one click away. It replaces the row of `Mark in
|
|
8
|
+
review` / `Mark resolved` / `Reopen` buttons under the message, which grew a
|
|
9
|
+
button per status and read as three unrelated actions rather than one control.
|
|
10
|
+
The status badge left the heading with them: the switch already says it.
|
|
11
|
+
- **The switch is the family's, not this gem's.** It lives in the shared core of
|
|
12
|
+
`dashboard.css` as `.status-switch`, the same component livechat's
|
|
13
|
+
open/resolved switch now uses, so a third gem that needs one inherits it.
|
|
14
|
+
- No JavaScript: each segment is a submit button in one form, and the lit segment
|
|
15
|
+
is a `type="button"` so clicking the status a report already has cannot re-file
|
|
16
|
+
it. If you styled the old `.actions` status buttons, that is the breaking
|
|
17
|
+
change — `PATCH /feedbacks/:id` with `feedback[status]` is unchanged, so any
|
|
18
|
+
script or link that drove triage still works.
|
|
19
|
+
|
|
3
20
|
## 0.9.0
|
|
4
21
|
|
|
5
22
|
- **One design system across the family.** The stylesheet now opens with a
|
|
@@ -4,11 +4,25 @@
|
|
|
4
4
|
<span class="badge kind-<%= feedback.kind.to_s.parameterize %>">
|
|
5
5
|
<%= t("ideasbugs.kinds.#{feedback.kind}", default: feedback.kind.humanize) %>
|
|
6
6
|
</span>
|
|
7
|
-
<span class="badge status-<%= feedback.status %>">
|
|
8
|
-
<%= t("ideasbugs.statuses.#{feedback.status}", default: feedback.status.humanize) %>
|
|
9
|
-
</span>
|
|
10
7
|
<span class="case-id">#<%= feedback.id %></span>
|
|
11
8
|
</h1>
|
|
9
|
+
|
|
10
|
+
<%# The shared status switch, carrying the status the heading badge used to
|
|
11
|
+
state: the current one is lit and inert, every other one is a submit
|
|
12
|
+
that files the report under it. One form, no JS. %>
|
|
13
|
+
<%= form_with url: feedback_path(feedback), method: :patch, class: 'status-switch' do %>
|
|
14
|
+
<% Ideasbugs::Feedback::STATUSES.each do |status| %>
|
|
15
|
+
<% label = t("ideasbugs.statuses.#{status}", default: status.humanize) %>
|
|
16
|
+
<% if status == feedback.status %>
|
|
17
|
+
<button type="button" class="status-<%= status %> current" aria-current="true"><%= label %></button>
|
|
18
|
+
<% else %>
|
|
19
|
+
<button name="feedback[status]" value="<%= status %>" class="status-<%= status %>"
|
|
20
|
+
aria-label="<%= t("ideasbugs.dashboard.move_to_#{status}", default: "Mark #{status.humanize.downcase}") %>">
|
|
21
|
+
<%= label %>
|
|
22
|
+
</button>
|
|
23
|
+
<% end %>
|
|
24
|
+
<% end %>
|
|
25
|
+
<% end %>
|
|
12
26
|
</div>
|
|
13
27
|
|
|
14
28
|
<div class="detail-scroll">
|
|
@@ -49,13 +63,9 @@
|
|
|
49
63
|
<% end %>
|
|
50
64
|
</div>
|
|
51
65
|
|
|
66
|
+
<%# Status lives in the switch in the heading; only what a switch cannot say
|
|
67
|
+
is left here. %>
|
|
52
68
|
<div class="actions">
|
|
53
|
-
<% (Ideasbugs::Feedback::STATUSES - [feedback.status]).each do |status| %>
|
|
54
|
-
<%= button_to t("ideasbugs.dashboard.move_to_#{status}", default: "Mark #{status.humanize.downcase}"),
|
|
55
|
-
feedback_path(feedback),
|
|
56
|
-
method: :patch, params: { feedback: { status: status } },
|
|
57
|
-
class: ('primary' if status == 'resolved') %>
|
|
58
|
-
<% end %>
|
|
59
69
|
<%= button_to t('ideasbugs.dashboard.delete', default: 'Delete'),
|
|
60
70
|
feedback_path(feedback),
|
|
61
71
|
method: :delete, class: 'danger',
|
data/lib/ideasbugs/dashboard.css
CHANGED
|
@@ -144,6 +144,19 @@
|
|
|
144
144
|
& .actions form { display: inline; }
|
|
145
145
|
& .form-actions { padding-top: 12px; }
|
|
146
146
|
|
|
147
|
+
/* Status switch: one pill holding every state a record can be in, the state it
|
|
148
|
+
is in now lit. Each other segment is a submit button, so moving a record
|
|
149
|
+
takes one click and no JavaScript; the current segment is a `type="button"`
|
|
150
|
+
so clicking it cannot re-file the record it is already filed under. Two
|
|
151
|
+
states or five, the pill sizes itself. A gem tints the lit segment with its
|
|
152
|
+
own status colour — see the `GEM-SPECIFIC` section. */
|
|
153
|
+
& .status-switch { display: inline-flex; flex: 0 0 auto; margin: 0; padding: 3px; border: 1px solid var(--ib-border); border-radius: 999px; background: var(--ib-bg); }
|
|
154
|
+
& .status-switch button { min-height: 30px; padding: 0 12px; border: 0; border-radius: 999px; background: none; color: var(--ib-muted); font-size: 13px; font-weight: 700; white-space: nowrap; transition: background .16s ease, color .16s ease; }
|
|
155
|
+
& .status-switch button:hover { border: 0; background: color-mix(in srgb, var(--ib-muted) 12%, transparent); color: var(--ib-text); }
|
|
156
|
+
& .status-switch button.current { background: var(--ib-surface); color: var(--ib-text); box-shadow: 0 1px 2px rgba(15, 23, 42, .12); cursor: default; }
|
|
157
|
+
& .status-switch button.current:hover { background: var(--ib-surface); }
|
|
158
|
+
& .panel-head .status-switch { margin-left: auto; }
|
|
159
|
+
|
|
147
160
|
& .card { overflow: hidden; border: 1px solid var(--ib-border); border-radius: 12px; background: var(--ib-surface); }
|
|
148
161
|
& .card.pad { padding: 16px; overflow: visible; }
|
|
149
162
|
& table { width: 100%; border-collapse: collapse; }
|
|
@@ -266,6 +279,7 @@
|
|
|
266
279
|
& .dashboard-detail .detail-panel { min-height: calc(100vh - 64px); }
|
|
267
280
|
& .mobile-back { display: block; flex: 0 0 auto; margin: 4px 0 10px; font-size: 13px; }
|
|
268
281
|
& .panel-head h1 { font-size: 18px; }
|
|
282
|
+
& .status-switch button { padding: 0 9px; font-size: 12px; }
|
|
269
283
|
& dl { grid-template-columns: 1fr; gap: 3px; }
|
|
270
284
|
& dd { margin-bottom: 8px; }
|
|
271
285
|
}
|
|
@@ -294,6 +308,12 @@
|
|
|
294
308
|
& .badge.status-in_review { background: var(--ib-in-review); }
|
|
295
309
|
& .badge.status-resolved { background: var(--ib-resolved); }
|
|
296
310
|
|
|
311
|
+
/* The lit segment of the status switch carries the same colour as the badge
|
|
312
|
+
for that status, so the panel and the queue agree at a glance. */
|
|
313
|
+
& .status-switch button.current.status-open { color: var(--ib-open); }
|
|
314
|
+
& .status-switch button.current.status-in_review { color: var(--ib-in-review); }
|
|
315
|
+
& .status-switch button.current.status-resolved { color: var(--ib-resolved); }
|
|
316
|
+
|
|
297
317
|
& .shots { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
|
|
298
318
|
& .shots img { max-width: 280px; max-height: 200px; border: 1px solid var(--ib-border); border-radius: 8px; }
|
|
299
319
|
}
|
data/lib/ideasbugs/version.rb
CHANGED