Commit Graph

1378 Commits

Author SHA1 Message Date
Alex Gleason ca97d674b6 Move Books higher in sidebar, right after Articles, with distinct icon 2026-03-01 23:14:36 -06:00
Alex Gleason 468b66f9d4 Merge branch 'main' of gitlab.com:soapbox-pub/ditto 2026-03-01 23:13:38 -06:00
Alex Gleason 50e1d21ceb Switch to OpenLibrary Search API for dramatically faster book loading
The trending endpoint returned massive payloads with no field filtering support.
The search API with sort=readinglog and fields parameter returns slim responses
in under a second while still showing genuinely popular books.
2026-03-01 23:12:37 -06:00
Alex Gleason 659033516d Switch books from yearly to hourly trending for faster API response 2026-03-01 23:09:19 -06:00
Mary Kate d2bf94890e Merge branch 'feat/nip-52-calendar-events' into 'main'
Add NIP-52 calendar event support with RSVPs and social activity feed

See merge request soapbox-pub/ditto!21
2026-03-02 05:07:13 +00:00
Alex Gleason 662d290305 Add Books page with trending books from OpenLibrary and show book titles in comment context
- Add /books page displaying popular books fetched from OpenLibrary's trending API
- Add Books entry to sidebar registry so users can add it from the More menu
- Add /books route to AppRouter
- Show book title instead of raw 'isbn:...' in comment context by fetching book info via useBookInfo hook
2026-03-01 23:02:49 -06:00
Mary Kate Fain ba4ddff11b Merge remote-tracking branch 'origin/main' into feat/nip-52-calendar-events
# Conflicts:
#	src/AppRouter.tsx
#	src/components/InitialSyncGate.tsx
#	src/components/NoteCard.tsx
#	src/lib/sidebarItems.tsx
2026-03-01 23:01:39 -06:00
Mary Kate Fain fef31b8079 Remove duplicate Custom Emojis entry from Whimsy section in content settings 2026-03-01 22:57:23 -06:00
Mary Kate Fain 525a8cfc32 Remove activity/RSVP feature and filter toggle from events feed 2026-03-01 22:52:31 -06:00
Mary Kate Fain 2e16083b12 Simplify events feed to Follows/Global tabs with filter toggle for activity 2026-03-01 22:48:46 -06:00
Alex Gleason 9717312d34 Show country at bottom unless exact match or no profile results
Country suggestion only appears at the top of search results when
the query is an exact match on name or code. For prefix matches
(e.g. 'angol' -> Angola), the country appears below profile results.
If there are no profile results, the country is shown at the top.
2026-03-01 22:43:34 -06:00
Mary Kate Fain 57bc0aa4bd Enable floating compose button with coming soon dialog on events feed 2026-03-01 22:40:17 -06:00
Alex Gleason 3b6325af7e Match countries by name prefix instead of exact match only
Queries like 'angol' now match 'Angola'. Prefers exact code matches
first, then the shortest prefix match. Requires at least 2 characters.
2026-03-01 22:40:04 -06:00
Alex Gleason a1de680f72 Restrict country search suggestion to exact name/code match only
Show at most 1 country result, and only when the query exactly
matches a country name or ISO code (case-insensitive).
2026-03-01 22:38:24 -06:00
Mary Kate Fain 1757ef4093 Fix text color in event descriptions and parse JSON-encoded location tags 2026-03-01 22:33:45 -06:00
Alex Gleason 8280f0ee2d Add country suggestions to sidebar search autocomplete
Typing a country name in the search bar now shows matching countries
with their flag emoji, navigating to /i/iso3166:<CODE> on click.
Works on both desktop (ProfileSearchDropdown) and mobile
(MobileSearchSheet) with full keyboard navigation support.
2026-03-01 22:31:24 -06:00
Mary Kate Fain 7647aa8f28 Fix duplicate images in calendar events by hiding link preview thumbnails when cover image is shown 2026-03-01 22:29:20 -06:00
Alex Gleason e5e7dd6564 Merge branch 'main' of gitlab.com:soapbox-pub/ditto
# Conflicts:
#	src/lib/sidebarItems.tsx
2026-03-01 22:23:17 -06:00
Alex Gleason 9d52e3a42c Add World page with country flags grid at /world
Browse all countries in a searchable grid. Clicking a flag navigates
to the existing /i/iso3166:<CODE> external content page. The World
item is also registered in the sidebar so users can add it via the
More menu.
2026-03-01 22:20:38 -06:00
Mary Kate 95deb01787 Merge branch 'emoji-packs' into 'main'
Add NIP-30 custom emoji packs support

See merge request soapbox-pub/ditto!24
2026-03-02 04:19:54 +00:00
Alex Gleason fad790be16 Extract non-component exports to separate modules to fix react-refresh warnings
Move helper functions, types, and constants out of component files into
dedicated lib/hooks modules so each component file only exports components:

