fix(feed): breathing room around divider + FAB back to right/bottom corner

- PostSeparator was a bare 1px line flush against both neighbouring
  cards, so the seam looked like card contact instead of a real
  break. Wrapped it in a 12px vertical padding — now there's 12px
  blank above the line, 1px line, 12px blank below. Trimmed the
  card's own paddingVertical back down since the separator now owns
  the inter-post breathing room.
- FAB was lifted to bottom: max(insets.bottom, 8) + 70 in the previous
  commit which put it far too high (a leftover from the original
  experiment with the absoluteFill wrapper). User wants 12px above
  the NavBar and 12px from the right edge. The Feed screen's
  container ends at the NavBar top (enforced by (app)/_layout.tsx's
  outer <View flex:1> + NavBar sibling), so a simple `right: 12,
  bottom: 12` on position:absolute lands the button exactly there on
  every device. Removed the now-unnecessary absoluteFill wrapper too.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
vsecoder
2026-04-18 20:28:52 +03:00
parent a248c540d5
commit f688f45739
2 changed files with 34 additions and 42 deletions

View File

@@ -174,8 +174,7 @@ function PostCardInner({ post, likedByMe, onStatsChanged, onDeleted, compact }:
style={({ pressed }) => ({
flexDirection: 'row',
paddingHorizontal: 16,
paddingTop: compact ? 14 : 18,
paddingBottom: compact ? 16 : 20,
paddingVertical: compact ? 10 : 12,
backgroundColor: pressed ? '#080808' : 'transparent',
})}
>
@@ -324,13 +323,20 @@ export const PostCard = React.memo(PostCardInner);
* every feed surface (timeline, author, hashtag, post detail) can pass
* it as ItemSeparatorComponent and get identical spacing / colour.
*
* The line colour (#2a2a2a) is the minimum grey that reads on OLED
* black under mobile-bright-mode gamma — go darker and the seam vanishes.
* Height 1 is one logical px (hairline on retina). No horizontal inset:
* Twitter runs the seam edge-to-edge and it looks cleaner than a gap.
* Layout: 12px blank space → 1px grey line → 12px blank space. The
* blank space on each side makes the line "float" between posts rather
* than hugging the edge of the card — gives clear visual separation
* without needing big card padding everywhere.
*
* Colour #2a2a2a is the minimum grey that reads on OLED black under
* mobile-bright-mode gamma; darker and the seam vanishes.
*/
export function PostSeparator() {
return <View style={{ height: 1, backgroundColor: '#2a2a2a' }} />;
return (
<View style={{ paddingVertical: 12 }}>
<View style={{ height: 1, backgroundColor: '#2a2a2a' }} />
</View>
);
}
// ── Inline helpers ──────────────────────────────────────────────────────