feat(deeplink): jump from banner/rank list to the exact post in All Materials

- FigmaBanner: route same-app linkUrl through SPA navigation so the stream's
  scroll-to-post runs without a full reload; defer pointer capture until a real
  drag starts, fixing plain clicks being swallowed by setPointerCapture
- PopularRankList: rank rows navigate straight to /browse?sort=popular&post=<id>
- MessageStream: ?post= deep links jump directly to the target instead of
  resetting to the top and animating through the stream
- ScrollToTop: skip the top-reset for ?post= navigations so the target page
  handles its own alignment

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
TerryM
2026-05-30 17:52:50 +08:00
parent 0733ea8b18
commit 41299b5b65
4 changed files with 73 additions and 11 deletions

View File

@@ -119,7 +119,9 @@ function PopularRankRow({
<article className="relative flex items-center gap-3 rounded-2xl border border-ark-line bg-ark-panel p-3 transition hover:border-ark-gold/45 md:gap-4 md:p-4">
<button
type="button"
onClick={() => navigate(`/resource/${post.id}`)}
onClick={() =>
navigate(`/browse?sort=popular&post=${encodeURIComponent(post.id)}`)
}
aria-label={r.title}
className="absolute inset-0 z-0 rounded-2xl outline-none focus-visible:ring-2 focus-visible:ring-ark-gold/70"
/>