Commit Graph

4447 Commits

Author SHA1 Message Date
Mary Kate Fain 7eb6bbb768 Scope feed tab persistence per feed page
Extract useFeedTab hook that persists the active Follows/Global tab
in sessionStorage with a per-feed key (e.g. ditto:feed-tab:home,
ditto:feed-tab:vines). Each feed page remembers its own tab
independently — switching to Global on the home feed no longer
affects Vines, Videos, Photos, etc.

Applied to Feed.tsx (home), KindFeedPage, BooksPage, VideosFeedPage,
VinesFeedPage, PhotosFeedPage, and EventsFeedPage.
2026-03-07 14:19:18 -06:00
Alex Gleason 63e8e9b7ec Add #m tag filter for webxdc on logged-out homepage
Kind 1063 is generic file metadata, so webxdc events require filtering
by #m=application/x-webxdc. Add extraFilters support to useInfiniteHotFeed
and pass webxdc as a separate filter object with the MIME constraint.
2026-03-07 14:15:40 -06:00
Alex Gleason eeaf6fa2f9 Narrow logged-out homepage to themes, magic decks, color moments, webxdc, treasures, and emoji packs 2026-03-07 14:13:03 -06:00
Alex Gleason ec9e265e55 Replace kind 1 with curated otherstuff kinds on logged-out homepage
Switch the logged-out hot feed from useInfiniteSortedPosts (kind 1 only)
to useInfiniteHotFeed with a curated list of visually rich content types:
photos, videos, articles, vines, music, themes, polls, calendar events,
color moments, follow packs, and emoji packs.
2026-03-07 14:09:17 -06:00
Mary Kate Fain 7a5dedae56 Persist active feed tab in sessionStorage across navigation
The active feed tab (Follows/Global/Communities/saved feeds) was stored
in useState, so it was destroyed when navigating to a post and reset
to 'follows' on return. Now the selected tab is saved to sessionStorage
on change and restored on mount, surviving navigation while still
resetting when the browser tab is closed.

Validates stored tab against core tabs and saved feed IDs to prevent
restoring a deleted feed.

Closes #82
2026-03-07 14:07:12 -06:00
Mary Kate 5433eca08d Merge branch 'fix/search-results-flicker' into 'main'
Fix search results flickering between old and new queries

Closes #72

See merge request soapbox-pub/ditto!56
2026-03-07 20:04:19 +00:00
Mary Kate Fain 15df41d59f Fix search results flickering between old and new queries
When searching from the sidebar while already on /search, the
SearchPage component stayed mounted and its internal state (allEvents,
isLoading) from the previous search would briefly flash before the
new query's effect could clear it.

Fix: wrap SearchPage with a keyed component that uses ?q as the React
key. When the query changes, React unmounts the old instance entirely
and mounts a fresh one — all state initializes cleanly from the new
URL with no transitional renders showing stale data.

Closes #72
2026-03-07 14:01:27 -06:00
Alex Gleason 885425ec34 Add landing hero for logged-out homepage with theme showcase and trending tags
Replace the plain 'Join' CTA banner with an engaging first-impression
experience: logo + tagline, interactive theme swatches that transform
the page on click, and a trending hashtags strip — all above the
existing hot feed. Staggered fade-in animations add polish.
2026-03-07 13:58:39 -06:00
Mary Kate Fain b933abaa2c Fix stale events flashing in useStreamPosts on query change
The useEffect that clears allEvents runs *after* render, so the posts
useMemo would still filter/return old events during the first render
with the new query. Track the current query in a ref and return an
empty array from the useMemo when the query has just changed, preventing
stale results from ever reaching the UI.
2026-03-07 13:50:04 -06:00
Mary Kate Fain 9df5747312 Fix search results flickering between old and new queries
When navigating from the sidebar search, the URL param (?q=) updates
immediately but the local searchQuery state lagged one render cycle
behind (synced via useEffect). During that gap, the old query's
results would briefly flash before being cleared.

Fix: derive an effectiveQuery directly from the URL search params and
use it for all data fetching and conditional rendering. The local
searchQuery state is kept only as the controlled input value.

Closes #72
2026-03-07 13:46:18 -06:00
Mary Kate 048a53c411 Merge branch 'feat/share-to-socials' into 'main'
Add native share button to posts, post detail, and profiles on mobile

Closes #39

