Commit Graph

4447 Commits

Author SHA1 Message Date
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
Alex Gleason ea838cca29 fix: remove gradient background from badge showcase container 2026-03-22 22:57:14 -05:00
Alex Gleason 260ac7896c fix: center rotating light rays behind badge image
Separate centering (translate) and rotation (animate) into nested divs
so the rotation transform doesn't override the centering transform.
2026-03-22 22:56:53 -05:00
Alex Gleason 3853c1e6cc feat: redesign badge definition card with centered showcase and rotating spotlight
Replace the link-preview-style layout (full-width image + text below) with
a centered badge showcase: the image is displayed at badge size (112px)
with name and description centered beneath it, and a slow-rotating conic
gradient spotlight behind it for a grand presentation feel.
2026-03-22 22:55:06 -05:00
Alex Gleason 41a82a50ec fix: remove border and background from badge grid in profile badges content 2026-03-22 22:52:27 -05:00
Alex Gleason dd9f2bcbe4 fix: remove border from badge thumbnails to preserve transparency 2026-03-22 22:51:50 -05:00
Alex Gleason bc93fa5dd6 refactor: consolidate badges into two-tab page with create dialog
- Replace three separate pages (/badges/create, /badges/created,
  /badges/manage) with a single /badges page
- Two tabs: 'My Badges' (accepted + pending + created sections)
  and 'Follows' (badge feed from followed users)
- Convert badge creation form into a CreateBadgeDialog opened via FAB
- Remove Global tab
- Delete BadgeCreatePage, BadgeCreatedPage, BadgeManagePage
- Update BadgeShowcaseGrid editPath to /badges
- Simplify useBadgeFeed to only support follows tab
2026-03-22 22:49:11 -05:00
Alex Gleason 6dc10b774e cleanup: remove dead code and fix badge utilities
- Remove unused confetti-pop CSS animation
- Remove unused price/supply/shop params from useCreateBadge
- Fix isShopBadge to check t=shop tag instead of price tag
- Simplify NIP.md badge documentation (remove shop/achievement category lists)
- Sort badge imports alphabetically in AppRouter
2026-03-22 22:39:49 -05:00
Alex Gleason 0db636cfbe refactor: remove mockup features, rename shop to badges
- Delete AchievementsPage and DVM claim-achievement hook (mockup, not real)
- Delete ShopPage shop tab (catalog with no purchase flow)
- Delete shopCategories, useBadgeHolders (unused)
- Create BadgesPage with Follows/Global feed tabs and FAB for badge creation
- Rename /shop -> /badges, redirect /shop -> /badges for bookmarks
- Rename sidebar item from 'Badge Shop' to 'Badges' with Award icon
- Add sidebar ID migrations: shop -> badges, achievements -> badges
- Keep My Badges and Created Badges buttons at top of feed
- Remove DVM constants, BADGE_ACCOUNT_PUBKEY, unused utils from badgeUtils
- Remove DVM documentation from NIP.md
- Update back-links in badge sub-pages to /badges
2026-03-22 22:32:31 -05:00
Alex Gleason 064913d703 fix: address badge MR review feedback
- Fix incorrect npub in publish-achievement-badges.sh (was wrong bech32 encoding)
- Show actual badge names in award notifications by fetching kind 30009 definitions,
  with fallback to un-slugified d-tag identifier
- Strip price/supply UI from shop page and badge detail (no purchase flow exists)
- Document custom badge tag extensions and DVM claim-achievement flow in NIP.md
- Remove unused badge-glow CSS animation (duplicate of pending-glow in Tailwind)
- Make badge award notifications respect user preferences instead of force-enabled
- Add badges toggle to notification settings page
2026-03-22 22:15:34 -05:00
Alex Gleason 4087457b70 Merge remote-tracking branch 'origin/main' into experimental-badges
# Conflicts:
#	src/lib/sidebarItems.tsx
2026-03-22 21:55:31 -05:00
Alex Gleason 0bfdbeea2e Show title and external link below embeds, fix YouTube page title
- Enhanced DiscussBar below embeds (YouTube, Archive.org, Spotify, etc.)
  to show title, author, provider name, and an external link, matching
  the style of generic LinkPreview cards
- Always show the info bar (title, domain, external link) below embeds,
  even on /i/ pages where showActions=false; only hide the Discuss button
- Added native OEmbed fetching for YouTube, Spotify, and Reddit directly
  from their provider endpoints, since the generic link preview proxy
  fails for these sites
