Commit Graph

2323 Commits

Author SHA1 Message Date
Chad Curtis 848ac15ef0 Fix CI: remove unused prop, centralize color helpers, extract constants, memoize Sets, move @types/dompurify to devDeps 2026-03-26 19:45:51 -05:00
Chad Curtis ae1f97eb08 Letters: bigger wax seals, adaptive text, inline labels, font loading, SVG sticker fix 2026-03-26 19:17:58 -05:00
Chad Curtis a2fa2a6b96 Letters: redesign inbox as Wii Mail-style envelope grid with modal detail view 2026-03-26 18:51:45 -05:00
Chad Curtis 08a5c808f8 Letters: send animation with envelope, wax seal, Ditto logo, and pre-rendered letter 2026-03-26 18:22:15 -05:00
Chad Curtis c2b14e4f07 Letters: send animation scoped to feed column, inbox updates immediately 2026-03-26 17:40:13 -05:00
Chad Curtis 628dd47772 Letters: send animation with envelope, wax seal, and Ditto logo 2026-03-26 17:35:31 -05:00
Chad Curtis f8612ee20e Letters: arc tab bars for compose, prefs, and inbox 2026-03-26 17:31:15 -05:00
Chad Curtis 172bebe24a Move letter tool buttons into SubHeaderBar below app top bar
- LetterEditor: replace stickyHeader/headerLeft with renderToolbar render prop;
  callers decide where to place the tool buttons
- Both ComposeLetterSheet and LetterPreferencesSection: use SubHeaderBar noArc
  + useLayoutOptions({ hasSubHeader: true }) so tools sit in the sticky sub-header
  matching every other tabbed/sub-header page in the app
2026-03-26 16:58:02 -05:00
Chad Curtis 3c45641ef4 Letters inbox: replace custom FAB with FabButton 2026-03-26 16:53:18 -05:00
Chad Curtis 5eb6af1ab6 Compose send: use FabButton matching app FAB shape; extract FabButton component
- Extract FabButton from FloatingComposeButton (avatar shape mask + primary bg)
- FloatingComposeButton now delegates to FabButton
- ComposeLetterSheet: replace inline send button with FabButton FAB,
  fixed bottom-right on mobile, sticky in column on desktop
- Remove separate page-level send button from compose header
2026-03-26 16:51:31 -05:00
Chad Curtis c1b48058d5 Compose header: use ArcBackground to match app top nav curve 2026-03-26 16:45:42 -05:00
Chad Curtis 33ebeec2ac Compose header: sticky, no border 2026-03-26 16:43:39 -05:00
Chad Curtis a3e5ff9f4a Fix letter preferences header to match app PageHeader style
- LetterEditor: add stickyHeader prop (default true); when false renders a plain
  border-b toolbar row instead of sticky backdrop-blurred header
- LetterPreferencesPage: restore PageHeader (back arrow + title) as the page header
- LetterPreferencesSection: use stickyHeader={false}, remove headerLeft slot usage
2026-03-26 16:41:06 -05:00
Chad Curtis 203ef9dd44 Fix letter stationery theme sync and remove drawer card shape
- useLetterPreferences: simplify to just expose raw saved prefs + isThemeDefault flag,
  no longer conflates theme stationery with saved stationery
- LetterPreferencesSection: always pull from useThemeStationery directly when
  isThemeDefault, persist only on explicit user picks (handleSetStationery),
  sync preview live when theme changes
- ComposeLetterSheet: same pattern — init from themeStationery, switch to saved
  pref once settings load, track explicit user picks to avoid theme override
- LetterEditor drawer: remove bg-background / rounded-b-3xl / border-b card shape
2026-03-26 16:27:31 -05:00
Chad Curtis bdfb8f9dc6 Fix letter compose/prefs: use Ditto theme, single toolbar, inline send button
- ComposeLetterSheet: use themeStationery immediately (no parchment fallback),
  switch to saved pref once encrypted settings load, sync with theme changes
- ComposeLetterSheet: move send button to inline flow below the card (no more fixed overlay)
- LetterPreferencesPage: remove PageHeader — back button + title now live inside
  LetterEditor's headerLeft slot, eliminating the double bar
