Skip to content

Draw the graph's dashed lines as native dashed borders - #21

Merged
simonhamp merged 2 commits into
mainfrom
feat/native-dashed-borders
Oct 19, 2026
Merged

simonhamp merged 2 commits into
mainfrom
feat/native-dashed-borders

Conversation

@simonhamp

Copy link
Copy Markdown
Member

EDGE can now draw dashed and per-side borders natively (NativePHP/mobile-air#548). This switches the graph's dotted lines over to them.

Draft until the lock moves. The merge of #548 into mobile-air's combined/dev-null-app (00a6bf1) is ready but not pushed yet, so composer.lock here still points at 8c53c6b and CI will fail the three dash tests, which need the new parser. Once combined/dev-null-app has it, composer update nativephp/mobile is the last commit this needs.

Every dashed line used to be a column of 1x4pt views, drawn too long because PHP can't know a row's height and then clipped. Rings were 16 rotated views, and the thread elbow placed each dash along its corner by hand. Now each is one view:

  • dashed-line: w-[1] border-l border-dashed, as long as its position classes make it
  • dashed-ring: rounded-full border-2 border-dashed
  • thread-elbow: border-l border-b rounded-bl-xl border-dashed, the web's own classes
  • dashed-box: rounded-lg border border-dashed, which also gets the web's rounded corners back

The partials take a lane now and colour it through Lane::token(), as the solid rail does, so custom lane colours from #15 work here too. Display::dashesFor() and Display::elbowDashes() had no other callers and are gone, with their tests. The tests that counted dash views now look for the one dashed border instead.

Node counts

Same fixtures before and after (a feature-test render of each screen, counting every node in the tree):

Screen main this branch
Log, 20 commits, six 5-reply threads opened in place 2,707 2,047 (60 of them dashed borders)
Commit page with 12 one-line replies 769 482 (25 of them dashed borders)

On the Log that's 720 nodes of dashes and their wrappers replaced by 60 views. Longer rows save more, since dashesFor() drew up to 250 dashes for a single row.

How it looks

Checked on an iOS 26.2 simulator against the local API, with the merged mobile-air required by path for the build (not committed). Main's views were swapped in with native:watch on the same build for the before shots.

The thread elbow and the line down from the commit's dot, main on the left and this branch on the right (dark):

The same thread in light and dark, the Log with a reply hanging off its commit, and the commit page:

One difference: the small dashed rings (24pt on a deleted reply, 28pt on Account's Automatic swatch) used to be 16 round-ended dashes that nearly touched. Now they are 8 or 9 dashes with clear gaps, like a browser at 1x. The 48pt rings still have 16. Main on the left:

I couldn't find a thread with several replies or a deleted reply in the local data, so the spine between replies and the tombstone ring weren't seen on the simulator. They use the same dashed-line and dashed-ring partials as the shots above. Muted and blocked returned a 404 from the local API, so the dashed empty box wasn't seen either; the mobile-air PR's demo shows rounded-lg border border-dashed.

For the reviewer

  • When the lock does move, it goes past adb4221, the 4.1.0 binaries commit Install the PHP binaries that grow the frame buffers #18 also moves the lock to. Whichever of the two merges second just needs composer update nativephp/mobile again.
  • The rail's 'staged' tail is still a column of dashes. Nothing passes 'staged' as a tail today, so I left it.
  • The achievements sheet's comment says a dashed card costs about ninety nodes, which is no longer true. Locked cards could be dashed like the web's now, but that's a design change, so it isn't in here.

🤖 Generated with Claude Code

simonhamp and others added 2 commits October 19, 2026 19:20
EDGE can now draw border-dashed, per-side borders and dashed rings
(NativePHP/mobile-air#548), so each dashed line, ring, elbow and box is
one view instead of a column of tiny ones. The lines get their length
from layout, so Display::dashesFor() and Display::elbowDashes(), which
guessed row heights and placed the elbow's dashes by hand, are gone.

The partials now take the lane and draw it through Lane::token(), as
the solid rail does. The dashed box gets the rounded corners the web
gives it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The combined/dev-null-app branch now has NativePHP/mobile-air#548, so the
lock moves to it (00a6bf1) and the dashed lines, rings and elbows draw.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@simonhamp
simonhamp marked this pull request as ready for review October 19, 2026 22:14
@simonhamp
simonhamp merged commit 4261744 into main Oct 19, 2026
1 check passed
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