Commit Graph

1941 Commits

Author SHA1 Message Date
Alex Gleason dac751b0a9 Show Bluesky like counts and open comment compose dialog inline
Pass post.likeCount to ExternalReactionButton via new count prop so like
counts display from the Bluesky API. Comment button now opens the
ReplyComposeModal with the post URL instead of navigating away.
2026-03-23 21:46:14 -05:00
Alex Gleason b4eecd2588 Extract shared ExternalReactionButton with emoji picker for NIP-73 reactions
The Bluesky page had a broken inline reaction that just published '+' with
no emoji picker. The /i/ page had the full implementation with Popover,
QuickReactMenu, hover-to-open, and custom emoji support. Extracted the
reaction logic into a reusable ExternalReactionButton component and wired
it into both pages, removing ~230 lines of duplicated/inferior code.
2026-03-23 21:13:27 -05:00
Alex Gleason be9bef9824 Make heart button publish NIP-73 kind 17 reaction inline instead of navigating 2026-03-23 21:06:08 -05:00
Alex Gleason 81d2f25ce0 Replace Link wrapper with article+onClick to prevent focus ring on button clicks 2026-03-23 21:03:52 -05:00
Alex Gleason 8cdc65ee6b Wire up Bluesky feed action buttons: comment, share to feed, react, and copy link 2026-03-23 21:01:16 -05:00
Alex Gleason 66a90a445b Redesign Bluesky page as a vertical feed matching the NoteCard layout 2026-03-23 20:58:25 -05:00
Alex Gleason cf454926f9 Remove unnecessary CORS proxy from Bluesky hooks — api.bsky.app supports CORS natively 2026-03-23 20:53:26 -05:00
Alex Gleason e65901efe5 Switch Bluesky API from public.api.bsky.app to api.bsky.app to fix 403 2026-03-23 20:51:42 -05:00
Alex Gleason da0ceddc86 Route Bluesky API requests through corsProxy to avoid CORS errors 2026-03-23 20:50:02 -05:00
Alex Gleason 0ec844c519 Add Bluesky discovery page with trending posts and search 2026-03-23 20:28:15 -05:00
Alex Gleason a80b667327 Add Wikipedia and Archive results to autocomplete search dropdown
Integrate useWikipediaSearch and useArchiveSearch into both the desktop
sidebar dropdown (ProfileSearchDropdown) and mobile bottom-nav sheet
(MobileSearchSheet). At most 1 result from each source is shown, always
positioned after Nostr profiles to preserve profile precedence. Keyboard
navigation indices updated to include the new items.
2026-03-23 13:53:04 -05:00
Alex Gleason 894f692dea Display rich Wikipedia article content on /i/ pages instead of generic link preview
Detect Wikipedia URLs and render a custom WikipediaArticleHeader with hero
image, article title, Wikidata description, expandable extract, and a
Read on Wikipedia footer link. Also uses the Wikipedia API for accurate
page titles in the header bar and SEO metadata, and navigates back to
/wikipedia on the back button.
2026-03-23 13:31:40 -05:00
Alex Gleason a5dead1765 Show only view count number next to eye icon, drop 'views' label 2026-03-23 13:25:11 -05:00
Alex Gleason 02a16cad90 Fix Wikipedia icon to use the correct Simple Icons SVG path 2026-03-23 13:24:13 -05:00
Alex Gleason 4dd1ceb9b4 Add custom Wikipedia icon, use it in page header, card fallbacks, and sidebar 2026-03-23 13:23:22 -05:00
Alex Gleason 18b3da600d Include fair-use images in Wikipedia search thumbnails
Add pilicense=any to the pageimages query so articles with
non-free/fair-use images (common for games, movies, etc.) also
return thumbnails.
2026-03-23 13:19:24 -05:00
Alex Gleason 65c3512835 Add thumbnails to Wikipedia search autocomplete results 2026-03-23 13:16:52 -05:00
Alex Gleason 4e6a055e02 Remove redundant 'Today's Featured Article' badge from hero card 2026-03-23 13:15:18 -05:00
Alex Gleason 12700fd025 Change Wikipedia pills from filter tabs to scrollspy navigation
Pills now highlight based on which section is visible as you scroll.
Clicking a pill smooth-scrolls to that section. The 'All' pill and
filter-based empty states are removed since all sections are always shown.
2026-03-23 13:13:54 -05:00
Alex Gleason 030b277e8f Remove Did You Know and Picture of the Day sections from Wikipedia page 2026-03-23 13:10:21 -05:00
Alex Gleason daf3a38c21 Add /wikipedia page with dynamic featured content from Wikipedia's API 2026-03-23 12:59:33 -05:00
Alex Gleason a10feef57d Add 3-dots menu to badge detail page for sidebar and other actions 2026-03-23 12:37:27 -05:00
Alex Gleason 358e25560f Make only tabs sticky on follow pack detail page 2026-03-23 12:28:55 -05:00
Alex Gleason ba09214817 Make only tabs sticky on list detail page instead of entire header 2026-03-23 12:25:12 -05:00
Alex Gleason 3ba269172c Merge branch 'main' of gitlab.com:soapbox-pub/ditto 2026-03-23 00:48:15 -05:00
Alex Gleason c4a67d5b05 Show list author with avatar and name in list page header
Display a small linked avatar and author name under the list title so
users can see who created the list and click through to their profile.
2026-03-23 00:44:40 -05:00
Alex Gleason 6d71fcaa45 Move image quality setting to Network Settings page
Remove the inline toggle from the post composer toolbar and add
imageQuality to AppConfig instead. The setting now lives in
Settings > Network under 'Image Uploads' with a Compressed/Original
pill toggle, persisted to localStorage like other app settings.
2026-03-23 00:44:30 -05:00
Alex Gleason 651f8a0518 Replace member count with stacked avatar preview on list pages
Remove the 'X members' subtitle from the header and add a row of stacked
member avatars (up to 8) with a clickable '+X more' that switches to the
Members tab, matching the style used in quote post list cards.
2026-03-23 00:42:34 -05:00
Alex Gleason fd740b8c6e Use default TabButton styling for starter pack and list page tabs
Remove custom className/indicatorClassName overrides and icon children
from tab buttons to match the cleaner default style used on badges page.
2026-03-23 00:38:51 -05:00
Alex Gleason 4d07aa050d Add Feed and Members tabs to starter pack detail pages
Starter pack pages now have two tabs: Feed (default) shows posts from all
pack members using useStreamPosts, and Members shows the existing member
list with follow/unfollow buttons.
2026-03-23 00:36:28 -05:00
Alex Gleason 235abf6add Add image quality toggle to post composer
Adds a Compressed/Original toggle button in the ComposeBox toolbar.
When set to Original, images are uploaded as-is without resizing or
re-encoding. Defaults to Compressed.
2026-03-23 00:35:31 -05:00
Alex Gleason 9e26446d7b Pick smallest format (JPEG vs PNG) when resizing images
Instead of always converting to JPEG, encode both JPEG and PNG in
parallel and keep whichever is smaller. Skip re-encoding entirely
when the image already fits within the dimension limit.
2026-03-23 00:32:13 -05:00
Alex Gleason fbf8c328f6 Merge branch 'main' of gitlab.com:soapbox-pub/ditto 2026-03-23 00:22:12 -05:00
Alex Gleason e9fee66560 fix: audit cleanup — fix bugs, perf issues, and stale code in badge system
- Fix parseBadgeATag truncating d-tags with colons (use slice+join)
- Fix useEventStats: replace redundant useQuery wrapper with useMemo
- Fix isAddressableKind: remove incorrect kind 0/3 (replaceable, not addressable)
- Fix useBadgeFeed: add follow list to queryKey, compose abort signals
- Fix BadgesPage: move reorder mutation out of state updater, memoize pendingRefs
- Fix useCreateBadge: add onSuccess cache invalidation for badge-feed and my-created-badges
- Remove dead categories param and t-tag code from useCreateBadge
- Remove unnecessary badge-awards-to invalidation from useAcceptBadge
- Remove redundant queryClient usage from CreateBadgeDialog
- Remove stale 'Achievement' wording from extraKinds badge description
- Clean up NIP.md trailing blank lines
2026-03-23 00:21:02 -05:00
Alex Gleason 83fb9fd370 Extract human-readable title from URL slug for sidebar labels
Instead of showing just the site name (e.g. 'Internet Archive'), parse the
URL path for a readable slug and title-case it. Falls back to embed site
name or hostname when the path has no meaningful slug.
2026-03-23 00:17:57 -05:00
Alex Gleason 062e170501 Add sidebar toggle to profile page 3-dots menu 2026-03-23 00:13:00 -05:00
Alex Gleason 4b386fe592 Show book title and BookOpen icon for ISBN sidebar items
ExternalContentSidebarItem now fetches the book title from OpenLibrary
via useBookInfo for ISBN entries instead of showing the generic 'Books'
label. The icon uses BookOpen instead of the Globe fallback.
2026-03-23 00:07:12 -05:00
Alex Gleason 201dd60cb7 Add sidebar toggle to external content pages and post 3-dots menu
ExternalContentPage (country, URL, ISBN pages) gains a 3-dots menu on
the right side of the action bar with Add/Remove from sidebar.

