studio-engine 0.44.0 → 0.44.1

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: 7a0bd2a31039b41d7b5f7fe70a6865308d2fec97e6bfeae301f254b173352dc2
4
- data.tar.gz: 14e41f376424c34cd73c92eae84310eb18b24dc2165ac727948d7d9cbed9379a
3
+ metadata.gz: 6b902bc40b9fcd804ebcd5512e291a092056246fa399a5eac8753c40ee194f0d
4
+ data.tar.gz: a23566b993e7bb62201be4a428414e6e9f6ffdcc1789248ad6a255031738a2cb
5
5
  SHA512:
6
- metadata.gz: '097bd2947f0e2c0a02a21b76cb01ed7816fd1c7ff1cc077576a15b8e125ef3e13ce81ac7a0c8500de367c37f663cd8d1cdfb4599511f760efe6a9e2994fdbaeb'
7
- data.tar.gz: 72b9f3066838d5494036601d29a0de70a6c33d69e84ccfcd788e459e493f16d5a9b1c130a7b3c36c8604081823ddb8fa9274e5b61eef97da0246ace104e70392
6
+ metadata.gz: f7a3d8f2116ed244a3f9efaa01284f61a173f4df3ad3fdf38f42e8fe64c33601042975427888c841e69e7142b4d847af5619ec5946a08bbfe2feea8be5bd72c9
7
+ data.tar.gz: 4a0a21442d7b0b313755fa28fe62101f08408410eabf7278e50b74b8753451776d4b6508686f3db8dd3b78ffafcbe2f2f37e4e4e9f24395524ddd86c332bdee5
data/CHANGELOG.md CHANGED
@@ -89,6 +89,38 @@ The format is [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). This pro
89
89
 
90
90
  ### Fixed
91
91
 
92
+ - **The newsletter's seed lent every host the McRitchie Studio wordmark.**
93
+ `STANDARD`'s `newsletter_subscribed` entry seeded
94
+ `logo: "emails/logo-horizontal.png"`, and `EmailCatalog.register` merges on
95
+ `logo.presence` — so an omitted `logo:` INHERITS. A host registering that email
96
+ for any ordinary reason (a relabel, its own preview builder) would have sent its
97
+ branded newsletter under Studio's mark, and the alt text could not warn anyone:
98
+ `Studio::Banner` sets it from `Studio.app_name`, so it always agrees with the
99
+ host and never with the pixels. turf-monster hit the same mechanism on
100
+ `magic_link`.
101
+
102
+ **No consumer was exposed.** No app registers `newsletter_subscribed` or sends
103
+ it — turf's own `NewsletterMailer` sends its flat `newsletter_welcome` — so this
104
+ was visible only on the `/admin/emails` preview. It was seeded identically in
105
+ 0.42 and 0.43; nothing changed it recently.
106
+
107
+ The seed now carries no logo. **Artwork still rides the gem** — a background is
108
+ a picture any app can send, and inheriting one is what gives a new app
109
+ good-looking mail on day one. A wordmark is somebody's identity, and the line is
110
+ drawn there. An app that wants a mark registers a path IT ships
111
+ (`register("newsletter_subscribed", logo: "emails/our-mark.png")`) or sets one
112
+ on /admin/emails. Guards render the mail and resolve every `<img>` back to a
113
+ file on the engine's own asset load path, comparing the wordmark by its BYTES,
114
+ so renaming the file and re-seeding it is caught too.
115
+
116
+ **`magic_link` is unchanged and still seeds the wordmark.** A host that
117
+ registers no mark of its own inherits it on the sign-in email. That is an
118
+ **upgrade trap** rather than a live leak — the apps with no email initializer
119
+ are pinned before this registry existed, so they inherit nothing today, but the
120
+ bump that brings one forward would hand it another brand's mark with no code
121
+ change of its own. Tracked separately, with the design question of whether
122
+ `STANDARD` should seed a logo at all.
123
+
92
124
  - **The manager reported artwork that was not being sent.** A layered-native email
93
125
  (no flat `default_asset`) drew an empty box and a "sends without a banner" badge