See merge request soapbox-pub/ditto!55
2026-03-07 19:42:07 +00:00
Mary Kate Fain be1771e4e5 Only show Share button on mobile
On desktop the URL bar and 'Copy Link' in the More menu already
cover sharing. The native share sheet is the unique value on mobile,
so hide the button at the sidebar breakpoint (900px+).
2026-03-07 13:38:38 -06:00
Mary Kate Fain a45c5c6647 Add Share button to posts, post detail, and profiles
Add a dedicated Share button using the Web Share API with clipboard
fallback across three locations:

- NoteCard action bar (between Zap and More)
- PostDetailPage action bars (both compact and expanded views)
- ProfilePage header (between More and Zap buttons)

On mobile and supported desktop browsers, tapping Share opens the
native OS share sheet with all installed apps (Twitter, WhatsApp,
etc.). On unsupported browsers, falls back to copying the link to
clipboard with a toast confirmation.

Closes #39
2026-03-07 13:29:08 -06:00
Mary Kate f9940cd195 Merge branch 'fix/share-theme-help-text' into 'main'
Improve help text on share theme toggle for clarity

Closes #80

See merge request soapbox-pub/ditto!54
2026-03-07 19:26:54 +00:00
Alex Gleason a29ecc5b20 Merge branch 'opencode/1772908553' 2026-03-07 13:23:28 -06:00
Mary Kate Fain c1e9db848a Remove 'page' from profile description text 2026-03-07 13:13:02 -06:00
Mary Kate Fain ffd78e428e Add gap between theme sync label and toggle switch 2026-03-07 13:05:15 -06:00
Mary Kate Fain c435b0de94 Improve help text on share theme toggle for clarity
Rename toggle to 'Sync app theme with your profile theme' and update
description to explain what disabling it actually does, so users
understand it unsyncs the two themes rather than just stopping posts.
Consistent wording across both ThemeSelector and ThemesPage.

Closes #80
2026-03-07 13:01:13 -06:00
Mary Kate 4ebe893cde Merge branch 'fix/addressable-event-comment-preview' into 'main'
Add context preview for comments on addressable events (vines, music, etc.)

Closes #75

See merge request soapbox-pub/ditto!53
2026-03-07 18:56:11 +00:00
Mary Kate c2378e4dff Merge branch 'fix/copy-theme-background-not-applied' into 'main'
Fix copied theme background not applying until page refresh

Closes #71

See merge request soapbox-pub/ditto!52
2026-03-07 18:52:34 +00:00
Mary Kate Fain 73a048aeae Use sidebar icons for addressable event preview cards
Look up the content type's icon from CONTENT_KIND_ICONS (same icons
used in the sidebar) and display it in both the label row and as the
fallback thumbnail placeholder.
2026-03-07 12:50:45 -06:00
Mary Kate Fain b401a21cbc Add context preview for comments on addressable events (vines, music, etc.)
When viewing a kind 1111 comment that replies to an addressable event
like a vine (34236), music, or article, the detail page now shows a
rich preview banner with thumbnail, kind label, title, and author —
matching the existing pattern for URL, profile, and community previews.

Works generically for all addressable event kinds by looking up the
kind label from EXTRA_KINDS and extracting thumbnails from image/imeta
tags.

Closes #75
2026-03-07 12:46:11 -06:00
Alex Gleason 9b0b546645 Remove dead CommentsSection component and rewrite nostr-comments skill
Delete src/components/comments/ (CommentsSection, CommentForm, Comment)
which were never imported by any page or component. Rewrite the
nostr-comments SKILL.md to document the actual commenting architecture:
ComposeBox, ThreadedReplyList, useComments, usePostComment, and the
dual NIP-10/NIP-22 protocol system used across PostDetailPage,
ExternalContentPage, and other pages.
2026-03-07 12:44:02 -06:00
Mary Kate 585dc502cb Merge branch 'fix/profile-tab-form-labels' into 'main'
Improve profile custom tab builder form labels and field order

Closes #68

See merge request soapbox-pub/ditto!51
2026-03-07 18:33:55 +00:00
Mary Kate Fain d6224b26b3 Fix copied theme background not applying until page refresh
The profile page effect cleanup was restoring the background using a
stale previousBgCss value captured when the effect first ran, before
'Copy Theme' was clicked. Now the cleanup always rebuilds background
CSS from ownThemeRef.current (like colors already do), so it reflects
any theme changes made while on the profile page.

