Skip to content

Draw /dev/null as the wordmark in commits and replies - #20

Merged
simonhamp merged 1 commit into
mainfrom
feat/dev-null-wordmark
Oct 20, 2026
Merged

simonhamp merged 1 commit into
mainfrom
feat/dev-null-wordmark

Conversation

@simonhamp

Copy link
Copy Markdown
Member

A standalone /dev/null in a commit or reply now draws as the brand wordmark, as the web has since dev-null-sh/dev-null.sh@416a1ca3. It's semibold with tighter tracking, and the middle slash is lane-0.

What changed

  • CommitBody splits prose around /dev/null with the web's exact rule from withWordmarks() in linkified-text.tsx. Inside a longer path, a word or a name (/dev/nullable, /dev/null/log, a/dev/null, /DEV/NULL, https://example.com/dev/null) it stays text, and so does inline code or a code block.
  • BodyRun gets an isWordmark flag. The body partial draws those runs as /dev, / and null in one nested text run.

The slash

The web draws the middle slash hollow, with -webkit-text-stroke in lane-0. EDGE text runs can't do that. On iOS and Android a run takes a colour, weight, tracking, background and underline, and nothing more, so a real outline needs a change to both mobile-ui text renderers.

I tried three options on a simulator in light and dark:

  • A: solid semibold slash in lane-0
  • B: solid regular-weight slash in lane-0
  • C: semibold slash in lane-0 at 50% opacity

This PR uses B. The thinner stroke is closest to the outline's thin lines, and it keeps lane-0's exact colour. A reads heavier than the web. C looks washed out in light mode and muddy brown in dark.

Web on top, the app below, both on the commit page at 17pt:

Light Dark

The three options (A, B, C) on the Log:

Light Dark

The whole screens, dev-null.sh next to the app:

Web, light App, light Web, dark App, dark

Keeping it on one line

iOS breaks lines after a slash, so a word joiner (U+2060) follows each slash in the wordmark. That caused a second problem. Unicode's line breaking never breaks before a slash, even after a space, so a few wordmarks in a row had no break point left and iOS split them mid-word. A zero-width space (U+200B) before a wordmark that follows a space gives iOS the break a browser takes there. The "Wrapping check" commit below is that case.

Light Dark

VoiceOver

The paragraph's accessibility label is still its text. iOS drops the word joiners from the label. The zero-width space stays, just before /dev/null, and speech doesn't voice it. I read the labels with axe on the simulator but didn't listen with VoiceOver itself.

Worth checking

  • The app doesn't link URLs yet, so it can't skip /dev/null inside a URL the way the web does. The regex covers the usual case (example.com/dev/null), but example.com/?to=/dev/null would show the wordmark in the app and not on the web.
  • Not seen on Android. Its text renderer reads the same run props, so it should match.
  • paragraphRuns() in tests/Pest.php now reports wordmark runs.

Testing

851 tests pass and Pint is clean. The web's two wordmark tests from tests/Unit/LinkifiedText.test.tsx are ported to CommitBodyTest, with cases for code, mentions and a cut preview. A Log test checks the drawn runs: weight, tracking, the slash's colour in both modes, and where the invisible characters go.

Screenshots are from an iPhone 17 Pro simulator on iOS 27, against a local canned API serving a copy of a public commit, next to that commit's page on dev-null.sh.

🤖 Generated with Claude Code

A standalone /dev/null in a commit or reply now draws as the brand
wordmark, as the web has since dev-null-sh/dev-null.sh@416a1ca3.
CommitBody splits prose with the web's rule, so /dev/null inside a
longer path, a word, a name or code stays plain text.

EDGE text can't stroke a glyph, so the middle slash is solid lane-0 in
the regular weight rather than the web's outline. Word joiners keep the
wordmark on one line, and a zero-width space after a space lets iOS
break before it the way a browser does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@simonhamp
simonhamp merged commit a33b055 into main Oct 20, 2026
1 check passed
@simonhamp
simonhamp deleted the feat/dev-null-wordmark branch October 20, 2026 00:12
simonhamp added a commit that referenced this pull request Oct 20, 2026
The /dev/null wordmark's middle slash is now a hollow lane-0 outline, like
the web's, using text-outline from NativePHP/mobile-air#549 and
NativePHP/mobile-ui#142. It replaces the solid regular-weight slash #20
used because EDGE text couldn't stroke a glyph then.

Main's lock already has a mobile-air combined head with #549. This moves
nativephp/mobile-ui to the combined/dev-null-app head that has #142.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant