Skip to content

Name the app by its display name in mails and pages; drop placeholder store links and the template logo - #163

Merged
dadachi merged 3 commits into
mainfrom
fix/mail-display-name-and-logo
Oct 18, 2026
Merged

dadachi merged 3 commits into
mainfrom
fix/mail-display-name-and-logo

Conversation

@dadachi

@dadachi dadachi commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

Summary

One PR for both issues: #162's fix uses the display_name setting that #161 adds. Two commits, one per issue.

#161: mails

  • New top-level display_name: Native App Template in config/settings.yml. The rename's humanized-title pattern turns it into the generated app's name (NativeAppTemplate→OrangeBaton gives Orange Baton; I checked this by running rename.rb on a copy). site.name / business.name stay as the one-word identifier-like names.
  • Mails use it for the sender name (email.default_from_with_name, also support_with_name), the invitation text ("Open Native App Template", "モバイルアプリNative App Templateで…"), a deleted inviter's name and the footer (copyright line and site link, HTML and text).
  • Store links: rule: blank means left out. mobile_app.app_store_url / play_store_url are now "" by default instead of the idxxxxxxxxxx / com.yourdomain… placeholders. Shopkeeper::NotificationMailer#store_links keeps only the URLs that are set, so the mail shows neither, one or both. Link labels moved to locale keys (%{mobile_app} for iOS / %{mobile_app} iOS版). I chose blank over a placeholder? check because it can't miss a placeholder spelled differently, and the generated app is in the same state.
  • mobile_app.name, name_ios and name_android are removed (nothing uses them now).

#162: password-reset page logo

  • shopkeeper_auth/reset_passwords/edit shows display_name as a text wordmark instead of <img src="/icon.svg">.
  • Why text and not a configurable logo: it follows the rename, so a generated app is correct out of the box with no asset to remember. A logo setting would still need someone to supply the asset, and until then it would show the template's "N" (or nothing). An app that wants a logo can add one to the view.
  • The minimal and errors layouts' <title> use display_name too.
  • README's new "App name and store links" section explains both names and the store-link rule. It also lists the public/ icons (favicon, icon.svg, icon*.png, apple-touch-icon.png) as the template's, to replace. These are still used as favicons.

Rename safety: the new strings have no article before a renameable word or the product name.

Tests

  • notification_mailer_test (en and ja): invitation names the display name and not the identifier name; no store links while blank; each set link shown (HTML and text); footer uses the display name; From display name is the display name; deleted-inviter fallback uses the display name. The identifier-name check is skipped when the two names are the same, e.g. a one-word product name after the rename.
  • reset_passwords_controller_test: the page has no <img> and names the app in text and <title>.
  • errors_controller_test: HTML error page title uses the display name.

I reverted the app changes and confirmed the new tests fail on the old code.

Local results: bin/rails test (654 runs, 0 failures), bin/rubocop, erb_lint --lint-all, brakeman and bundler-audit all pass.

Closes #161
Closes #162

🤖 Generated with Claude Code

https://claude.ai/code/session_01UZJxUoubntzu7Ec7DPVfAr

dadachi and others added 3 commits October 18, 2026 08:56
…links

Mails used the identifier-like NativeAppTemplate (which a generated app
renames to e.g. OrangeBaton) and the invitation mail linked the
placeholder store URLs in config/settings.yml.

- New display_name setting (Native App Template; the rename's humanized
  title form turns it into e.g. Orange Baton) for the sender name, the
  invitation text, a deleted inviter's name and the mail footer
- mobile_app.app_store_url / play_store_url default to blank, and the
  invitation mail links only the stores whose URL is set; the link labels
  move to locale keys (en and ja)
- Remove mobile_app.name, name_ios and name_android, now unused
- Mailer tests in en and ja: display name in body and footer, From
  display name, no store links while blank, each set link shown

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UZJxUoubntzu7Ec7DPVfAr
…te logo

The page showed public/icon.svg, NativeAppTemplate's "N", which every
app built from the template kept. A text wordmark from display_name
follows the rename with nothing to replace, and an app that wants a
logo can add it in the view.

- reset_passwords/edit shows display_name instead of the image
- The minimal and errors layouts' <title> use display_name
- README lists the icons in public/ as the template's to replace
- Tests: the page has no image and names the app; error page title

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UZJxUoubntzu7Ec7DPVfAr
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UZJxUoubntzu7Ec7DPVfAr
@dadachi
dadachi merged commit f8b063a into main Oct 18, 2026
3 checks passed
@dadachi
dadachi deleted the fix/mail-display-name-and-logo branch October 18, 2026 00:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Password-reset page shows the template's logo (public/icon.svg) Mails use the identifier-like app name and placeholder store URLs

1 participant