Commit Graph

2285 Commits

Author SHA1 Message Date
Alex Gleason 5100b76ad3 fix: improve contrast on focused emoji category text in picker
Increases the opacity of emoji-mart nav button text from 0.65 to 0.85
by injecting CSS overrides into the shadow DOM. This improves readability
and meets WCAG contrast requirements for the category navigation icons.

Fixes #174
2026-03-25 18:28:45 -05:00
Alex Gleason d0e39ed8bf Fix blank pages for logged-out users on Videos, Vines, Photos, Events, Books
useFeedTab defaulted to 'ditto' when logged out, but pages like
Videos only accept ['follows', 'global'] as valid tabs. The 'ditto'
default was never validated against validTabs, so no feed query
matched and nothing loaded. Now the default is validated and falls
back to the last valid tab ('global') when it's not in the list.
2026-03-25 16:20:23 -05:00
Alex Gleason 64e11e4001 Replace full images in compact post views with 'Image' indicator chip
Embedded/quoted posts (EmbeddedNote, EmbeddedNaddr) no longer display
full image thumbnails. Instead, images are shown as a small icon+label
indicator at the bottom, consistent with how videos and audio are
already represented. This keeps compact views lightweight and focused
on text content.
2026-03-25 13:48:23 -05:00
Alex Gleason 0d6ad1d3d5 Fix illegible inline code in dark mode prose views
Add prose-code:text-foreground so inline code elements use the theme
foreground color instead of the typography plugin default (dark gray),
which was invisible against the muted background in dark mode.
2026-03-25 13:37:02 -05:00
Alex Gleason f680ccd75d Fix invisible bold text and other prose colors in dark mode
The Tailwind Typography plugin sets bold/strong text to gray-900 by default,
which is invisible on dark backgrounds. Added prose-strong:text-foreground
and other theme-aware color overrides for list markers, blockquotes, rules,
and table headers across all markdown prose views.
2026-03-25 13:33:08 -05:00
Alex Gleason be456853b0 Fix text layout gaps in markdown prose views by adding break-words and code styling
Long unbreakable strings (sha256 hashes, URLs, base36 pubkeys) in NIP documents
and articles caused large word-spacing gaps in narrow containers. Added break-words,
horizontal scroll for code blocks, and consistent inline code styling to
CustomNipCard, ArticleContent, and PullRequestCard.
2026-03-25 13:04:12 -05:00
Alex Gleason a921e640cc Add copyable Nostr clone URI to git repo cards
Port NostrURI module from Shakespeare to generate nostr:// clone URIs
from kind 30617 event data (pubkey, d-tag, relays). Display the Nostr
clone URI in GitRepoCard as the sole clone URL, replacing the previous
HTTPS clone URL. Also use the nostr:// URI for Shakespeare clone links.
2026-03-25 12:55:09 -05:00
Alex Gleason 0668d6602a Fix FAB ignoring custom avatar shape due to unconditional rounded-full
The FAB background div always had rounded-full applied, which added
border-radius: 9999px even when an emoji mask was active. This caused
square (and other non-circular) avatar shapes to still appear rounded.
Now rounded-full is only applied when there is no emoji shape mask,
matching the pattern used by the Avatar component.
2026-03-25 11:04:06 -05:00
Alex Gleason 264358c223 Upgrade @nostrify/nostrify 0.50.5 -> 0.51.0 and @nostrify/react 0.3.0 -> 0.3.1
Includes NRelay1 AUTH fix for correct NIP-42 challenge handling.
2026-03-25 01:37:07 -05:00
Alex Gleason 3252ae2247 Add NIP-42 relay authentication support
Sign kind 22242 AUTH events automatically when relays send challenges.
Uses a signer ref pattern so the pool doesn't need to be recreated
when the user logs in/out or switches accounts.
2026-03-25 01:15:36 -05:00
Alex Gleason 6dde7bba0f Improve kind 4 DM display: simplify card style and add compact view for embeds
Remove gradient background and encryption footer from the full card, use
a clean bordered card with centered sender description. Add
EncryptedMessageCompact for quote posts, reply indicators, and the reply
composer — dispatched from EmbeddedNote like vanish events.
2026-03-25 00:26:07 -05:00
Alex Gleason a3acf48091 Display kind 4 encrypted DMs as mail-in-transit instead of raw ciphertext
Kind 4 (NIP-04 encrypted DM) events were rendering their encrypted
content as plain text. Now they show a visual card with sender and
recipient avatars connected by a mail icon, with encryption type
detection (NIP-04 vs NIP-44) displayed in a footer badge with a lock icon.

