Skip to content

Show the handle under the name in the Post as menu - #200

Draft
simonhamp wants to merge 2 commits into
feat/post-as-avatarsfrom
feat/post-as-subtitle
Draft

simonhamp wants to merge 2 commits into
feat/post-as-avatarsfrom
feat/post-as-subtitle

Conversation

@simonhamp

@simonhamp simonhamp commented Nov 21, 2026 •

Copy link
Copy Markdown
Member

The Post as menu showed each account as "Simon (@simon-hamp)", which wraps onto two lines because iOS picks the menu's width. Now the name is the row's label and the handle is a smaller subtitle under it, on iOS and Android. It's the same menu wherever it opens: the New commit sheet, the reply bar and the quote composer.

This is stacked on #192 (avatars in the menu). It needs NativePHP/mobile-air#740, which adds NavAction::subtitle() to core, and NativePHP/mobile-ui#228, which draws the subtitle in menu rows. PostAs::menu() calls ->subtitle('@'.$username) when method_exists(NavAction::class, 'subtitle'), and otherwise keeps the combined label, so nothing breaks on an older core. An earlier version used a MenuItem::subtitle() helper from mobile-ui#228; that helper is gone now that core has the method.

Screen readers read the name and then the handle, since both are real text in the row. I didn't set an a11yLabel on the rows: the menu renderers don't read one.

Tests: 1945 passed, 1 skipped. The skipped one is the fallback test, which only runs on a core without subtitle(). With the core patch reversed in vendor, the fallback test passed and the subtitle test skipped. tests/Support/MenuSubtitle does the skipping, like TextFieldFill on other branches.

To build it before #740 and #228 are released, apply both patches to vendor:

cd vendor/nativephp/mobile && patch -p1 < ../../../storage/app/patches/mobile-air-740-nav-action-subtitle.patch
cd ../mobile-ui && patch -p1 < ../../../storage/app/patches/mobile-ui-228-menu-subtitle.patch

The branch merges cleanly into the iPhone build branch (local/iphone-items-1-7). Not yet run on a device.

🤖 Generated with Claude Code

simonhamp and others added 2 commits November 21, 2026 12:44
Each row of the Post as menu was "Simon (@simon-hamp)", which wrapped
onto two lines. Now the name is the row's label and the handle is a
subtitle under it, smaller, on iOS and Android. Screen readers read the
name and then the handle. It's the same menu in the New commit sheet,
the reply bar and the quote composer.

Needs NativePHP/mobile-ui#228 (MenuItem::subtitle). With an older
mobile-ui the row keeps the combined label, and the subtitle test
skips (tests/Support/MenuSubtitle).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Core now has NavAction::subtitle() (NativePHP/mobile-air#740), and
mobile-ui#228 dropped its MenuItem::subtitle() stop-gap. PostAs::menu()
calls ->subtitle('@handle') on the row, and falls back to the combined
"Name (@handle)" label when the installed core has no subtitle(). The
tests skip on the same check (tests/Support/MenuSubtitle).

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