Tighten render_mode and mail formatting helper docstrings

Strip a forward-looking aside about future external surfaces in RenderMode;
the invariant is that external surfaces need both absolute URLs and static
rendering. Replace "in practice" with "a coupled set" to drop the soft
hedge.

Drop the lead "wrappers around format_text" sentence on MailFormattingHelper
since the module body already shows the wrapping; the WHY (channel pinning,
extension/helper name parity) is the part worth documenting.
This commit is contained in:
Kabiru Mwenja
2026-05-27 13:22:56 +03:00
parent 499d7820a2
commit 3036e852a9
2 changed files with 8 additions and 10 deletions
@@ -34,11 +34,10 @@ module OpenProject
# `:external_text`) onto the primitive `only_path` / `static_html` /
# `plain_text` context flags that the filter pipeline reads.
#
# The collapse exists because external surfaces (mailers today; RSS, PDF,
# webhooks tomorrow) always need absolute URLs *and* static rendering for
# JS-dependent components — the two flags never travel apart in practice.
# A single mode value is the canonical API; the primitives stay available
# as per-flag escape hatches for callers that need an asymmetric mix.
# External surfaces always need absolute URLs *and* static rendering for
# JS-dependent components — the two flags are a coupled set. A single
# mode value is the canonical API; the primitives stay available as
# per-flag escape hatches for callers that need an asymmetric mix.
module RenderMode
DEFAULTS = {
in_app_html: { only_path: true, static_html: false, plain_text: false }.freeze,