2026-03-26 16:23:45 -05:00
Chad Curtis 865fabce98 Add Letters inbox page with full letter composing from lief
- Port letter protocol (kind 8211, NIP-44 encrypted) from lief
- LettersPage at /letters with inbox and sent tabs
- ComposeLetterSheet with full stationery, font, frame, sticker, drawing support
- LetterCard with expand-to-read animation and deletion
- LetterPreferencesSection stored in encrypted settings (NIP-78)
- /settings/letters route for letter preferences
- Letters added to sidebar nav
- All letter lib utilities: letterTypes, letterUtils, colorUtils extensions, sanitizeSvg, svgDrawing
- StationeryBackground, StationeryPicker, FramePicker, StickerPicker, DrawingCanvas all ported
2026-03-26 16:11:29 -05:00
Alex Gleason 143b383a62 Remove /messages route and navigation entry 2026-03-26 10:18:22 -05:00
Alex Gleason 5253abf4be Increase badge tilt max rotation from 18 to 30 degrees 2026-03-25 23:00:05 -05:00
Alex Gleason 7aba81cea6 Expand badge tilt interaction zone beyond the image
Add 80px of invisible padding around the badge so the mouse starts
influencing the 3D tilt well before it reaches the image itself.
Negative margin compensates so the layout is unaffected. Glare
coordinates are remapped to the image area within the padded zone.
2026-03-25 22:59:39 -05:00
Alex Gleason 2d14e8e332 Fix 3D badge tilt treating transparent PNG pixels as opaque
Mask the specular glare overlay to the badge image's own alpha
channel so effects only paint over visible pixels. Also remove
the hard-coded rounded-2xl and ring overlay that imposed an opaque
rectangular shape on transparent badge images.
2026-03-25 22:57:36 -05:00
Alex Gleason fe2fa7cfce Add interactive 3D tilt effect to badge detail hero image
Hovering the mouse across the badge image now rotates it in
perspective space with a specular glare overlay that tracks the
cursor, making the badge feel like a tangible, glossy object.

Introduces a reusable useCardTilt hook for pointer-driven 3D
perspective transforms with configurable max tilt and scale.
2026-03-25 22:50:50 -05:00
Alex Gleason 0e46804e25 Support NIP-51 encrypted private items in people lists (kind 30000) 2026-03-25 21:59:21 -05:00
Alex Gleason 0af04eebd2 Reposition profile status speech bubble closer to banner edge with diagonal tail 2026-03-25 21:52:27 -05:00
Alex Gleason d64b19ae1f Fix poll results not showing after voting until page refresh 2026-03-25 21:42:29 -05:00
Alex Gleason 6c626076a5 Remove separate quotes button from action bar, restore combined repost+quotes count 2026-03-25 21:22:38 -05:00
Alex Gleason 5736ea63ba Render theme dialog titles with the selected title font
Apply the theme's title font to the DialogTitle in both the theme
builder dialog (ThemeSelector) and the Edit Profile Theme dialog
(ProfilePage), so users get a live preview of their chosen title
font in the dialog heading.
2026-03-25 20:50:29 -05:00
Alex Gleason 2680bae818 Fall back title font to body font when publishing theme events
When no title font was explicitly set (undefined), published theme
events omitted the title font tag entirely. This happened easily
when users selected Inter as the title font (the default), which
toggled back to undefined due to the deselect behavior.

Now resolveThemeForPublishing falls back titleFont to the body font,
ensuring published events always include both font tags when a body
font is present.
2026-03-25 20:38:21 -05:00
Alex Gleason ddb8c45a70 Fix custom title fonts not loading on app startup
The useApplyFonts hook in AppProvider only loaded body fonts
(activeConfig.font) but never loaded title fonts (activeConfig.titleFont).
The loadAndApplyTitleFont function and CSS variable --title-font-family
existed but were never called on startup/theme change, so components
referencing the variable always fell back to inherit.
2026-03-25 20:29:40 -05:00
Alex Gleason 7511578bf2 Merge branch 'main' of gitlab.com:soapbox-pub/ditto 2026-03-25 20:11:00 -05:00
Alex Gleason 938c9a2f76 Apply title font to all sidebar item types consistently 2026-03-25 20:10:40 -05:00
Alex Gleason 62c026a9a3 Make repost rows in InteractionsModal link to the repost event
Replace UserRow (profile link) with RepostRow (nevent link) in the
reposts tab so clicking a repost navigates to the repost event detail
view, matching the existing behavior for reactions.
2026-03-25 19:13:38 -05:00
Alex Gleason d09629c100 Add standalone repost event views and separate quotes count display
- Render kind 6/16 repost events as standalone viewable cards (similar to
  kind 7 reactions): compact activity-style card showing repost icon, author
  avatar, author name, 'reposted' label, and timestamp