- getContentWarning -> src/lib/contentWarning.ts
- isCustomEmoji, getCustomEmojiUrl, buildEmojiMap, ResolvedEmoji, resolveReactionEmoji -> src/lib/customEmoji.ts
- ExternalContent, parseExternalUri, formatIsbn, headerLabel, seoTitle -> src/lib/externalContent.ts
- extractYouTubeId, extractTweetId, and other URL helpers -> src/lib/linkEmbed.ts
- isSingleImagePost -> src/lib/noteContent.ts
- useOnboarding, OnboardingContext -> src/hooks/useOnboarding.ts

Also un-exported module-private symbols in VinesFeedPage and SettingsPage.
2026-03-01 22:15:47 -06:00
Mary Kate Fain 5561240a47 Show preview toggle when compose content contains custom emojis 2026-03-01 22:15:23 -06:00
Mary Kate Fain 068b3a667b Merge remote-tracking branch 'origin/main' into emoji-packs
# Conflicts:
#	src/components/NoteCard.tsx
#	src/contexts/AppContext.ts
#	src/lib/sidebarItems.tsx
#	src/test/TestApp.tsx
2026-03-01 22:13:51 -06:00
Mary Kate Fain ccb0844e98 Fix ESLint errors: move hooks before early return in ThemeContent 2026-03-01 22:10:15 -06:00
Mary Kate Fain 8df5fa7d16 Remove superseded files, fix quick reactions and compose preview for custom emojis
- Remove CustomEmojiPicker.tsx and useUserEmojiPacks.ts (replaced by
  Derek's useCustomEmojis + emoji-mart custom categories)
- Update EmojiPackContent to use local kind 10030 query
- Update EmojiShortcodeAutocomplete to use useCustomEmojis
- Fix quick reaction buttons to render custom emojis as images
- Fix quick reaction buttons to include emoji tag when reacting
- Filter stale custom emojis from quick reaction row
- Add emoji tags to compose box mock event for preview rendering
2026-03-01 22:04:44 -06:00
Mary Kate Fain 84d69b4426 Merge remote-tracking branch 'origin/feat/nip-30-custom-emoji-picker' into emoji-packs
# Conflicts:
#	src/App.tsx
#	src/components/ComposeBox.tsx
#	src/components/EmojiPicker.tsx
#	src/components/InitialSyncGate.tsx
#	src/components/QuickReactMenu.tsx
#	src/contexts/AppContext.ts
#	src/lib/schemas.ts
#	src/lib/sidebarItems.tsx
#	src/test/TestApp.tsx
2026-03-01 22:02:03 -06:00
Alex Gleason d147a25590 Fix all ESLint errors and warnings across 15 files 2026-03-01 21:59:19 -06:00
Alex Gleason 774db2798c Merge branch 'main' of gitlab.com:soapbox-pub/ditto 2026-03-01 21:27:20 -06:00
Alex Gleason afcc5549fa Fix reply to a reaction commenting label 2026-03-01 21:26:21 -06:00
Chad Curtis fed4a66fda fix blurhash crossfade: keep mounted, fade out on image load, img absolute positioned 2026-03-01 20:40:37 -06:00
Chad Curtis 01932ff9cd include kinds 20/21/22 in search media filters and rename Vines to Shorts & Vines 2026-03-01 20:40:37 -06:00
Chad Curtis 5b0aa08df6 add kinds 21 and 22 to profile media query 2026-03-01 20:40:37 -06:00
Chad Curtis c8d198108f videos: horizontal scroll rows, fixed short thumb sizes, fetch 12/page 2026-03-01 20:40:37 -06:00
Chad Curtis 00f612e2f2 merge streams into videos page, remove streams sidebar entry 2026-03-01 20:40:37 -06:00
Chad Curtis ca8ceed831 add NIP-68 photos and NIP-71 videos with instagram/youtube style pages 2026-03-01 20:40:23 -06:00
Derek Ross cc3960354e Resolve kind 30030 emoji packs and fix picker theme for custom themes
Two fixes:

1. useCustomEmojis now resolves ['a', '30030:...'] references in the
   user's kind 10030 emoji list, fetching the referenced kind 30030
   emoji pack events and merging their emoji tags. Previously only
   inline emoji tags were extracted, missing subscribed packs.

2. EmojiPicker theme detection now reads the --background CSS variable
   lightness instead of checking for .dark class on <html>. Custom
   themes set class='custom' (not 'dark'), so the dark class check
   always returned false. Now works for all theme modes: light, dark,
   system, custom, and profile themes.
2026-03-01 21:38:10 -05:00
Mary Kate Fain 2a006145ca Add NIP-30 custom emoji packs support
- Sidebar: Add 'Emoji Packs' item linking to /emoji-packs feed (kind 30030)
- Feed: EmojiPackContent renders pack preview with emoji grid and add/remove button
- NoteCard: Kind 30030 events shown with SmilePlus header and pack content
- useUserEmojiPacks hook: Fetches user's kind 10030 list and resolves referenced
  kind 30030 packs into a flat emoji collection
- EmojiPicker: New 'Custom' tab shows user's NIP-30 emojis alongside native picker
- CustomEmojiPicker: Searchable grid of user's custom emojis grouped by pack
- ComposeBox: Custom emojis insert ':shortcode:' and add emoji tags to published events
- EmojiShortcodeAutocomplete: Suggests custom emojis alongside native ones as you type
- QuickReactMenu: Custom emoji reactions include NIP-30 emoji tags in kind 7 events
- Config: showEmojiPacks and feedIncludeEmojiPacks settings for sidebar/feed control
2026-03-01 20:36:53 -06:00
Alex Gleason 098ba92ae9 Fix off-by-one: use collapseAfter=0 to show exactly 1 ancestor post
collapseAfter=1 was allowing 2 posts before collapsing because the check
is depth >= collapseAfter, and the current depth's NoteCard always renders.
2026-03-01 20:35:22 -06:00
Alex Gleason 89d866fec8 Collapse ancestor chain to 1 post when focused event is a reaction
Add collapseAfter prop to AncestorThread. When set, ancestors beyond that
depth are hidden behind a 'Show earlier posts' button with a dotted thread
indicator. Reactions pass collapseAfter=1 so only the reacted-to post is
immediately visible.
2026-03-01 20:34:07 -06:00
Alex Gleason ce287f5e80 Show ancestor thread chain when navigating directly to a reaction event
The parentEventId was only computed for text notes (isTextNote), so kind 7
reactions never resolved their e-tag parent. Include isReaction in the
condition so the AncestorThread renders the reacted-to post above.
2026-03-01 20:32:07 -06:00
Alex Gleason b59b34a5c6 Fix reaction card alignment: center content against emoji bubble and use size-6 avatar
Add min-h-10 and flex items-center on the content side so the text line
vertically centers against the size-10 emoji bubble. Bump inline avatar
from size-5 to size-6 for better visual balance.
2026-03-01 20:29:36 -06:00
Alex Gleason 4774f0f079 Revert "Use avatar with emoji badge overlay for reaction cards in threads"
This reverts commit f58a0ceed4.
2026-03-01 20:28:17 -06:00
Alex Gleason f58a0ceed4 Use avatar with emoji badge overlay for reaction cards in threads
Replace the standalone emoji bubble with the user's normal avatar plus a
small reaction emoji badge at the bottom-right corner. This keeps the
avatar column aligned with other threaded posts while still making the
reaction visually distinct.
2026-03-01 20:18:10 -06:00
Mary Kate Fain e77849a78a Fix theme copy/edit losing background image and font
ThemeBuilderPage only tracked colors in local state, so importing,
editing, previewing, saving, and publishing a theme all dropped the
font and background properties. Now all code paths pass the full
ThemeConfig (colors + font + background) through applyCustomTheme
and into publishTheme/setActiveTheme.
2026-03-01 20:16:40 -06:00
Alex Gleason e6c971827b Flatten reaction card to a single-line layout for better vertical alignment
Move timestamp inline with name and remove the second row, so the emoji
bubble, avatar, name, 'reacted' label, and timestamp all sit on one line.
2026-03-01 20:14:25 -06:00
Alex Gleason aaae6b5893 Fix reaction emoji bubble alignment to match ancestor thread avatar column
Use size-10 in PostDetailContent to align with the threaded ancestor's
size-10 avatar, preventing a 4px horizontal offset of the thread line.
2026-03-01 20:12:34 -06:00
Alex Gleason 07a25874ae Render kind 7 reaction events as compact activity cards instead of posts
Reaction events now display with a prominent emoji bubble, small inline
avatar, author name, and 'reacted' label — making them visually distinct
from regular posts in both thread ancestors and standalone detail views.
2026-03-01 20:08:46 -06:00
Alex Gleason 616c2db094 Fix ditto-mew gitlab links 2026-03-01 20:03:26 -06:00
Derek Ross 209589e258 Revert "Broaden custom emoji query to include well-known profile relays"
This reverts commit f18e8aefae.
2026-03-01 20:39:11 -05:00
Derek Ross f18e8aefae Broaden custom emoji query to include well-known profile relays
Kind 10030 is a replaceable event that may only exist on relays the
user published to. The default pool (user's NIP-65 relays) may not
have it. Now queries both the default pool AND a broader set of
well-known relays (purplepag.es, relay.nostr.band, etc.) in parallel,
picking the most recent event across both sources.
2026-03-01 20:38:37 -05:00