Closes #71
2026-03-07 12:32:00 -06:00
Mary Kate Fain b2ad06ae0a Fix Kinds popover not opening inside profile tab dialog
Portal the popover into the DialogContent element using
PortalContainerProvider so Radix pointer-event blocking
doesn't prevent the dropdown from opening.

Closes #68
2026-03-07 12:25:07 -06:00
Mary Kate Fain 77cd2de47a Improve profile custom tab builder form labels and field order
Rename 'Search query' to 'Filter by Word' and 'Kinds' to 'Content Kinds'
for clarity. Reorder fields to: Tab name, Content Kinds, Filter by Word,
Authors — placing the higher-order Kind filter before the word filter.

Closes #68
2026-03-07 12:18:43 -06:00
Mary Kate eccbc1d7c7 Merge branch 'fix/country-feed-sort-order' into 'main'
Fix country feeds showing posts oldest-first instead of newest-first

Closes #64

See merge request soapbox-pub/ditto!50
2026-03-07 18:18:16 +00:00
Mary Kate Fain f25f2925ba Fix country feeds showing posts oldest-first instead of newest-first
Country feeds (iso3166) are social feeds and should display in
reverse-chronological order. URL and ISBN comment threads keep
the existing oldest-first conversation order.

Closes #64
2026-03-07 12:13:50 -06:00
Mary Kate a63a1fb165 Merge branch 'fix/books-feed-back-arrow' into 'main'
Add back arrow to Books feed header on mobile

Closes #79

See merge request soapbox-pub/ditto!49
2026-03-07 18:13:25 +00:00
Mary Kate Fain 2b6fddeab9 Add back arrow to Books feed header
Closes #79
2026-03-07 12:06:57 -06:00
Alex Gleason 2e6d328335 Remove mobile bottom navigation bar
Delete MobileBottomNav component and all related code including the
noBottomSpacer layout option, bottom nav height spacer, and CSS
calculations that accounted for the bottom nav height.
2026-03-07 11:57:17 -06:00
Alex Gleason 60e3ead6ed Merge branch 'main' of gitlab.com:soapbox-pub/ditto 2026-03-07 11:52:48 -06:00
Alex Gleason bed84c6285 Fix iOS Safari auto-zoom on input focus by ensuring 16px minimum font size on mobile 2026-03-07 11:42:54 -06:00
Alex Gleason c3bc7aea61 Merge branch 'fix/gif-picker-scrolling' into 'main'
Fix GIF picker scroll inside dialogs by portaling into modal container

See merge request soapbox-pub/ditto!45
2026-03-07 16:59:12 +00:00
Chad Curtis 01114f25c3 Fix CommentContext to show 'Replying to @user' for nested comment replies
When a kind 1111 comment's parent is another comment (k tag = '1111'), show
'Replying to @user' with a link to the parent comment instead of the generic
'Commenting on [root]' label that always pointed to the thread root.
2026-03-07 02:00:06 -06:00
Chad Curtis e43a8ce72a Add kind 1111 (NIP-22 comment) notifications
- Include kind 1111 in all three notification query filters (useNotifications, useHasUnreadNotifications, useNativeNotifications)
- Add CommentNotification component with context-aware action label: 'replied to your comment' when parent kind is 1111, otherwise 'commented on your post'
- Add 'New comment' title for native/browser push notifications
- Include kind 1111 in the Mentions tab filter alongside kind 1
2026-03-07 01:56:57 -06:00
Lemon 5a0bc346b7 fix: make emoji/GIF picker dialog dismiss on iOS tap-outside
- Raised dialog z-index from z-[150] to z-[250] so the overlay sits above
  CommentsSheet's backdrop (z-[200]) and receives touch events
- Removed stopPropagation from DialogOverlay/DialogContent onClick handlers
  which was preventing Radix DismissableLayer's deferred click listener from
  reaching document on iOS Safari

On iOS touch, Radix registers a one-time click listener on document after
pointerdown. The stopPropagation was intercepting that click before it could
reach document, so the dismiss callback never fired. Z-index stacking now
handles isolation between the dialog and the CommentsSheet backdrop.
2026-03-06 23:16:30 -08:00
Lemon f0e04e2569 Convert emoji/GIF/stickers picker from popover to centered dialog
The picker was positioned relative to the trigger button via a Popover,
which felt awkward especially on smaller screens or inside other modals.
Now renders as a centered Dialog with a backdrop for a more traditional
modal experience.
2026-03-06 23:16:30 -08:00
Lemon 54c4d7e47c Fix GIF picker scroll inside dialogs by portaling into modal container
Radix Dialog's RemoveScroll blocks wheel events on elements outside the
Dialog's DOM tree. The GIF picker Popover was portaling to document.body,
placing it outside the RemoveScroll boundary. Trackpad scrolling was
blocked while scrollbar dragging still worked.

