@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add inline styles for `{key ...}` in HTML mail

Summary: Fixes T11607.

Test Plan:
- Made a comment using `{key ...}`.
- Used `bin/mail show-outbound --id X --dump-html > test.html` to review HTML:

{F1805304}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11607

Differential Revision: https://secure.phabricator.com/D16523

+31
+31
src/infrastructure/markup/rule/PhabricatorKeyboardRemarkupRule.php
··· 182 182 } 183 183 184 184 $is_text = $this->getEngine()->isTextMode(); 185 + $is_html_mail = $this->getEngine()->isHTMLMailMode(); 186 + 187 + if ($is_html_mail) { 188 + $key_style = array( 189 + 'display: inline-block;', 190 + 'min-width: 1em;', 191 + 'padding: 4px 5px 5px;', 192 + 'font-weight: normal;', 193 + 'font-size: 0.8rem;', 194 + 'text-align: center;', 195 + 'text-decoration: none;', 196 + 'line-height: 0.6rem;', 197 + 'border-radius: 3px;', 198 + 'box-shadow: inset 0 -1px 0 rgba(71, 87, 120, 0.08);', 199 + 'user-select: none;', 200 + 'background: #f7f7f7;', 201 + 'border: 1px solid #C7CCD9;', 202 + ); 203 + $key_style = implode(' ', $key_style); 204 + 205 + $join_style = array( 206 + 'padding: 0 4px;', 207 + 'color: #92969D;', 208 + ); 209 + $join_style = implode(' ', $join_style); 210 + } else { 211 + $key_style = null; 212 + $join_style = null; 213 + } 185 214 186 215 $parts = array(); 187 216 foreach ($keys as $k => $v) { ··· 202 231 'kbd', 203 232 array( 204 233 'title' => $spec['name'], 234 + 'style' => $key_style, 205 235 ), 206 236 $spec['symbol']); 207 237 } ··· 214 244 'span', 215 245 array( 216 246 'class' => 'kbd-join', 247 + 'style' => $join_style, 217 248 ), 218 249 '+'); 219 250 $parts = phutil_implode_html($glue, $parts);