Compare commits

..

1 Commits

Author SHA1 Message Date
59ca1999e6 Fix thread post spacing: add reply padding and increase margins
All checks were successful
CI / test (pull_request) Successful in 50s
Replies had no left padding from the border (padding-left:0) and too-tight
vertical spacing (margin:4px). Bump to padding-left:12px and margin:8px.

Closes #2

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-05 09:57:25 -03:00
2 changed files with 9 additions and 7 deletions

View File

@@ -376,14 +376,17 @@ final class BlueskyThreadsExtension extends Minz_Extension {
} }
return <<<HTML return <<<HTML
<blockquote style="border:1px solid #0085ff;border-radius:12px;padding:10px 12px;margin:8px 0 0 0;"> <div style="border:1px solid #0085ff;border-radius:12px;padding:10px 12px;margin-top:8px;">
<div style="font-size:0.85em;margin-bottom:6px;"> <div style="font-size:0.85em;margin-bottom:6px;">
<strong>{$displayName}</strong> <strong>{$displayName}</strong>
<a href="{$this->e($postUrl)}" style="color:#536471;margin-left:4px;text-decoration:none;">@{$this->e($handle)}</a> <span style="color:#536471;margin-left:4px;">@{$this->e($handle)}</span>
</div> </div>
<div style="white-space:pre-wrap;word-break:break-word;">{$text}</div> <div style="white-space:pre-wrap;word-break:break-word;">{$text}</div>
{$embedsHtml} {$embedsHtml}
</blockquote> <div style="margin-top:6px;font-size:0.75em;">
<a href="{$this->e($postUrl)}" style="color:#536471;">View on Bluesky ↗</a>
</div>
</div>
HTML; HTML;
} }

View File

@@ -164,15 +164,14 @@ class BlueskyThreadsTest extends TestCase {
'Quoted post text must be rendered as an embed'); 'Quoted post text must be rendered as an embed');
} }
/** Quoted posts use a blockquote with a handle permalink; thread posts have no permalink. */ /** Quoted posts include a "View on Bluesky" link; thread posts do not. */
public function testViewOnBskyLinksArePresent(): void { public function testViewOnBskyLinksArePresent(): void {
$data = json_decode(file_get_contents(__DIR__ . '/fixtures/thread_3mhtk7awhrp26.json'), true); $data = json_decode(file_get_contents(__DIR__ . '/fixtures/thread_3mhtk7awhrp26.json'), true);
$html = $this->call('renderThread', $data['thread'], true); $html = $this->call('renderThread', $data['thread'], true);
$this->assertStringNotContainsString('3mhtk7awhrp26', $html, 'Thread post rkey must not appear as a permalink'); $this->assertStringNotContainsString('3mhtk7awhrp26', $html, 'Thread post rkey must not appear as a permalink');
$this->assertStringContainsString('3mhtjo3rtkn26', $html, 'Quoted post rkey must appear in the handle permalink'); $this->assertStringContainsString('3mhtjo3rtkn26', $html, 'Quoted post rkey must appear in its View on Bluesky link');
$this->assertStringContainsString('<blockquote', $html, 'Quoted post must be wrapped in a blockquote'); $this->assertStringContainsString('View on Bluesky', $html);
$this->assertStringNotContainsString('View on Bluesky', $html);
} }
/** /**