Share
Status: profile, topic, branch, and trending sharing are implemented. Community sharing is planned.
Every implemented public surface uses one share dialog: a canonical app.lorediv.com link, a live preview card, social buttons, native share, and a downloadable PNG. The same modal is opened from the page share icons, the three-dot menus, and the Share button inside topic/branch tooltips.
Where it opens
| Target | Trigger | Shared link |
|---|---|---|
| User profile | Lorediv icon in the profile header | /u/{handle} |
| Topic | Share icon on the topic card/detail; topic three-dot Share | /topics/{type}/{slug} |
| Branch | Share inside a branch tooltip; branch three-dot Share | Parent topic URL (the card shows the open branch) |
| Trending | Trending three-dot Share | /trending with the current day, board, and filters |
| Community | Planned | /community with the current filters |
The sidebar History Tree opens the main item as a topic tooltip and branches as a branch tooltip. Their Share buttons open the matching card: topic for main, branch for branches.
What the dialog does
- Copy link — copies the canonical public URL.
- Share to — X, Telegram, Facebook, Reddit, and email. These intents accept only URL + text; the image travels through native share or Download.
- Forward — opens the system share sheet with the link and, when supported, the PNG file.
- Download — saves the card PNG.
- Open — opens the generated PNG in a new tab.
- Rank range — trending only; see below.
The URL row shows app.lorediv.com with weight 500 and a copy icon. It is single-line with an ellipsis; the card header shows the full URL.
Cards
All previews are rendered from the real UI, not a screenshot. The PNG is generated only on Forward/Download/Open. Cards are 630px wide and export at 2× resolution with their full height.
- Profile — the live profile components from the header through activity and specialization divs. Neutral 1px frame.
- Topic —
TopicTooltipContent, matching the in-appBranchTooltipstyling: tags/type, title, subtitle, avatar, author + X badge, published month,[main], markdown body, context links, and votes. Accent frame. - Branch — the open branch's
BranchTooltipcontent: author, letter, body, description, context links, date, and votes. Accent frame; the card's own Share button is hidden. - Trending — topics show 10 rows in one column; tags show 30 rows in three columns of 10. Topic rows keep their tags (
--tag) and/type; tag rows use the tag board heat tone. Accent frame.
Topic, branch, and trending cards use the shared accent header (ShareCardHeader): Lorediv icon, full URL, and date. Long URLs stay fully visible: over 58 characters the URL drops from 14px to 12px and breaks onto two lines instead of truncating.
Trending rank ranges
- Topics:
1–10,11–20,21–30,31–40,41–50. - Tags:
1–30,31–60,61–90.
The selected range only changes the image; the shared link stays the current Trending URL.
Rules
- The shared URL is always a canonical public app URL, never a private or API path.
- The card shows public fields only.
- Social intents share URL + text; only native share/Download can carry the PNG.
- Copy link uses the same feedback as every other copy action in the app.
- The dialog is keyboard accessible: Escape closes it, focus is trapped inside, and focus returns to the button that opened it.
- The image preview is live DOM, so it stays in sync with the current theme and content.