Registered kind 4 across NoteCard, PostDetailPage, and CommentContext.
2026-03-24 23:55:37 -05:00
Alex Gleason 1b85be36f5 Fix theme icon in NoteCard: use Sparkles instead of Palette 2026-03-24 23:07:39 -05:00
Alex Gleason b7b84a8cc4 Merge branch 'main' of gitlab.com:soapbox-pub/ditto 2026-03-24 22:24:37 -05:00
Alex Gleason 0459590d24 Replace domain bar with favicon next to the title 2026-03-24 22:12:35 -05:00
Alex Gleason a8fed56929 Always display 'nsite.lol' as domain, ignore OEmbed provider_name 2026-03-24 22:11:13 -05:00
Alex Gleason 973e62115d Show 'nsite.lol' instead of the full gateway URL in the domain bar 2026-03-24 22:09:20 -05:00
Alex Gleason beee52e3e5 Remove unused 'Users' import to fix ESLint error 2026-03-24 22:08:26 -05:00
Alex Gleason 2ad3fe1e4a Render nsite events with rich link preview from OEmbed data 2026-03-24 22:05:25 -05:00
Alex Gleason 215ae07143 Enable development kinds in feed by default 2026-03-24 21:52:54 -05:00
Alex Gleason 8143d8b9ac Add Zapstore apps (32267) to development feed kinds 2026-03-24 21:51:58 -05:00
Alex Gleason 73b063bf1b Fix plural kind labels in comment context — use singular forms only
The fallthrough to EXTRA_KINDS produced plural/categorical labels like
'requests to vanish' and 'user statuses'. Now getKindLabel only uses
KIND_LABELS which has proper singular forms ('a request to vanish',
'a status'). Added missing entries for kinds 6, 16, 62, 30315.
2026-03-24 21:39:50 -05:00
Alex Gleason bf4ec364f7 Fix theme icon to Sparkles and rephrase profile badges to 'by @User'
- Themes use Sparkles (matching sidebar), not Palette (that's color moments)
- Profile badges now reads 'Commenting on profile badges by @Mary'
  instead of 'Commenting on @Mary's profile badges'
2026-03-24 21:37:11 -05:00
Alex Gleason 1c6ccaaeca Use correct icons in CommentContext KIND_ICONS matching sidebar and NoteCard
CardsIcon for Magic decks, ChestIcon for geocaches/found logs,
Clapperboard for vines, Music for tracks/playlists, Camera for photos,
Film for videos, GitBranch for repos, GitPullRequest for PRs,
BookOpen for articles, Podcast for episodes/trailers, BarChart3 for polls,
PartyPopper for follow packs, Palette for color moments.
2026-03-24 21:35:16 -05:00
Alex Gleason 946e5823bd Improve CommentContext display for all supported kinds
- Add kind-specific suffixes: badge, theme, follow pack, emoji pack, etc.
- Add kind-specific postfixes: apps show 'on Zapstore', releases show 'release'
- Profile badges (30008) show '@User's profile badges' with author hover card
- Add icons for all supported kinds (Award, Palette, Package, etc.)
- Add BookOpen icon inline next to book titles in ISBN context
- Add @ prefix to author names in reaction context
- Expand KIND_LABELS to cover all Ditto-supported kinds with proper articles
2026-03-24 21:29:19 -05:00
Alex Gleason acddb196d5 Add hover card previews for books and countries in CommentContext
- IsbnCommentContext: Wrap book title link in HoverCard showing cover
  thumbnail, title, and authors (reusing useBookInfo data)
- CountryCommentContext: New component extracted from ExternalCommentContext,
  wraps country link in HoverCard showing flag, region/country label,
  name, and parent country for subdivisions
- Both follow the same HoverCard pattern as UrlCommentContext
2026-03-24 21:17:27 -05:00
Alex Gleason 3b6633c330 Add missing ProfileHoverCards to author links across embed and context components
- EmbeddedNaddrCard: Add MaybeProfileHoverCard wrapper on avatar and
  name links with disableHoverCards prop (matching EmbeddedNoteCard)
- NoteCard EventActionHeader: Wrap author name in ProfileHoverCard
- CommentContext: Wrap author links in ReplyToCommentContext,
  ProfileCommentContext, and ReactionCommentContext
- LiveStreamPage ParticipantRow: Wrap avatar and name links
2026-03-24 21:06:13 -05:00
Alex Gleason 4fecb7b32e Show globe icon for nsites in embed cards instead of parent category code icon
Add KIND_SPECIFIC_ICONS override map in extraKinds.ts so kinds in
extraFeedKinds arrays get their own icon instead of inheriting the
parent def's icon. Nsites (15128/35128) now show Globe, patches
show GitPullRequestArrow, etc.
2026-03-24 20:59:03 -05:00
Alex Gleason a8cb7240bf Use specific kind labels in embed cards instead of parent category name
Add getKindLabel() to extraKinds.ts as the canonical resolver for
per-kind labels. Kinds in extraFeedKinds (like nsites 15128/35128)
now show 'nsite' instead of the parent category 'development'.
2026-03-24 20:57:20 -05:00
Alex Gleason d94ff90bc7 Show kind label with icon in compact embed cards for non-text kinds
Embed cards for non-text kinds (nsites, follow packs, etc.) now show a kind
label line with icon below the title/description, giving context about what
the event is. Previously a quoted nsite just showed 'ditto' with no indication
it was an nsite deployment.
2026-03-24 20:53:13 -05:00
Alex Gleason ae236718e3 Remove NOTECARD_KINDS — render all quote posts and hover cards as compact embed cards
Quote posts and hover previews should always be compact (author + title/content).
Rendering a full NoteCard with action headers, buttons, and nested card components
inside a quote post or hover card is too much UI for an inline context.

- Remove NOTECARD_KINDS from EmbeddedNote.tsx and EmbeddedNaddr.tsx
- Remove NoteCard imports from both embed components
- Add tag-based metadata fallback (title/name/d, summary/description) to
  EmbeddedNoteCard for non-text kinds with empty content
- Update AGENTS.md checklist to reflect that embeds no longer need per-kind registration
2026-03-24 20:48:20 -05:00
Alex Gleason ebafc87fd5 Improve CommentContext consistency and unify event preview rendering
- Extract shared CommentContextRow wrapper to eliminate duplicated div/className/skeleton patterns
- Unify getKindLabel into getEventDisplayName so kind-to-label mappings exist in one place
- Fix inconsistent min-w-0 overflow-hidden between loading and content states
- Add hover card previews to addressable event roots (A tag) using EmbeddedNaddr
- Replace bespoke reply composer embed with shared EmbeddedNote/EmbeddedNaddr components
2026-03-24 20:42:44 -05:00
Alex Gleason 76b9b3d623 Show rocket icon and site name in comment context for nsite events
'Commenting on ditto' becomes 'Commenting on 🚀 ditto nsite' with
a Rocket icon rendered inline.
2026-03-24 20:32:54 -05:00
Alex Gleason b3193bdde0 Use static 'deployed an nsite' header for consistency with other kinds 2026-03-24 20:27:39 -05:00
Alex Gleason 81fe69dc6b Use rocket icon and show site title in nsite action headers
Changes 'deployed an nsite' to 'deployed Ditto' (or whatever the
title tag contains) and swaps the Globe icon for a Rocket.
2026-03-24 20:27:11 -05:00
Alex Gleason 6b2de0f2c1 Document the checklist for implementing new event kinds in the UI 2026-03-24 20:25:04 -05:00
Alex Gleason 8e76650a5f Render nsite events correctly across all views
Add NsiteCard rendering to PostDetailPage, reply composer, quote
embeds, comment context labels, and external content headers so
kind 15128/35128 events display properly everywhere.
2026-03-24 20:23:17 -05:00
Alex Gleason dc406ff276 Use nsite.lol gateway instead of nosto.re 2026-03-24 20:14:50 -05:00
Alex Gleason 221aa03362 Add nsite deployment support to development feed
Display kind 15128 (root site) and 35128 (named site) events as
deployment cards in the development feed with a link to view the
site via the nosto.re gateway.
2026-03-24 20:11:29 -05:00
Alex Gleason dac2bf6bb0 Fix nav search to use word-boundary matching and remove path display
Change search to only match from the start of words, so 'arch' matches
'Archive' but not 'Search'. Remove the pathname text from nav item results.
2026-03-24 19:49:21 -05:00
Alex Gleason 292fe289f7 Add sidebar nav items to autocomplete search results
Allow users to search for sidebar navigation pages (e.g. Notifications,
Settings, Bookmarks) in both the desktop and mobile search autocomplete.
Results appear as instant local matches above profile/identifier results.
2026-03-24 19:47:21 -05:00
Alex Gleason 0666278a58 refactor: use @nostrify/react@0.3.0 for client-initiated NIP-46
Replace inline nostrconnect:// protocol logic with NLogin.fromNostrConnect(),
generateNostrConnectParams(), and generateNostrConnectURI() from upstream
@nostrify/react. Removes ~130 lines of code that is now in the library.
2026-03-24 16:21:00 -05:00
Alex Gleason 1dd8416ea3 Make bottom nav home button dynamic based on homePage config 2026-03-24 16:10:35 -05:00
Chad Curtis 119b209cca Remove unused ARC_UP_OVERHANG_PX import and dead indicatorClassName prop 2026-03-24 11:12:52 -05:00
Chad Curtis 57640b96d6 Fix FAB flashing as circle before shape mask loads
Defer rendering until user metadata is resolved so the emoji shape
mask is available on the first visible frame.
2026-03-24 10:56:37 -05:00
Chad Curtis ad42bb9fca Fix FAB positioning outside feed container on desktop
Split the FAB into mobile (fixed to viewport) and desktop (sticky
within the feed column) so it stays anchored to the bottom-right of
the content area instead of floating relative to the viewport edge.
2026-03-24 10:48:29 -05:00
Chad Curtis 4ac418c78d Fix mobile bottom nav: remove spurious bottom border, fix safe-area spacer opacity 2026-03-24 09:02:57 -05:00
Chad Curtis 94f5dc4b67 Show arc border on MobileTopBar when no sub-header is present 2026-03-24 07:21:01 -05:00
Chad Curtis f30d7e3668 FAB follows bottom nav, subtle shadow, fixed positioning 2026-03-24 07:11:28 -05:00
Chad Curtis 01c32a0e88 Restyle tabs and compose box: arc borders, opacity, layout order 2026-03-24 07:06:12 -05:00