94
126
  while it was sending one, and an email with BOTH assets previewed the flat one —
data/README.md CHANGED
@@ -417,10 +417,39 @@ Register the artwork once and every app inherits it:
417
417
  ```ruby
418
418
  Studio::EmailCatalog.register("magic_link",
419
419
  background: "emails/magic-link-background.gif",
420
- logo: "emails/logo-horizontal.png",
420
+ logo: "emails/our-own-mark.png", # a path THIS app ships — see below
421
421
  scrim: 0.40)
422
422
  ```
423
423
 
424
+ **A background is shareable; a logo is not.** Artwork rides the gem on purpose,
425
+ so a brand-new app sends good-looking mail on day one. A wordmark is somebody's
426
+ identity, so `logo:` must name a file **your app** ships. Two traps make getting
427
+ this wrong silent:
428
+
429
+ - **A logical path that your app does not ship resolves to the ENGINE's copy.**
430
+ turf-monster registered `"emails/logo-horizontal.png"`, shipped no such file,
431
+ and Sprockets served studio-engine's — its sign-in email went out carrying the
432
+ McRITCHIE STUDIO wordmark. Nothing raised.
433
+ - **The alt text agrees with you, not with the pixels.** `Studio::Banner` sets it
434
+ from `Studio.app_name`, so it reads as your app's name over whatever picture
435
+ actually loaded.
436
+
437
+ `logo:` merges three ways: omitted or `nil` **inherits** whatever the entry
438
+ already had, `""` **clears** it, and a path **sets** it. So deleting a `logo: ""`
439
+ line does not remove the logo — it restores the inherited one.
440
+
441
+ What each `STANDARD` entry lends today:
442
+
443
+ | Entry | Seeds a logo? |
444
+ |---|---|
445
+ | `newsletter_subscribed` | **No.** A host that names none sends none. |
446
+ | `magic_link` | **Yes** — `emails/logo-horizontal.png`, the Studio wordmark. A host that has not registered its own mark inherits it. |
447
+
448
+ If you are **bumping this gem** into an app that registers no email entries, that
449
+ second row is an upgrade trap: the app gains a Studio wordmark on its sign-in
450
+ email without changing a line of its own. Register a `magic_link` logo your app
451
+ ships — or `logo: ""` — in the same bump.
452
+
424
453
  **Why layered rather than composited.** Drawing the text into the image gives
425
454
  pixel-exact brand typography everywhere, but it cannot have an ANIMATED
426
455
  background AND per-recipient text — composing a greeting into sixty frames means
@@ -166,7 +166,12 @@ module Studio
166
166
  # layer since the day it was written, so a baked-in copy of the same
167
167
  # picture would be a second thing to keep in sync and never be shown.
168
168
  background: "emails/newsletter-subscribed-background.gif",
169
- logo: "emails/logo-horizontal.png",
169
+ # NO logo: KEY, and adding one back is the bug. It seeded
170
+ # "emails/logo-horizontal.png" — the McRITCHIE STUDIO wordmark — into
171
+ # every host that registers this email without naming a logo of its own,
172
+ # because register() merges on `logo.presence` and an omitted key
173
+ # inherits. Full reasoning under NO DEFAULT LOGO below; the guards are in
174
+ # test/integration/newsletter_email_test.rb.
170
175
  header: "Welcome {name}!",
171
176
  header_fallback: "You're subscribed!",
172
177
  subtext: "you're on the list",
@@ -194,19 +199,62 @@ module Studio
194
199
  ASPECT_RATIO = 2.0
195
200
  MAX_WIDTH = 1200
196
201
 
197
- # NO DEFAULT LOGO, deliberately.
202
+ # NO DEFAULT LOGO, deliberately — on any route.
203
+ #
204
+ # There is no DEFAULT_LOGO constant here, and newsletter_subscribed above
205
+ # seeds no logo either. Same rule, learned twice, on two different routes.
198
206
  #