NoteMoreMenu gets an Add/Remove from sidebar item after 'Add to list',
so any post can be pinned to the sidebar from its options menu.

Both locations toggle between add (PanelLeft icon) and remove (Trash2
icon) based on whether the item is already in the sidebar.
2026-03-23 00:02:00 -05:00
Alex Gleason e2503f3573 refactor: remove custom badge tag extensions (t categories and tier)
Remove all non-standard NIP-58 extensions:
- Delete BadgeTierPill component and badge tier system (bronze/silver/gold/diamond)
- Delete isShopBadge, isAchievementBadge, getBadgeTier, BadgeTier type
- Delete publish-achievement-badges.sh script
- Remove kind 30009 section from NIP.md
- Clean up badge category pills from detail page and tier pills from badge rows

Badges now use pure standard NIP-58 with no custom tags.
2026-03-22 23:59:03 -05:00
Alex Gleason 3bbb6eae7e Toggle sidebar action on list detail page: add or remove
The share dropdown on ListDetailPage now shows 'Remove from sidebar'
with a trash icon when the list is already pinned, instead of hiding
the action entirely. This lets users unpin lists without entering
sidebar edit mode.
2026-03-22 23:57:47 -05:00
Alex Gleason b782297514 Support external content (URLs, iso3166, isbn) as sidebar items
External i-tag identifiers like https:// URLs, iso3166:US country
codes, and isbn: values can now be added as sidebar menu items.

