studio-engine 0.47.1 → 0.47.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 +49 -0
- data/README.md +19 -9
- data/app/services/studio/email_catalog.rb +50 -19
- data/app/views/studio/emails/show.html.erb +16 -2
- data/lib/studio/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: 918309978020f15861f65e0a861325bb7ba93046b4d9039aa1aaa1ae6da22c95
|
|
4
|
+
data.tar.gz: 682e1529aeca6541d08ab5173028bd407b3538fed1e1b9dd3fb88b70b11e0145
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3da6d45e75a8adcbb72b39117e416381b6c6962fe4b831ee2a90d4feddd9b60a4c63b969cc85d442780685d0a0c2916fe423e7dd11c1df392d2fa06a3f9267e4
|
|
7
|
+
data.tar.gz: 40e41ee896e9375ebeb9522afb78a9ed481c57c6f15f7a2681a9a51211cf861875a82125bdc52cc6a3b5b9d9820d46e72bd6b2b961822f46ee39367300564755
|
data/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,55 @@ The format is [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). This pro
|
|
|
6
6
|
|
|
7
7
|
### Changed
|
|
8
8
|
|
|
9
|
+
- **No pre-registered email seeds a logo — `magic_link` was the last one, and it
|
|
10
|
+
seeded the Studio wordmark onto the SIGN-IN email.** `STANDARD`'s `magic_link`
|
|
11
|
+
entry carried `logo: "emails/logo-horizontal.png"`, and
|
|
12
|
+
`Studio::EmailCatalog.register` merges on `logo.presence` — an omitted key
|
|
13
|
+
**inherits**. So any host that registered this email for an unrelated reason (a
|
|
14
|
+
relabel, attaching a preview builder) inherited the McRitchie Studio wordmark
|
|
15
|
+
into its own branded sign-in email without ever naming it.
|
|
16
|
+
|
|
17
|
+
**ACTION REQUIRED — one consumer, and only one:**
|
|
18
|
+
|
|
19
|
+
| Consumer | Was it affected? | What to do |
|
|
20
|
+
|---|---|---|
|
|
21
|
+
| **mcritchie-studio** | **Yes.** Registers `magic_link` to attach a preview builder and names no logo, so it INHERITED the mark it owns. | Add `logo: "emails/logo-horizontal.png"` to the `register("magic_link", …)` call already in `config/initializers/studio_emails.rb`. Without it the sign-in banner loses the wordmark. |
|
|
22
|
+
| turf-monster | No. Registers `emails/turf-logo.png` of its own. | Nothing. |
|
|
23
|
+
| moms-app, mcritchie-industries, acquisition-studio | No — and they are who this is for. | Nothing. |
|
|
24
|
+
|
|
25
|
+
The asset still ships in this gem, so the hub's one-line opt-in resolves today.
|
|
26
|
+
The tidier end-state is the hub shipping its own copy of the file, since the
|
|
27
|
+
mark is its identity and not the engine's.
|
|
28
|
+
|
|
29
|
+
**This was an UPGRADE TRAP, not a live leak — worth stating precisely, because
|
|
30
|
+
it was first raised as an incident and is not one.** The three apps carrying no
|
|
31
|
+
email initializer pin 0.32.1 / 0.32.2 / 0.13.1, and
|
|
32
|
+
`app/services/studio/email_catalog.rb` does not exist in the gem they run —
|
|
33
|
+
verified by `git ls-tree` at each tag and against the installed gem. They
|
|
34
|
+
inherited nothing. The defect was that a routine dependency bump would have put
|
|
35
|
+
another brand's wordmark on three apps' most-sent email, silently, with no code
|
|
36
|
+
change of their own. Check reachability at the PIN, never from `main`: "HEAD
|
|
37
|
+
seeds it" and "the app registers nothing" are both true and together say nothing
|
|
38
|
+
about what that app RUNS.
|
|
39
|
+
|
|
40
|
+
**Why the whole seed and not just the one entry.** This mechanism has now been
|
|
41
|
+
fixed three times — turf-monster's `magic_link`, then `newsletter_subscribed`,
|
|
42
|
+
then this — because each fix pinned the instance and left the rule unwritten.
|
|
43
|
+
`test/lib/studio/email_catalog_test.rb` now reads `STANDARD` and fails on ANY
|
|
44
|
+
entry carrying a logo, so the next entry cannot repeat it. Artwork still rides
|
|
45
|
+
the gem, which is what gives a new app good-looking mail on day one; the line is
|
|
46
|
+
at branding, not at engine assets.
|
|
47
|
+
|
|
48
|
+
The asymmetry is what decides it: a host that wanted the mark and lost it sees a
|
|
49
|
+
missing logo — visible, one line to restore. A host that never asked inherits
|
|
50
|
+
another brand's identity into its inbox — invisible, and the ALT TEXT AGREES
|
|
51
|
+
WITH IT, because `Studio::Banner` sets `logo_alt` from `Studio.app_name`. turf's
|
|
52
|
+
read `alt="Turf Monster"` over the Studio wordmark for weeks.
|
|
53
|
+
|
|
54
|
+
On `/admin/emails`, "Standard" and "None" are now the same picture for an app
|
|
55
|
+
that registers no mark, so the page says so rather than offering a choice that
|
|
56
|
+
changes nothing.
|
|
57
|
+
|
|
9
58
|
- **`email_change_confirmation` leaves the pre-registered set; `newsletter_subscribed`
|
|
10
59
|
joins it.** `STANDARD` means "the emails EVERY Studio app sends", and only
|
|
11
60
|
turf-monster sends an email-change confirmation — which it **already registers
|
data/README.md
CHANGED
|
@@ -456,17 +456,27 @@ this wrong silent:
|
|
|
456
456
|
already had, `""` **clears** it, and a path **sets** it. So deleting a `logo: ""`
|
|
457
457
|
line does not remove the logo — it restores the inherited one.
|
|
458
458
|
|
|
459
|
-
|
|
459
|
+
**No `STANDARD` entry seeds a logo** — not `magic_link`, not
|
|
460
|
+
`newsletter_subscribed`, and not the next one added. A host that names no mark
|
|
461
|
+
sends no mark, and there is nothing to opt out of.
|
|
460
462
|
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
463
|
+
That is an invariant, not a coincidence: `test/lib/studio/email_catalog_test.rb`
|
|
464
|
+
reads `STANDARD` and fails on any entry carrying a logo, because this mechanism
|
|
465
|
+
was fixed three times as an instance before it was fixed as a rule. Artwork still
|
|
466
|
+
rides the gem, which is what gives a new app good-looking mail on day one.
|
|
465
467
|
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
468
|
+
**Adopting a mark** is one line, in an initializer or on `/admin/emails`:
|
|
469
|
+
|
|
470
|
+
```ruby
|
|
471
|
+
Studio::EmailCatalog.register("magic_link", logo: "emails/our-mark.png")
|
|
472
|
+
```
|
|
473
|
+
|
|
474
|
+
If you are **bumping this gem** ACROSS this change — that is, from any release
|
|
475
|
+
that still seeded the mark, which is **every version up to and including
|
|
476
|
+
0.47.0** — note what CHANGED rather than what to fear: `magic_link` used to seed
|
|
477
|
+
the Studio wordmark, so an app that registered no logo inherited it. If your app
|
|
478
|
+
WANTED that mark, it now has to name it — see the CHANGELOG entry, which lists
|
|
479
|
+
who that affects.
|
|
470
480
|
|
|
471
481
|
**Why layered rather than composited.** Drawing the text into the image gives
|
|
472
482
|
pixel-exact brand typography everywhere, but it cannot have an ANIMATED
|
|
@@ -142,7 +142,13 @@ module Studio
|
|
|
142
142
|
# top. default_asset above stays the flat <img> for a mailer that has not
|
|
143
143
|
# adopted the layered banner.
|
|
144
144
|
background: "emails/magic-link-background.gif",
|
|
145
|
-
logo:
|
|
145
|
+
# NO logo: KEY — the same rule newsletter_subscribed above follows, and
|
|
146
|
+
# for the same reason. It seeded "emails/logo-horizontal.png" (the
|
|
147
|
+
# McRITCHIE STUDIO wordmark) into every host that registers this email
|
|
148
|
+
# without naming a mark, because register() merges on `logo.presence`
|
|
149
|
+
# and an omitted key INHERITS. On the SIGN-IN email, which is the most-
|
|
150
|
+
# sent email most of these apps have. Full reasoning under NO DEFAULT
|
|
151
|
+
# LOGO below; the guards are in test/integration/magic_link_logo_test.rb.
|
|
146
152
|
# The DEFAULT wording, overridable per app on /admin/emails. {name} is
|
|
147
153
|
# filled from whoever the mailer says the recipient is.
|
|
148
154
|
header: "Welcome {name}!",
|
|
@@ -199,10 +205,14 @@ module Studio
|
|
|
199
205
|
ASPECT_RATIO = 2.0
|
|
200
206
|
MAX_WIDTH = 1200
|
|
201
207
|
|
|
202
|
-
# NO DEFAULT LOGO, deliberately — on any route.
|
|
208
|
+
# NO DEFAULT LOGO, deliberately — on any route, for any entry.
|
|
203
209
|
#
|
|
204
|
-
# There is no DEFAULT_LOGO constant here, and
|
|
205
|
-
#
|
|
210
|
+
# There is no DEFAULT_LOGO constant here, and NO entry in STANDARD seeds a
|
|
211
|
+
# logo. That is now an invariant over the whole seed rather than a fact about
|
|
212
|
+
# two entries that happen to be clean — asserted in
|
|
213
|
+
# test/lib/studio/email_catalog_test.rb, which reads STANDARD and fails on any
|
|
214
|
+
# entry carrying a mark. The instance kept coming back; the rule is what
|
|
215
|
+
# stops it.
|
|
206
216
|
#
|
|
207
217
|
# The constant went first (DEFAULT_FOOTER_LOGO). It was
|
|
208
218
|
# emails/logo-horizontal.png — the white "McRITCHIE STUDIO" wordmark —
|
|
@@ -235,26 +245,47 @@ module Studio
|
|
|
235
245
|
# (`Studio::EmailCatalog.register("newsletter_subscribed", logo: "emails/our-mark.png")`,
|
|
236
246
|
# a path THAT APP ships) or on /admin/emails.
|
|
237
247
|
#
|
|
238
|
-
#
|
|
239
|
-
#
|
|
240
|
-
#
|
|
241
|
-
#
|
|
242
|
-
#
|
|
243
|
-
#
|
|
244
|
-
#
|
|
245
|
-
#
|
|
246
|
-
# the
|
|
247
|
-
#
|
|
248
|
-
#
|
|
248
|
+
# THE THIRD INSTANCE closed the question the first two left open: should
|
|
249
|
+
# STANDARD seed a logo AT ALL? It should not, and now none does.
|
|
250
|
+
#
|
|
251
|
+
# magic_link was the last holdout, and the sharpest — it seeded the wordmark
|
|
252
|
+
# onto the SIGN-IN email, the most-sent email most Studio apps have. Two
|
|
253
|
+
# narrow fixes (turf's magic_link, then newsletter_subscribed) had already
|
|
254
|
+
# been made, and the mechanism produced a third anyway. So the rule moved
|
|
255
|
+
# from the instance to the seed: a shared default may not carry anybody's
|
|
256
|
+
# identity, and the guard reads STANDARD rather than a list of keys, because
|
|
257
|
+
# the failure mode is the NEXT entry, written by someone who never read this.
|
|
258
|
+
#
|
|
259
|
+
# WHY THE ASYMMETRY DECIDES IT. A host that wanted the mark and lost it sees
|
|
260
|
+
# a missing logo — visible, and one line to restore. A host that never asked
|
|
261
|
+
# inherits another brand's identity into its own inbox — invisible, and the
|
|
262
|
+
# ALT TEXT AGREES WITH IT, because Studio::Banner sets logo_alt from
|
|
263
|
+
# Studio.app_name. turf's read "Turf Monster" over the Studio wordmark for
|
|
264
|
+
# weeks and no one reviewing that email could have seen it. Given one error
|
|
265
|
+
# to make, make the loud one.
|
|
266
|
+
#
|
|
267
|
+
# WHO PAID FOR THIS, named rather than left to be discovered: McRitchie
|
|
268
|
+
# Studio, the hub, registers magic_link to attach a preview builder and names
|
|
269
|
+
# no logo — so it INHERITED the mark it owns, and ships no copy of the file
|
|
270
|
+
# itself. It opts in with `logo: "emails/logo-horizontal.png"` on the
|
|
271
|
+
# register() call it already makes. The asset stays in this gem so that line
|
|
272
|
+
# resolves today; the hub shipping its own copy is the tidier end-state, as
|
|
273
|
+
# the mark is its identity and not the engine's. turf-monster names
|
|
274
|
+
# emails/turf-logo.png and was never affected.
|
|
275
|
+
#
|
|
276
|
+
# It was an UPGRADE TRAP rather than a live leak, which is the sharper shape
|
|
277
|
+
# and the reason this was worth fixing before anyone was hurt. The apps
|
|
278
|
+
# carrying no email initializer (moms-app, mcritchie-industries,
|
|
279
|
+
# acquisition-studio) are pinned far enough back — 0.32.1 / 0.32.2 / 0.13.1 —
|
|
280
|
+
# that this file does not exist in the gem they run, so they inherited
|
|
281
|
+
# nothing. The routine dependency bump that brought one forward would have
|
|
282
|
+
# put another brand's mark in its most-sent email, with no code change of its
|
|
283
|
+
# own and nobody looking for it.
|
|
249
284
|
#
|
|
250
285
|
# CHECK REACHABILITY AT THE PIN, never from main: `git ls-tree` at the tag the
|
|
251
286
|
# app resolves, or read the installed gem. "HEAD seeds it" plus "the app
|
|
252
287
|
# registers nothing" are both true and together say nothing about what that
|
|
253
288
|
# app RUNS — a wrong conclusion this very comment was first drafted with.
|
|
254
|
-
#
|
|
255
|
-
# Tracked, with the design question it raises — should STANDARD seed a logo at
|
|
256
|
-
# all, or should hosts opt in? — at /tasks/guard-wordmark-on-engine-bump.
|
|
257
|
-
# Fixing magic_link alone leaves the next entry free to repeat this.
|
|
258
289
|
|
|
259
290
|
# The footer band. Dark on purpose: it closes the white card, and a light
|
|
260
291
|
# sign-off floating under body copy reads as part of the message rather than
|
|
@@ -312,8 +312,15 @@
|
|
|
312
312
|
</div>
|
|
313
313
|
|
|
314
314
|
<%# THE LOGO — three states, because a URL box can only express two.
|
|
315
|
-
Standard
|
|
316
|
-
Hidden is the deliberate "no logo" that blank cannot say.
|
|
315
|
+
Standard is the mark THIS APP registered, Custom is what it uploaded,
|
|
316
|
+
Hidden is the deliberate "no logo" that blank cannot say.
|
|
317
|
+
|
|
318
|
+
"Standard" is no longer a shared mark. No STANDARD entry seeds a logo
|
|
319
|
+
(the engine's wordmark riding the seed into a host's sign-in email
|
|
320
|
+
was the bug), so on an app that registered none, Standard and None
|
|
321
|
+
are the same picture — nothing. The note below says so, because a
|
|
322
|
+
control offering a choice that changes nothing is the failure this
|
|
323
|
+
page keeps producing. %>
|
|
317
324
|
<div>
|
|
318
325
|
<span class="text-sm text-muted block mb-1">Logo</span>
|
|
319
326
|
<div class="flex flex-wrap items-center gap-2">
|
|
@@ -336,6 +343,13 @@
|
|
|
336
343
|
<%= button_to "Back to the standard logo", admin_email_logo_path(@entry.key),
|
|
337
344
|
method: :patch, params: { remove: "1" },
|
|
338
345
|
class: "text-2xs text-muted underline underline-offset-2 mt-2" %>
|
|
346
|
+
<% elsif Studio::EmailCatalog.logo_url(@entry.key).blank? %>
|
|
347
|
+
<p class="text-2xs text-muted mt-2" data-logo-none-registered>
|
|
348
|
+
This app registers no mark for this email, so Standard shows none.
|
|
349
|
+
Upload one here, or name a file your app ships with
|
|
350
|
+
<code class="font-mono">logo:</code> in
|
|
351
|
+
<code class="font-mono">config/initializers/studio_emails.rb</code>.
|
|
352
|
+
</p>
|
|
339
353
|
<% end %>
|
|
340
354
|
</div>
|
|
341
355
|
|
data/lib/studio/version.rb
CHANGED