Commit Graph

1925 Commits

Author SHA1 Message Date
Chad Curtis f17bc899c8 Fix tall images cropped in lightbox
The wrapRef div had no dimensions, so max-w-full/max-h-full on the img
resolved against the image's own natural size rather than the available
space. Give wrapRef full width/height so percentage constraints work
correctly against the padded slot area.
2026-03-17 09:59:04 -05:00
Chad Curtis d955473c3c Fix long tag/bech32 string overflow in feed tabs, empty states, and note content 2026-03-17 09:29:50 -05:00
Chad Curtis 0fbc562ee0 Fix long hashtag overflow in page title header 2026-03-17 09:26:19 -05:00
Chad Curtis e55b90202b Enable all fun content kinds by default in feed settings 2026-03-17 09:15:59 -05:00
Chad Curtis 230b4820bf fix: pre-fetch VAPID key on mount to avoid insecure-operation error
Browsers (especially Safari/Firefox) require pushManager.subscribe() to be
synchronously reachable from a user gesture. The previous code awaited a
getVapidKey() network call inside enable(), which broke the activation chain
and threw 'DOMException: The operation is insecure'.

Fix: fetch and cache the VAPID key during SW registration on mount so it is
ready in vapidKeyRef before the user ever clicks Enable, making
pushManager.subscribe() the first async call after the user gesture.
2026-03-17 08:48:45 -05:00
Chad Curtis ae60146390 Merge branch 'feat/pwa-notifications' into 'main'
Add Web Push notifications via "nostr-push"

See merge request soapbox-pub/ditto!83
2026-03-17 13:39:05 +00:00
Alex Gleason 33fcae9bd5 Fix right sidebar not hiding when rightSidebar is null
The nullish coalescing operator (??) treats null as nullish, so
`null ?? <RightSidebar />` was falling through to the default.
Use an explicit null check so pages can hide the sidebar by
passing rightSidebar: null.
2026-03-16 23:26:19 -05:00
Alex Gleason 44e5c1719f Expand Messages page to full width by hiding right sidebar 2026-03-16 23:24:42 -05:00
Alex Gleason 5f9f23bcf8 Enable direct messaging with NIP-04 and NIP-17 support 2026-03-16 23:21:27 -05:00
Lemon 547fcd91fe Refactor: clean up notification code for clarity
- useNativeNotifications: remove web push concerns entirely, this hook
  is now Capacitor-only. Web push lifecycle is fully managed by
  usePushNotifications + NotificationSettings.
- usePushNotifications: strip debug logging, tighten doc comments.
- nostrPush: strip debug logging.
- notificationTemplates: trim verbose block comment.
- NotificationSettings: reduce comment noise.
2026-03-16 19:05:45 -07:00
Alex Gleason 5bdd679643 Fix profile tabs spacing: stop stretching tabs, add padding and horizontal scroll 2026-03-16 20:45:25 -05:00
Dirk Rost 79965f80ca Merge branch 'fix/divine-video-media-feed' into 'main'
Fix diVine videos not displaying in profile media feed

Closes #116

See merge request soapbox-pub/ditto!79
2026-03-17 00:29:02 +00:00
Mary Kate ad1361e15b Fix diVine videos not displaying in profile media feed 2026-03-17 00:29:02 +00:00
Dirk Rost 16946b5ec1 Merge branch 'fix/follow-button-page-refresh' into 'main'
Fix follow button on Themes page causing feed to reset

Closes #98

See merge request soapbox-pub/ditto!77
2026-03-17 00:29:01 +00:00
Mary Kate 7da03761ab Fix follow button on Themes page causing feed to reset 2026-03-17 00:29:01 +00:00
Dirk Rost 2fadb12183 Merge branch 'fix/kind-feed-global-tab' into 'main'
Fix kind-specific feeds showing Ditto tab content instead of actual kind data

Closes #122

See merge request soapbox-pub/ditto!75
2026-03-17 00:28:48 +00:00
Mary Kate d2c57e9287 Fix kind-specific feeds showing Ditto tab content instead of actual kind data 2026-03-17 00:28:48 +00:00
Dirk Rost 52eead2423 Merge branch 'remove-sidebar-theme-picker' into 'main'
Remove theme picker from sidebar profile actions

Closes #85

See merge request soapbox-pub/ditto!78
2026-03-17 00:28:47 +00:00
Mary Kate c353e8886a Remove theme picker from sidebar profile actions 2026-03-17 00:28:47 +00:00
Dirk Rost 3e73276845 Merge branch 'fix/status-bubble-italic-clipping' into 'main'
Fix italic status text clipping in NIP-38 status bubbles

Closes #112