URLs show their favicon and hostname. Country codes show their
flag emoji and name. ISBN shows the book label. Clicking navigates
to /i/<encoded-value>.

The 'Add link' input (renamed from 'Add Nostr link') now accepts
all identifier types: Nostr URIs, URLs, iso3166 codes, and ISBNs.
2026-03-22 23:50:03 -05:00
Alex Gleason 0d8e0053d2 feat: add Feed tab to badge detail page showing posts from holders
The badge detail page now has three tabs: Awarded To, Feed, and
Comments. The Feed tab shows an infinite-scroll feed of kind 1 posts
authored by users who hold the badge, giving a community-feed view
centered around each badge.
2026-03-22 23:45:43 -05:00
Alex Gleason 1c71883dfa feat: make Follows the default tab on /badges and show pending count on My Badges
Follows tab is now first (left) and the default. The pending badges
hook is lifted to the page level so the count can be displayed as a
pill badge on the My Badges tab title, giving users a clear indicator
of badges awaiting acceptance.
2026-03-22 23:39:24 -05:00
Alex Gleason 5e55213315 Use Scroll icon for lists in sidebar, add 'Add to sidebar' on list detail page
Kind 30000 (NIP-51 lists) now shows the Scroll icon instead of the
generic FileText fallback. Added a KNOWN_KIND_ICONS map in
NostrEventSidebarItem for kinds not covered by EXTRA_KINDS.

ListDetailPage gains an 'Add to sidebar' dropdown action that
creates a nostr:naddr sidebar entry for the current list. The
option is hidden once the list is already pinned.
2026-03-22 23:36:22 -05:00
Alex Gleason 11c4675e05 fix: use NIP-85 addr stats (kind 30384) for addressable events
useEventStats now accepts an optional event object. For addressable
events (kinds 30000-39999), it queries kind 30384 stats by the a-tag
coordinate instead of kind 30383 by event ID, so reply/reaction counts
display correctly for badge collections, badge definitions, articles,
and other addressable event types.

All 8 call sites updated to pass the event object.
2026-03-22 23:32:25 -05:00
Alex Gleason bbfbffbc4e feat: add comments section to kind 30008 profile badges detail page
The profile badges detail page now shows a ComposeBox and threaded
reply list (NIP-22 kind 1111) below the NoteCard, so replies are
visible and users can comment directly on badge collection events.
2026-03-22 23:25:06 -05:00
Alex Gleason 34f0cf74cf Add Nostr event/profile items to customizable sidebar
Support nostr: URIs (npub, nprofile, note, nevent, naddr) as
sidebar menu items. Profiles show their avatar and display name;
other events show a kind-based icon and label fetched from relays.

Users can add Nostr links via the 'Add Nostr link' button in
sidebar edit mode. Clicking navigates to /:nip19.
2026-03-22 23:23:17 -05:00
Alex Gleason 89bc522ff7 feat: render quoted badge definitions as compact showcase instead of link preview
Kind 30009 badge definition embeds now show a smaller version of the
badge showcase (centered image with rotating light rays, name, and
description) instead of the generic link-preview card with cover image.
2026-03-22 23:21:51 -05:00
Alex Gleason c12e9128b3 fix: render kind 30008 profile badges as NoteCard on detail page
Previously, navigating to a profile badges event (kind 30008) from the
follows tab fell through to the generic PostDetailContent, which treated
it as a text note and misinterpreted its e/p tags as reply threading.
Now kind 30008 is intercepted in AddrPostDetailPage and rendered with
NoteCard, matching the feed presentation.
2026-03-22 23:17:54 -05:00
Alex Gleason 9e21dc06b3 feat: add react, repost, and comments to badge detail page
- Add action bar with ReactionButton (kind 7), RepostMenu (kind 16),
  and comment count button below the badge info section
- Replace flat awardees list with tabbed interface: 'Awarded To' and
  'Comments'
- Comments tab uses useComments (NIP-22 kind 1111 on addressable event),
  ComposeBox for inline composition, and ThreadedReplyList for display
- Add rotating light rays spotlight effect to the badge detail hero
- Replace full-width image with centered badge showcase (size-36)
2026-03-22 23:04:52 -05:00