- Home: lock category carousel height to the tallest page so the
Official Recommendations section below does not jump up when
swiping to a page with fewer categories.
- CollapsibleText: raise default threshold to 25 lines and tighten
the spacing between the expand-all button and the timestamp
(drop the fixed h-8 and use mt-1 instead of mt-1.5).
- formatTime: always render dates as yyyy/m/d HH:mm regardless of
locale, matching the requested timestamp format.
Combine collapsible long-text (main) with adaptive image frame
(this branch). Resolved conflict in ImageWithTextBubble.tsx by
keeping both SingleImageFrame and CollapsibleText imports.
body had height:100% + overflow-x:hidden, which forces computed
overflow-y to `auto` — turning body into its own scroll box at viewport
height. window.scrollY then never moved, so the back-to-top button never
appeared and window.scrollTo was a no-op.
Apply overflow-x:hidden to <html> only; it propagates to the viewport
(still clipping horizontal overflow) while leaving the window as the
vertical scroller.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- BackToTop now only mounts on the /browse feed (covers all / latest /
popular / search) instead of every route.
- Reveal animation duration cut 0.4s -> 0.25s so scrolled-in content
appears faster.
- ScrollToTop also watches `search`, so switching between sort views on
the same /browse path (e.g. 全部资料 <-> 热门资料) returns to the top.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Image bubbles previously used the raw filename as alt text, so a failed
asset load exposed the file name in the broken-image box. Add a reusable
BubbleImage that renders an empty alt and falls back to a neutral
placeholder (ImageOff icon) on error; use it in the album, image, and
image-with-text bubbles, and drop the filename from their aria-labels.
Also add a global ScrollToTop that resets the window on route change so
desktop navigation matches mobile (e.g. clicking a category card no
longer lands at the bottom of the new page). Hash navigations are skipped
so #post-<id> deep-link scrolling still works.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Render the 52x52 preview with an empty alt and an onError handler, so a
broken thumbnail no longer shows the browser's broken-image box (which
leaked the raw filename) — it falls back to the file-type icon instead.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Wrap the card in a stretched link overlay so clicking anywhere (not
just the title) navigates to /resource/:id and scrolls to the matching
bubble. Keep the download button above the overlay so it stays
clickable.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Use thumbnailUrl/posterUrl (and the image url itself for image-type
attachments) inside the 52x52 box of the file/document bubble, falling
back to the file-type icon when no preview is available.
Also tune the deep-link scroll-mt offset (82px / 98px) so a targeted
bubble lands just below the sticky header.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Recommended cards already routed to /browse#post-<id>, but the stream had
no logic to scroll to the target bubble — and the post might not be paged
in yet. MessageStream now resolves the #post-<id> hash, auto-loads more
pages until the bubble renders, scrolls to it, and gives it a brief gold
highlight. Bubbles get scroll-mt so they clear the sticky header.
Also adds a global floating back-to-top button (BackToTop) mounted in
PublicLayout, shown after scrolling past 400px.
Bundles related staging UI work already present in the working tree.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>