See merge request soapbox-pub/ditto!76
2026-03-17 00:28:45 +00:00
Mary Kate b177b3fbd5 Fix italic status text clipping in NIP-38 status bubbles 2026-03-17 00:28:44 +00:00
Lemon 587f0ff442 Fix enable() double-requesting permission and add push debug logging
- Remove redundant Notification.requestPermission() from enable() since
  the caller (NotificationSettings) already handles it from the user gesture.
  On iOS this second call could behave unexpectedly.
- Add console.debug logging throughout the enable flow and RPC send for
  diagnosing push registration issues in production.
2026-03-16 17:17:56 -07:00
Lemon 023f440054 Fix web push notifications: derive toggle from browser state, not NIP-78
- NotificationSettings: on web, drive the push toggle from the hook's
  enabled state (actual browser subscription) instead of the NIP-78
  notificationsEnabled setting which can be stale across devices.
  NIP-78 is still used for the Capacitor/Android path.

- useNativeNotifications: remove the web push auto-disable effect that
  raced against encrypted settings loading, causing disablePush() on
  every page load before settings resolved.

- usePushNotifications: remove REGISTERED_KEY localStorage check from
  the mount restore logic; derive enabled purely from
  pushManager.getSubscription() like the working Ghastly reference.
  Remove dead REGISTERED_KEY code entirely.
2026-03-16 16:57:31 -07:00
Dirk Rost ae46392d82 Merge branch 'fix/ios-theme-glitch-notifications' into 'main'
Fix iOS theme glitch on notification settings page

Closes #86