Added PortalContainerContext so PopoverContent can portal into the modal
element instead of document.body when rendered inside a dialog/modal.
2026-03-06 23:16:30 -08:00
Alex Gleason 08e02190b4 URL-encode relay links in NoteContent to preserve slashes 2026-03-06 21:37:33 -06:00
Alex Gleason ae2f2d24ca Merge branch 'main' of gitlab.com:soapbox-pub/ditto
# Conflicts:
#	src/AppRouter.tsx
2026-03-06 21:36:05 -06:00
Alex Gleason ab5759a256 Simplify relay feed query: limit to 15, remove redundant sort 2026-03-06 21:35:10 -06:00
Alex Gleason fa484dc03d Use /r/* wildcard route for relay pages, supporting bare URLs with slashes 2026-03-06 21:32:35 -06:00
Alex Gleason 24e940ae63 Linkify wss:// URLs in post content to internal relay pages 2026-03-06 21:27:09 -06:00
Alex Gleason 4bc9a49819 Filter relay feed by supported kinds instead of empty filter 2026-03-06 21:24:11 -06:00
Alex Gleason b535ac37e3 Add /relay/* route with NIP-11 info and relay-specific feed 2026-03-06 21:16:05 -06:00
filemon 3abdbc2d88 cleanup: remove visibility feature, info card, and polish bottom bar spacing
Removed features:
- handleToggleVisibility handler and all related props
- Visibility quick action button from top-right floating actions
- Visibility action from BlobbiActionsModal
- Info card section (Generation, Experience, Care Streak, Last Active)

Removed unused code:
- InfoItem component
- formatTimeAgo helper function
- Card/CardContent imports

Bottom bar spacing adjustments:
- Container padding: px-2 → px-3
- Grid gap: gap-1 → gap-2
- Group internal gap: gap-0.5 → gap-1
- Center button margin: mx-1 → mx-2
- Button padding: px-2.5 → px-3
- Button min-width: 52px → 56px

Result: Cleaner dashboard with more breathing room in the bottom bar
2026-03-06 23:46:18 -03:00
filemon 241f234a82 polish: refine bottom bar layout and change center icon to Sparkles
Layout changes:
- Switch from flex justify-between to 3-column grid layout
- Left group now uses justify-end (closer to center)
- Right group now uses justify-start (closer to center)
- Reduce group gap from gap-1 to gap-0.5
- Reduce container padding from px-3 to px-2

Center button adjustments:
- Reduce vertical offset from -mt-6 to -mt-4 (more integrated)
- Reduce size from size-14 to size-12
- Add mx-1 for controlled horizontal spacing
- Replace Zap icon with Sparkles (better fits Blobbi identity)
- Reduce icon size from size-6 to size-5

Side button adjustments:
- Reduce horizontal padding from px-3 to px-2.5
- Reduce vertical padding from py-2 to py-1.5
- Reduce min-width from 60px to 52px

Result: More compact, balanced bottom bar with groups visually
closer to the center action button
2026-03-06 23:39:44 -03:00
filemon 28ee5b6881 feat: add bottom action bar and modal system to BlobbiPage
UI adjustments:
- Move top-right floating buttons lower for visual balance
- Remove switch button from top-right (now in bottom bar)
- Add fixed bottom action bar with left/center/right layout:
  - Left: Blobbies (opens selector), Missions (placeholder)
  - Center: Actions button (opens actions modal)
  - Right: Shop (placeholder), Inventory (placeholder)

New components:
- BlobbiBottomBar: Fixed bottom navigation bar
- BlobbiActionsModal: Rest/Wake and Hide/Show actions
- BlobbiPlaceholderModal: Reusable placeholder for future features
- BlobbiInfoModal: Detailed Blobbi information display
- BottomBarButton: Reusable button for bottom bar

Behavior:
- Blobbies button opens existing selector modal
- Actions modal contains functional Rest and Visibility toggles
- Info button (top-right) opens detailed info modal
- Placeholder modals ready for Missions, Shop, Inventory features
2026-03-06 23:34:21 -03:00