199
- # It was emails/logo-horizontal.png the white "McRITCHIE STUDIO" wordmark —
200
- # and every consumer inherits this layout without defining its own. That put
201
- # Studio branding into turf-monster's entire player-facing mail set, which
202
- # today carries none, plus moms-app, mcritchie-industries, acquisition-studio
203
- # and rolio, with no opt-in and no host-side change.
207
+ # The constant went first (DEFAULT_FOOTER_LOGO). It was
208
+ # emails/logo-horizontal.png the white "McRITCHIE STUDIO" wordmark
209
+ # inherited by every consumer that defines none of its own, with no opt-in and
210
+ # no host-side change. It reached the apps actually RUNNING that engine:
211
+ # turf-monster's entire player-facing mail set, which today carries none.
212
+ # It did NOT reach moms-app, mcritchie-industries or acquisition-studio — they
213
+ # pin 0.32.1 / 0.32.2 / 0.13.1 and the wordmark first shipped at v0.42.0 — and
214
+ # rolio is not a consumer at all. Reachability at the PIN, as below.
204
215
  #
205
- # It also contradicted the rule at the top of this file: the url / resolved_url
216
+ # The SEED went second, and it is the subtler half: newsletter_subscribed
217
+ # carried the same file as its banner logo, and register() merges on
218
+ # `logo.presence` — omitting the key INHERITS. A host registering that email
219
+ # to relabel it or attach a preview would have inherited the wordmark without
220
+ # naming it. turf-monster had already been bitten by this on magic_link, where
221
+ # the sign-in banner sent the Studio wordmark under an alt of "Turf Monster".
222
+ #
223
+ # Both contradict the rule at the top of this file: the url / resolved_url
206
224
  # split exists so the engine cannot swap a host's artwork for the engine's in
207
- # live email. A footer logo is the same swap by another route.
225
+ # live email. A logo is the same swap by another route — and the ALT TEXT
226
+ # cannot warn anyone, because Studio::Banner sets it from Studio.app_name, so
227
+ # it always agrees with the host and never with the pixels.
228
+ #
229
+ # ARTWORK still rides the gem, and should: a background is a picture any app
230
+ # can send, and inheriting one is what gives a new app good-looking mail on
231
+ # day one. A wordmark is somebody's identity. The line is there, not at
232
+ # "engine assets are bad".
233
+ #
234
+ # Each app opts in with its own mark — in an initializer
235
+ # (`Studio::EmailCatalog.register("newsletter_subscribed", logo: "emails/our-mark.png")`,
236
+ # a path THAT APP ships) or on /admin/emails.
237
+ #
238
+ # STILL OUTSTANDING, stated so nobody reads this as swept: magic_link above
239
+ # DOES still seed the wordmark, so a host that registers no mark of its own
240
+ # inherits it on the sign-in email. turf-monster registers emails/turf-logo.png
241
+ # and the Studio hub owns the mark, so both are covered.
242
+ #
243
+ # It is an UPGRADE TRAP rather than a live leak, which is the sharper shape.
244
+ # The apps carrying no email initializer are pinned far enough back that this
245
+ # file does not exist in the gem they run, so they inherit nothing today — but
246
+ # the routine dependency bump that brings one forward would put another
247
+ # brand's mark in its most-sent email, with no code change of its own and
248
+ # nobody looking for it.
249
+ #
250
+ # CHECK REACHABILITY AT THE PIN, never from main: `git ls-tree` at the tag the
251
+ # app resolves, or read the installed gem. "HEAD seeds it" plus "the app
252
+ # registers nothing" are both true and together say nothing about what that
253
+ # app RUNS — a wrong conclusion this very comment was first drafted with.
208
254
  #
209
- # Each app opts in on /admin/emails by pasting its own mark.
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.
210
258
 
211
259
  # The footer band. Dark on purpose: it closes the white card, and a light
212
260
  # sign-off floating under body copy reads as part of the message rather than
@@ -1,3 +1,3 @@
1
1
  module Studio
2
- VERSION = "0.44.0"
2
+ VERSION = "0.44.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: studio-engine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.44.0
4
+ version: 0.44.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex McRitchie