- Support both normal and threaded layouts for repost events in NoteCard
- Add repost detail view in PostDetailPage with full action buttons (reply,
  repost, react, share, more) and ancestor thread pointing to reposted event
- Register kind 6/16 in all kind label registries: CommentContext KIND_ICONS,
  extraKinds KIND_SPECIFIC_LABELS/ICONS, and shellTitleForKind
- Separate quotes count from reposts in action buttons: reposts button now
  shows only repost count, new Quote button shows quote count separately
- Quote button on detail page opens InteractionsModal on the quotes tab
- Quote count sourced from useEventInteractions for accurate counts
  (NIP-85 doesn't provide quote_cnt)
2026-03-25 18:40:58 -05:00
Alex Gleason 50d0bcb5ad Apply title font to sidebar nav items and widget headings
Use the --title-font-family CSS custom property on left sidebar
navigation labels and all right sidebar widget titles (Trends,
Hot Posts, New Accounts, Media, Profile fields). Falls back to
inherit when no title font is configured. Also removes the font
preview section from FontSection.
2026-03-25 18:32:36 -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 9726fe3f8e Move Title font picker above Body in FontSection layout 2026-03-25 14:00:09 -05:00
Alex Gleason 247f174158 Show actual fallback font name in title font picker when unset
Instead of a generic 'Same as body' placeholder, the title font
combobox now displays the body font's name (rendered in that font's
typeface) when no title font is explicitly set. Falls back to
'Default (Inter)' when neither font is set.
2026-03-25 13:59:52 -05:00
Alex Gleason e0bca85cb6 Show 'Same as body' placeholder for title font when unset
The title font combobox was showing 'Default (Inter)' when no title
font was set, but the actual fallback is the body font. Add a
placeholder prop to FontPicker and pass 'Same as body' from
FontSection for the title picker.
2026-03-25 13:56:25 -05:00
Alex Gleason dd55fce88c Redesign font pickers into unified FontSection with title font fallback
- Refactor FontPicker into a bare combobox (no section header, no
  'quick brown fox' preview text)
- Add FontSection component that combines Body and Title font pickers
  in a single section with inline labels and a live preview showing
  both fonts in context (display name + body text)
- Title font falls back to the body font when not explicitly set, so
  the profile display name inherits the theme's body font rather than
  the default Inter
- Update ThemeSelector builder dialog and ProfilePage edit dialog to
  use FontSection with controlled body/title font props
2026-03-25 13:52:20 -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 c9e447ff13 Add title font support for profile display name
Implement the title font feature across the full stack:

- Type system: Add titleFont to ThemeConfig, ThemePreset, ThemeDefinition,
  ActiveProfileTheme interfaces and Zod schema
- Event encoding: Update f-tag build/parse to emit role markers (body/title)
  with backward-compatible parsing of legacy roleless tags
- Font loading: Add loadAndApplyTitleFont with --title-font-family CSS var
- UI: Add Title Font picker to theme builder dialog and profile theme editor,
  with configurable label prop on FontPicker
- Profile rendering: Apply --title-font-family to the display name h2
- Data flow: Thread titleFont through ThemeSelector snapshots, theme
  presets, publish/update, NostrSync, ThemeContent, and diff detection
2026-03-25 13:37:29 -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 2326dac0b4 Add title font role to f tag spec in NIP.md
Extend the font tag format with a required role marker ("body" or
"title") to support a dedicated profile display-name font. Body tags
must be ordered before title tags for backward compatibility. Legacy
3-element f tags without a role are treated as body.
2026-03-25 13:18:07 -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