See merge request soapbox-pub/ditto!81
2026-03-16 23:09:05 +00:00
Dirk Rost f02f883e2e Fix iOS theme glitch on notification settings page 2026-03-16 23:09:05 +00:00
Alex Gleason 6570d7d901 Fix trends count mismatch between TrendsPage and sidebar (ditto#45) 2026-03-16 17:39:39 -05:00
Alex Gleason d7c55aa7d4 Merge branch 'profile-field-presets' into 'main'
feat: add field preset templates and live sidebar preview to profile settings

Closes #105

See merge request soapbox-pub/ditto!73
2026-03-16 21:54:34 +00:00
Dirk Rost 8ba67d03a3 Merge branch 'faq-zapstore-link' into 'main'
Update FAQ with Zapstore link for Ditto

Closes #115

See merge request soapbox-pub/ditto!72
2026-03-16 21:50:04 +00:00
Mary Kate 905317ccf8 Update FAQ with Zapstore link for Ditto 2026-03-16 21:50:04 +00:00
Derek Ross e407b7fdf5 Merge branch 'fix/88-livestream-staleness-status' into 'main'
Fix live streams showing as active when ended, and fix muted icon state

Closes #88

See merge request soapbox-pub/ditto!74
2026-03-16 16:40:28 -04:00
Derek Ross adc370a598 Fix live streams showing as active when ended, and fix muted icon state
Implement NIP-53 staleness heuristic (24h threshold) to mark abandoned
status=live streams as ended. Fetch all streams globally and filter
follows client-side (including p-tag participants for streaming services).
Add Live/Planned/Past pill tabs to the streams strip on /videos.

Also fix pre-existing bug where the volume icon showed unmuted while the
video was actually muted (autoplay requires muted), by syncing the
initial muted state from the media element in usePlayerControls.

Closes #88
2026-03-16 16:36:54 -04:00
Alex Gleason 9dbf364f37 feat: generate sitemap.xml at build time via PUBLIC_URL env var
Add a Vite plugin that writes a sitemap.xml containing all static
routes to the build output. Enabled by setting the PUBLIC_URL
environment variable (e.g. PUBLIC_URL=https://ditto.pub) in .env
or the shell. When PUBLIC_URL is not set, no sitemap is generated.

Also fix a pre-existing LSP type error caused by importing Plugin
from 'vite' while defineConfig came from 'vitest/config' (which
bundles a different vite version). Now both come from 'vite'.
Add explicit 'import process' for node:process.
2026-03-16 15:22:23 -05:00
Mary Kate Fain 5bff1a2533 fix: move add field pill buttons back below the field inputs 2026-03-16 15:12:22 -05:00
Mary Kate Fain 7ad8d0e601 fix: hide Media section and Shakespeare footer when no mediaEvents provided
Conditionally render the Media section and footer only when mediaEvents
is explicitly passed, so the fields-only mobile preview shows just the
profile fields without an empty Media box or the Shakespeare link.
2026-03-16 15:11:11 -05:00
Mary Kate Fain 2306d6c25b fix: exclude media collage from mobile profile fields preview
Only pass fields to the mobile ProfileRightSidebar preview, omitting
mediaEvents and mediaLoading so the media collage section doesn't
render in the inline mobile preview.
2026-03-16 15:09:18 -05:00
Mary Kate Fain 90d62557fe fix: swap Wallet/Link order, use real sidebar component for mobile preview
Swap Wallet and Link pill button order. Replace the barebones mobile
preview with the real ProfileRightSidebar component (with media collage,
audio players, etc.) by adding a className prop to override the default
hidden xl:flex classes. Rename 'Sidebar Preview' to 'Profile Fields
Preview' since on mobile it's not in a sidebar.
2026-03-16 15:08:23 -05:00
Mary Kate Fain e07dd212d5 fix: add plus icon to field preset pill buttons
Each pill now shows a small + icon before the preset icon and label,
making it visually clear they are add-actions rather than just labels.
2026-03-16 15:02:09 -05:00
Mary Kate Fain 42c6faa748 feat: load user's media events in profile settings sidebar preview
Use the same useProfileMedia query as the profile page to fetch the
current user's media events and pass them to ProfileRightSidebar in
the settings page. The sidebar preview now shows the media collage
section just like it appears on the actual profile.
2026-03-16 15:00:34 -05:00
Mary Kate Fain 300d0f94b9 fix: move field preset pills between header and field rows
Place the pill buttons directly after the 'Profile Fields' heading so
users see the available content types immediately, before the existing
Website and Lightning fields.
2026-03-16 14:58:21 -05:00
Mary Kate Fain 4fd3859fb3 feat: replace Add Field dropdown with visible pill buttons
Replace the hidden dropdown menu with a wrapping row of small pill-shaped
buttons, each showing the preset icon and label (Music, Photo, Video,
Email, Link, Wallet, Custom). Users can now see all available field types
at a glance and add one with a single tap. Descriptions are preserved as
hover tooltips on each pill.
2026-03-16 14:56:29 -05:00
Mary Kate Fain a8a09a2c66 feat: show per-field upload spinner on media field rows
Track which field index is currently uploading and replace the upload
button with a spinning Loader2 icon on that specific field row during
upload, giving immediate local feedback instead of relying on the
distant save button spinner.
2026-03-16 14:49:50 -05:00
Mary Kate Fain 410cd2d079 feat: render images and videos inline in profile sidebar fields
Add isImageUrl and isVideoUrl helpers alongside the existing isAudioUrl.
Profile field values that point to image files now render as inline images
(clickable to open full size), and video files render using the VideoPlayer
component. Both the desktop sidebar (ProfileFieldRow) and mobile inline
view (ProfileFieldInline) support the new rendering.
2026-03-16 14:44:37 -05:00
Mary Kate Fain 5384da54e2 feat: warn when pasted URL doesn't match expected media file type
Show an inline amber warning below media field inputs when the pasted URL
doesn't have the right file extension for the field type. For example,
pasting a YouTube link in a Music field warns that it won't work as an
audio player and suggests uploading a file instead. Handles three cases:
wrong type (e.g. image URL in audio field), no recognizable extension
(e.g. youtube.com), and Blossom URLs (always allowed, type can't be
determined from URL).
2026-03-16 14:38:01 -05:00
Mary Kate Fain 4e18d91feb fix: improve media field placeholder language to emphasize uploading
Replace misleading 'URL' placeholder on media fields with action-oriented
text like 'Upload audio or paste direct file link' per preset type. Update
upload button tooltips to say 'Choose file to upload'. Update Music preset
description to say 'Upload' consistently. Each preset now carries its own
valuePlaceholder through the form schema to the row component.
2026-03-16 14:35:39 -05:00
Mary Kate Fain f55c9ec8b4 fix: use app sidebar slot for profile fields preview instead of inline two-column layout
Use useLayoutOptions({ rightSidebar }) to render the live ProfileRightSidebar
preview in the actual app sidebar, replacing the previous approach that put
a fake two-column layout inside the center content area. The form returns
to its original max-w-xl centered layout. Mobile collapsible preview is
retained for screens below xl where the sidebar is hidden.
2026-03-16 14:27:20 -05:00
Mary Kate Fain e5f34659b2 feat: add field preset templates and live sidebar preview to profile settings
Replace the generic 3-item Add Field dropdown with 7 discoverable presets
(Music, Photo, Video, Email, Link, Wallet, Custom) that pre-configure
field type, default emoji labels, and scoped file-accept filters.

- Add tooltips on upload buttons showing accepted file formats per type
- Add HelpTip to Profile Fields section header with new FAQ entries
- Add live sidebar preview panel (right column on xl+, collapsible on mobile)
- Scope file picker accept attribute dynamically per field preset
- No changes to the underlying data model — presets are purely client-side UX
2026-03-16 14:20:36 -05:00
Chad Curtis dea3b7d7b8 fix: profile settings sticky header respects mobile top bar offset 2026-03-16 05:56:48 -05:00
Chad Curtis 93456dcd3b fix: remove border from profile settings sticky header 2026-03-16 05:55:07 -05:00
Chad Curtis 7e9decb66e fix: move profile save button to sticky header 2026-03-16 05:54:04 -05:00
Chad Curtis d53a43b33d fix: update assetlinks.json with correct APK signing certificate fingerprint 2026-03-16 05:29:56 -05:00