Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
3436948
Hide replies on the Log until asked, and line the rail's end dot up w…
simonhamp Nov 16, 2026
22079e3
Keep a commit's row the same height with its replies open or shut
simonhamp Nov 16, 2026
01cb578
Turn the commit page's replies chevron down while they show, as on th…
simonhamp Nov 18, 2026
c8f904e
Show avatars in the Post as menu
simonhamp Nov 20, 2026
d5cf93d
Even out the reply bar's spacing and lighten its glass
simonhamp Nov 21, 2026
2f4d5f4
Read an author's replies to themselves as one thread, as the web does
simonhamp Nov 21, 2026
4f0ed67
Use glass/80 for both composer bars and even out the Messages bar
simonhamp Nov 21, 2026
c5180c6
Move the glass/N test guard out of Pest.php
simonhamp Nov 21, 2026
083085a
Merge feat/log-threads (#179) into feat/nested-replies
simonhamp Nov 21, 2026
f03090c
Open every level of replies in place on the commit page, as the web does
simonhamp Nov 21, 2026
a0032d3
Move the commit page to a commit in its tree instead of pushing another
simonhamp Nov 21, 2026
10cca47
Animate the commit page's move to another commit in its tree
simonhamp Nov 21, 2026
5c5d26b
Move the commit page's short hash to the top right of the commit
simonhamp Nov 21, 2026
16f3839
Open the replies of the commits above the commit in place
simonhamp Nov 21, 2026
d204792
Fold the replies of the commits above the commit on every move
simonhamp Nov 21, 2026
056deb8
Hold the mention suggestions to six rows and scroll the rest
simonhamp Nov 21, 2026
f9832b5
Let a caller that scrolls the mention list itself turn off its inner …
simonhamp Nov 21, 2026
89bff8d
Count the replies of the commits above from their own pages
simonhamp Nov 22, 2026
f3e4adb
Keep the asked-for ancestor counts with the ancestors
simonhamp Nov 22, 2026
820a175
Suggest every matching org member in Remotes, scrolling past six
simonhamp Nov 22, 2026
b5ecbf7
Tidy a blank line left by the last commit
simonhamp Nov 22, 2026
3b582bb
Scroll to a reply you just sent on a commit page
simonhamp Nov 22, 2026
942a74c
Draw the hairline under replies that another commit follows
simonhamp Nov 22, 2026
52e4541
Open every level of replies in place on the commit page, and move the…
simonhamp Nov 23, 2026
0109aab
Even out the composer bars' spacing and lighten their glass (#194)
simonhamp Nov 23, 2026
c0858d0
Show an author's replies to themselves as one thread, as the web does…
simonhamp Nov 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions app/Devnull/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,10 @@
public const string IssuesPath = 'issues';

/**
* How many replies the app asks for at a time. devnull sends 50 a page
* unless it's asked for fewer, and the app never asks for more than this.
* How many replies the app asks for at a time, in a feed's thread and on
* a commit's page. devnull sends 50 a page unless it's asked for fewer.
*/
public const int RepliesPerPage = 5;
public const int RepliesPerPage = 10;

/**
* Where the signed-in account's timezone is saved, or unset, with whether their profile shows their local time.
Expand Down
13 changes: 13 additions & 0 deletions app/Devnull/Data/Commit.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
*
* A Nata Nu//ers high score carries its signed run in a fenced block, which
* shows as a card ($scoreCard) instead of as code.
*
* $continuationId is the reply that carries on a thread its author writes as
* replies to themselves, when devnull says which (see SelfThread).
*/
final readonly class Commit
{
Expand Down Expand Up @@ -76,6 +79,7 @@ public function __construct(
public ?ReplyPreview $replyPreview = null,
public int $pasteisCount = 0,
public ?ScoreCard $scoreCard = null,
public ?string $continuationId = null,
) {}

/**
Expand Down Expand Up @@ -143,6 +147,7 @@ public static function fromArray(array $data): self
replyPreview: is_array($data['reply_preview'] ?? null) ? ReplyPreview::fromArray($data['reply_preview']) : null,
pasteisCount: max(0, (int) ($data['pasteis_count'] ?? 0)),
scoreCard: $scoreCard,
continuationId: is_string($data['continuation_id'] ?? null) && $data['continuation_id'] !== '' ? $data['continuation_id'] : null,
);
}

Expand All @@ -164,6 +169,14 @@ public function withMorePasteis(int $change): self
return new self(...[...get_object_vars($this), 'pasteisCount' => max(0, $this->pasteisCount + $change)]);
}

/**
* This commit with the count of replies its own page gives, for a copy that came without one.
*/
public function withRepliesCount(int $repliesCount): self
{
return new self(...[...get_object_vars($this), 'repliesCount' => max(0, $repliesCount)]);
}

public function withPinned(bool $isPinned): self
{
return new self(...[...get_object_vars($this), 'isPinned' => $isPinned]);
Expand Down
27 changes: 18 additions & 9 deletions app/Devnull/Display.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ final class Display

public const int ReplyBarDescriptionHeight = 100;

/**
* The people to mention above a field (see partials/mention-suggestions): a row's height, and how many rows show
* before the rest scroll inside the list.
*/
public const int MentionRowHeight = 44;

public const int MentionRowsShown = 6;

/**
* A bar holding partials/composer-box with one line of draft, as drawn on an iPhone: the bar's padding, then the
* field over the row of tools and the send button.
Expand All @@ -44,6 +52,12 @@ final class Display
*/
public const int ComposerGlassTint = 40;

/**
* How opaque, in percent, the glass under a composer bar gets on iOS once it has faded in (glass/N, see
* composerBarGlass()). Full glass over a dark screen reads as a heavy slab.
*/
public const int ComposerGlassOpacity = 80;

/**
* About how many characters fit on a line of the box's field, which runs the width of the box.
*/
Expand All @@ -56,12 +70,6 @@ final class Display
*/
public const int HomeIndicatorHeight = 34;

/**
* How far below the top of a reply's row its elbow comes level with the
* middle of the reply's avatar.
*/
public const int ElbowLevel = 22;

/**
* How long ago a commit was made, as the web prints it beside the commit:
* "now", "5m", "3h", "2d", then the date, in the same time zone as dayLabel().
Expand Down Expand Up @@ -300,12 +308,13 @@ public static function fadesInBar(): bool
* The classes for a composer's native:bottom-bar. On iOS that's Liquid Glass: what scrolls under the bar shows
* through it, blurred. A patched mobile-air draws the glass behind the whole bar, under the home indicator too,
* and fades it in over the bar's top ComposerFadeHeight points, so it has no hard top edge. EDGE's own glass on
* an element can't be faded, and stops short of the home indicator. Android has no glass, so the bar stays the
* surface there.
* an element can't be faded, and stops short of the home indicator. The glass stops at ComposerGlassOpacity
* percent (glass/N), so a little of the screen under the bar shows through. Android has no glass, so the bar
* stays the surface there.
*/
public static function composerBarGlass(): string
{
return self::fadesInBar() ? 'glass' : '';
return self::fadesInBar() ? 'glass/'.self::ComposerGlassOpacity : '';
}

/**
Expand Down
39 changes: 39 additions & 0 deletions app/Devnull/Pop.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?php

namespace App\Devnull;

/**
* How a star or a pastel looks at each step of the pop it gives when tapped,
* after the web's: the star grows to 1.35 tilted 12 degrees and springs back
* (`star-pop`), the pastel grows to 1.25 and settles (its button's
* `animate()`). See Concerns\PopsReactions for the steps.
*/
final class Pop
{
/**
* Drawn as it is, with the animation that the next step uses, so the phone
* has a node to animate from.
*/
public const string Ready = 'ready';

public const string Up = 'up';

public const string Down = 'down';

/**
* The icon's transform at $step, or nulls when it isn't popping.
*
* @return array{scale: float|null, rotate: float|null, duration: int|null, easing: string|null}
*/
public static function transform(?string $step, string $button): array
{
$star = $button === 'star';

return match ($step) {
self::Ready => ['scale' => 1.0, 'rotate' => 0.0, 'duration' => 150, 'easing' => 'ease-out'],
self::Up => ['scale' => $star ? 1.35 : 1.25, 'rotate' => $star ? -12.0 : 0.0, 'duration' => 150, 'easing' => 'ease-out'],
self::Down => ['scale' => 1.0, 'rotate' => 0.0, 'duration' => $star ? 320 : 180, 'easing' => $star ? 'spring' : 'ease-out'],
default => ['scale' => null, 'rotate' => null, 'duration' => null, 'easing' => null],
};
}
}
39 changes: 19 additions & 20 deletions app/Devnull/PostAs.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,19 +56,27 @@ public static function offered(?string $picked): bool
}

/**
* The menu: you first, then your organizations, the one posting now ticked. $method is called with the handle
* picked, or '' for you.
* The menu: you first, then your organizations, each with their avatar, round for you and a rounded square for
* an organization, as elsewhere in the app, and the one posting now ticked. Until an avatar loads, or if it
* can't, a person or building icon stands in. $method is called with the handle picked, or '' for you.
*
* @return list<TopBarAction>
*/
public static function menu(User $me, ?User $author, string $method): array
{
return array_map(fn (User $identity): TopBarAction => NavAction::make('post-as-'.$identity->username)
->label($identity->name.' (@'.$identity->username.')')
->icon(...self::icon($identity, $author))
->press($method."('".($identity->isOrganization ? $identity->username : '')."')")
->toElement()
->ref('post-as-'.$identity->username), [$me, ...self::organizations()]);
return array_map(function (User $identity) use ($author, $method): TopBarAction {
$icon = $identity->isOrganization ? Lucide::Building2 : Lucide::UserRound;

return NavAction::make('post-as-'.$identity->username)
->label($identity->name.' (@'.$identity->username.')')
->icon(ios: $icon->ios(), android: $icon->android())
->image(ImageCache::src($identity->avatarUrl))
->press($method."('".($identity->isOrganization ? $identity->username : '')."')")
->toElement()
->setProp('image_shape', $identity->isOrganization ? 'rounded' : 'circle')
->setProp('checked', self::posting($identity, $author))
->ref('post-as-'.$identity->username);
}, [$me, ...self::organizations()]);
}

/**
Expand All @@ -88,19 +96,10 @@ public static function colour(User $me, ?User $author): string
}

/**
* A tick beside whoever posts now, and what each is beside the rest, as the menu has no room for avatars.
*
* @return array{ios: string, android: string}
* Whether the menu ticks this one: whoever posts now.
*/
private static function icon(User $identity, ?User $author): array
private static function posting(User $identity, ?User $author): bool
{
$posting = $author === null ? ! $identity->isOrganization : $identity->isOrganization && $identity->username === $author->username;
$icon = match (true) {
$posting => Lucide::Check,
$identity->isOrganization => Lucide::Building2,
default => Lucide::UserRound,
};

return ['ios' => $icon->ios(), 'android' => $icon->android()];
return $author === null ? ! $identity->isOrganization : $identity->isOrganization && $identity->username === $author->username;
}
}
7 changes: 5 additions & 2 deletions app/Devnull/RowInputs.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,12 @@ public static function for(Commit $commit, array $scope): array
'stashed' => $scope['stashed'] ?? [],
'unfolded' => $scope['unfolded'] ?? [],
'expandable' => isset($scope['threads']),
'opened' => array_key_exists($commit->id, $scope['threads'] ?? []),
'opened' => array_key_exists($commit->id, $scope['threads'] ?? []) && ! in_array($commit->id, $scope['closingThreads'] ?? [], true),
'faded' => in_array($commit->id, $scope['fadedRows'] ?? [], true),
// A reply whose replies, opened in place, showed its author carried it on gets "Show thread".
'continued' => in_array($commit->id, $scope['threadsContinued'] ?? [], true),
'popping' => [$scope['popping']['star-'.$commit->id] ?? null, $scope['popping']['pastel-'.$commit->id] ?? null],
'tombstones' => $scope['tombstones'] ?? false,
'tombstoneReplies' => array_key_exists($commit->id, $scope['tombstoneReplies'] ?? []),
'shown' => [self::changing($commit), $commit->quotedCommit === null ? null : self::changing($commit->quotedCommit)],
'poll' => [$scope['pollChoices'][$commit->id] ?? null, in_array($commit->id, $scope['voting'] ?? [], true)],
];
Expand Down
Loading
Loading