- For Archive.org, fetch title/creator from the metadata API and
  transform into OEmbed-compatible shape
- Removed the !title guard in useLinkPreview that discarded OEmbed
  responses without a title field
- Falls back to the generic link preview proxy for unknown providers
2026-03-22 20:11:41 -05:00
Dirk Rost c58c2f52a0 Revert NIP-46 workaround, bump @nostrify/react to 0.2.31 2026-03-22 23:27:46 +00:00
Alex Gleason 7ebe7b0e64 Merge branch 'main' of gitlab.com:soapbox-pub/ditto 2026-03-22 17:58:41 -05:00
Alex Gleason 9982141d9f Add search to Archive page via archive.org advanced search API
Introduces useArchiveSearch hook that queries archive.org by title,
filtered to playable media types (software, movies, audio, live music,
texts), sorted by download count. Results appear in a dropdown with
thumbnails, media type labels, and download counts.

Search bar uses 400ms debounce, skeleton loading states, keyboard
navigation (Enter to select first result, Escape to close), and
outside-click dismissal — matching the existing BooksPage pattern.
2026-03-22 17:58:09 -05:00
Alex Gleason 504cda27da Remove featured hero cards, add Archive as optional sidebar item
Mix all items into the unified grid instead of separating 3 featured
hero cards. Register 'archive' in SIDEBAR_ITEMS so it appears in the
More menu and can be pinned to the left sidebar.
2026-03-22 17:53:04 -05:00
Dirk Rost 5774e8cc85 Merge branch 'fix/upload-and-signing-135-141' into 'main'
Fix NIP-46 signer pubkey bug and add upload timeout

Closes #135 and #141

See merge request soapbox-pub/ditto!103
2026-03-22 22:52:43 +00:00
Derek Ross 6e14c59b4a Fix NIP-46 signer pubkey bug and add upload timeout 2026-03-22 22:52:43 +00:00
Alex Gleason c56a973958 Add source code link to LinkFooter 2026-03-22 17:17:12 -05:00
Alex Gleason fa1e85c90b Add Archive landing page with curated Internet Archive content
Introduces /archive route featuring 40+ handpicked nostalgic items from
archive.org across 6 categories: classic DOS games, public domain films,
audio treasures, classic TV, cartoons/animations, and software history.

Items link to /i/:url pages which already render archive.org embeds
with NIP-73 comment threads. Includes category filter pills, featured
hero cards, and responsive grid layout.
2026-03-22 17:10:50 -05:00
Alex Gleason fd1b78834e Add autoplay=1 to archive.org embed iframes
When users click the play overlay, the iframe now loads with autoplay=1
so the content plays immediately, matching the YouTube embed behavior.
Also adds allow='autoplay' to the iframe attribute so browsers permit
the autoplay request from the embedded frame.
2026-03-22 15:39:01 -05:00
Alex Gleason 894f7c02d8 Fix mobile search result order for URL and identifier suggestions 2026-03-22 15:22:56 -05:00
Alex Gleason 22fc6dfd5b Use transform-scale only for software embeds, responsive iframe for videos
The archive.org embed page has a responsive player for videos/audio
but renders software/games at fixed native pixel dimensions. Fetch the
item's mediatype from the metadata API and branch accordingly.
2026-03-22 15:12:00 -05:00
Alex Gleason 8b73772bf0 Scale archive.org embed iframe with CSS transform to fit narrow viewports
The archive.org embed renders content at native pixel dimensions and
doesn't scale to fill the iframe like YouTube does. On mobile the
550px-wide content overflowed the ~370px container.

Fix: give the iframe its native dimensions and use transform: scale()
with a ResizeObserver to shrink it to fit the container width. Also
reverts the unnecessary overflow-x-hidden on ExternalContentPage.
2026-03-22 15:08:55 -05:00
Alex Gleason dda77c0bdf Fix mobile overflow on external content pages 2026-03-22 15:06:05 -05:00
Alex Gleason cbdbf05cde Use padding-bottom technique for archive.org embed aspect ratio
The CSS aspect-ratio property can cause overflow on narrow viewports.
The padding-bottom percentage trick is always relative to the parent
width, so it scales correctly on mobile.
2026-03-22 15:02:19 -05:00
Alex Gleason 2d508d0d27 Simplify archive.org metadata response parsing 2026-03-22 14:54:56 -05:00