Commit Graph

852 Commits

Author SHA1 Message Date
Alex Gleason fb2e2e6678 Add pointer cursor and hover underline to 'Replying to' label 2026-02-24 20:47:41 -06:00
Alex Gleason d4f2f05090 Scope reply hover card trigger to only the 'Replying to' text
The HoverCard trigger now wraps only the 'Replying to' label, not the
@username mentions. This prevents the post preview hover card from
conflicting with the profile hover cards on usernames.
2026-02-24 20:46:42 -06:00
Alex Gleason 64768ffafe Disable nested hover cards inside reply context preview
ProfileHoverCards on avatar, name, and @mentions inside EmbeddedNote
are now suppressed when rendered within the reply context hover card,
preventing nested hover card nesting.
2026-02-24 20:43:14 -06:00
Alex Gleason eb51f24d48 Add hover card preview of parent post on 'Replying to' line
Hovering over the 'Replying to @user' context on reply posts now shows
an embedded preview of the parent event, making it easy to see what is
being replied to without navigating away.

- Extract getParentEventId to shared utility (src/lib/nostrEvents.ts)
- Pass parentEventId from NoteCard to ReplyContext
- Wrap the reply context line in a HoverCard with EmbeddedNote preview
2026-02-24 20:40:28 -06:00
Chad Curtis be5249b67d Fix first-click toggle reset from stale closure in useLocalStorage
useLocalStorage's setValue captured 'state' at closure-definition time.
When multiple updateConfig calls fired before a re-render (e.g. NostrSync
and useInitialSync both calling updateConfig on startup), each call's
functional updater received the same stale state snapshot instead of the
accumulated result of previous calls — so later writes silently discarded
earlier ones.

Fixed by using React's built-in functional setState form (setState(prev =>
...)) which always receives the true current state from React's queue,
making all sequential updateConfig calls chain correctly regardless of
render timing.
2026-02-24 20:27:18 -06:00
Chad Curtis e8fe66f91c Fix settings toggles resetting due to sync race conditions
Three bugs caused settings toggles to get stuck or reset:

1. useEncryptedSettings: onSuccess was updating the parsedSettings cache
   under the old event ID, causing NostrSync to re-apply the stale remote
   event when the new one arrived with a different ID. Fixed by using the
   signed event's ID for both cache entries.

2. ContentTypeRow/SubKindRow: handleToggle was building the Nostr payload
   from the local React feedSettings state, which lags behind on rapid
   successive toggles. Fixed by merging against the Nostr-cached settings
   (nostrSettings?.feedSettings) as the base instead.

3. NostrSync: lastSyncedTimestamp ref reset to 0 on every page reload, so
   the 10-second recentlyWritten() guard was the only protection against
   stale relay events overwriting local changes. Fixed by seeding the ref
   with the current remote lastSync on first settings load, skipping
   application of any event that isn't strictly newer than what was
   already in the cache.
2026-02-24 20:24:43 -06:00
Alex Gleason 6d4714f2c9 Merge branch 'settings-reorganize' into 'main'
Reorganize Settings into menu-based navigation with sub-pages

See merge request soapbox-pub/ditto-mew!13
2026-02-25 02:02:31 +00:00
Mary Kate Fain df269b2520 Add 'Edit theme' option to own profile's three-dot menu
Shows a Palette-icon menu item in the ProfileMoreMenu when viewing
your own profile. Clicking it navigates to /settings/appearance.
2026-02-24 19:47:06 -06:00
Alex Gleason 5d008e3745 Fix Bookmarks sticky header losing padding on scroll 2026-02-24 19:44:29 -06:00
Mary Kate Fain 2ac9960b31 Reorganize Settings into menu-based navigation with sub-pages
Replace the single tabbed Settings page with a landing menu that navigates
to dedicated sub-pages, following the Agora pattern:

- Settings landing: card-based menu with icons and descriptions
- Profile: wraps EditProfileForm (auth-gated)
- Appearance: Theme sub-tab with visual theme selector (light/dark/black/pink
  + custom placeholder) and Content sub-tab with existing content settings
- Wallet: dedicated page for NWC wallet management (auth-gated)
- Notifications: push notification enable/disable toggle (auth-gated)
- Advanced: network relays, stats source, and system settings (wallet
  section removed since it has its own page now)
2026-02-24 19:42:40 -06:00
Alex Gleason e66222a7fc Remove descriptions from sidebar Add dropdown, keep only names 2026-02-24 19:31:59 -06:00
Alex Gleason 9c71754df8 Merge branch 'main' of gitlab.com:soapbox-pub/ditto-mew 2026-02-24 19:28:05 -06:00
Alex Gleason 4c10c954c5 Use bottom-20 for mobile FAB position 2026-02-24 19:27:45 -06:00
Alex Gleason 7401022b05 Add spacing-22 to Tailwind config and use bottom-22 for mobile FAB 2026-02-24 19:27:34 -06:00
Alex Gleason 3b5f53eaa8 Fix FAB mobile position: use bottom-24 (valid Tailwind v3 spacing) 2026-02-24 19:26:10 -06:00
Alex Gleason 9d6eea7869 Fix FAB position on mobile to sit above bottom navigation bar 2026-02-24 19:25:25 -06:00
Alex Gleason 4fa5e391c7 Add floating compose button (+) to center column on all feed pages
- FloatingComposeButton accepts kind prop: kind=1 opens compose dialog, others show 'Coming soon'
- FAB positioned sticky bottom-right within center column (visible on all screen sizes)
- Center column gets bottom padding (pb-24) to account for FAB obstruction
- LayoutContext extended with fabKind option passed through layout system
- Home feed uses kind=1, KindFeedPage passes its kind, StreamsFeedPage uses 30311
2026-02-24 19:11:42 -06:00
Chad Curtis f4cbb71e38 Fix Android icon centering by correcting SVG viewBox
The logo was still off-center because the SVG viewBox '-5 -10 100 100'
is asymmetric and doesn't properly frame the logo content.

Changes:
- Update generate-icons.sh: Change viewBox from '-5 -10 100 100' to '0 0 90 80'
- Update vector foreground: Change viewportWidth/Height from 100x100 to 90x80
- Adjust pivot point to match new viewport dimensions
- Regenerate all launcher PNGs and adaptive foreground PNGs with corrected viewBox

The logo should now be properly centered without the left gap.
2026-02-25 01:03:49 +00:00
Alex Gleason b5e813917c Replace Compose button with Add button to enable sidebar items from settings/content 2026-02-24 19:00:54 -06:00
Chad Curtis 407b4f1e4d Fix Android icon centering to remove left gap
The logo was off-center with a gap on the left due to the SVG's asymmetric
viewBox (-5, -10, 100, 100). Fixed by adjusting rendering and positioning.

Changes:
- Update generate-icons.sh: Render at 600px and crop to 512px for better centering
- Update vector foreground: Shift translateX from 5 to 7 to compensate for viewBox offset
- Regenerate all launcher PNGs and adaptive foreground PNGs

The logo now appears properly centered in the icon.
2026-02-25 00:54:01 +00:00
Chad Curtis cde98744d6 Reduce Android icon logo size to 40% for more breathing room
Zoomed out the logo further from 50% to 40% for better visual balance
and more padding around the logo.

Changes:
- Update generate-icons.sh: Change content_size from 50% to 40%
- Update vector foreground: Scale from 0.75 to 0.6 to match PNG sizing
- Regenerate all launcher PNGs and adaptive foreground PNGs

The logo now has generous padding and looks more refined in the app launcher.
2026-02-25 00:45:32 +00:00
Chad Curtis c82e9722d9 Reduce Android icon logo size from 66% to 50% for better appearance
The logo was zoomed in too far, making it difficult to see the full design.
Reduced the logo size to 50% of the icon canvas for proper padding.

Changes:
- Update generate-icons.sh: Change content_size from 66% to 50%
- Update vector foreground: Add 0.75 scale transformation to match PNG sizing
- Regenerate all launcher PNGs with the smaller, better-proportioned logo
- Regenerate all adaptive foreground PNGs

The logo now has proper breathing room and looks much better in the app launcher.
2026-02-25 00:38:06 +00:00
Chad Curtis 7f8f492acd Fix Android launcher icons to show Ditto logo on purple background
The APK was showing just a purple circle because the legacy launcher PNG files
(ic_launcher.png and ic_launcher_round.png) were solid purple with no logo.

Changes:
- Update generate-icons.sh to generate legacy launcher PNGs (for Android < 8.0)
- Add ImageMagick as fallback SVG renderer when inkscape/rsvg unavailable
- Replace 'bc' calculations with bash arithmetic for better compatibility
- Generate both square and round launcher icons with white logo on purple bg
- Regenerate all launcher icons (mdpi, hdpi, xhdpi, xxhdpi, xxxhdpi)

The icons now properly display:
- Purple background (#7c52e0)
- White Ditto logo (66% safe zone sizing)
- Round variant with circular mask

This fixes the issue for both:
- Modern devices (Android 8.0+): Uses adaptive icon system with vector foreground
- Legacy devices (Android < 8.0): Uses pre-rendered PNG launcher icons
2026-02-25 00:06:35 +00:00
Chad Curtis 04349db2b1 Fix Android app icon to show Ditto logo instead of purple circle
- Delete conflicting ic_launcher_background.xml drawable with teal grid pattern
- Update adaptive icon XMLs to use vector drawable instead of PNG mipmap
- Change from @mipmap/ic_launcher_foreground to @drawable/ic_launcher_foreground
- Vector drawable (drawable-v24/ic_launcher_foreground.xml) contains proper white Ditto logo
- Background color (#7c52e0 purple) is correctly defined in values/ic_launcher_background.xml

The APK was showing only a purple circle because the vector foreground logo wasn't being used. Now the adaptive icon system will properly composite the white Ditto logo on the purple background.
2026-02-25 00:04:16 +00:00
Chad Curtis 015a3a7e3f Fix Android app name capitalization to Ditto
- Update strings.xml to use 'Ditto' instead of 'ditto'
- Update capacitor.config.ts appName to 'Ditto'
- Update GitLab CI/CD artifact naming to use 'Ditto-' prefix
- Ensures consistency with web version branding
2026-02-25 00:01:41 +00:00
Chad Curtis 42a9535761 fix: remove lazy loading to prevent endless spinner on direct event load
The endless spinner issue was caused by lazy loading pages without a Suspense
fallback. When users navigated to nevent URLs or other NIP-19 identifiers, the
Suspense boundary had no fallback, causing a blank screen or stuck preloader.

Changes:
- Removed all lazy() imports from AppRouter
- Removed Suspense boundary (no longer needed without lazy loading)
- All pages now load eagerly for instant rendering
- Kept the HexIdentifierPage loading skeleton fix from previous commit

This ensures users see immediate visual feedback when loading any page,
especially when navigating directly to event URLs via nevent identifiers.
2026-02-24 23:48:09 +00:00
Chad Curtis 9bd8f24829 fix: show loading skeleton instead of null for hex identifier resolution
When users navigate to a raw 64-char hex URL (event ID or pubkey), the app
now shows a proper loading skeleton while resolving the identifier type,
instead of returning null which caused an endless spinner due to Suspense.

- Export PostDetailShell and PostDetailSkeleton from PostDetailPage
- Use proper loading UI in HexIdentifierPage component
- Matches loading pattern used by PostDetailPage and AddrPostDetailPage
2026-02-24 23:42:59 +00:00
Alex Gleason fb2e5cee91 Add Divine relay when looking up addressable short videos 2026-02-24 17:14:44 -06:00
Alex Gleason 386a2fec65 Use kind 16 (generic repost) for reposting non-kind-1 events
Per NIP-18, kind 6 is specifically for reposting kind 1 text notes,
while kind 16 should be used for all other event types. Added
isRepostKind() and getRepostKind() helpers to centralize the logic,
and updated all repost-related code paths: publishing, deletion,
status checks, interactions, feed processing, notifications, and
stream/search filtering.
2026-02-24 15:22:19 -06:00
Chad Curtis 7132c43afa Add foreground PNGs for adaptive icon, restore foreground reference 2026-02-24 10:25:58 -06:00
Chad Curtis e2f94de1a2 Fix adaptive icon: use committed launcher PNG instead of broken foreground vector 2026-02-24 10:10:55 -06:00
Chad Curtis 4abe62962d Commit launcher PNGs directly, remove from CI generation 2026-02-24 06:11:54 -06:00
Chad Curtis f18a64cb08 Use inkscape instead of rsvg-convert for SVG rendering 2026-02-24 05:05:54 -06:00
Chad Curtis 4f31b57d12 Fix icon branding: white SVG recolor, new logo notification icon, splash uses vector 2026-02-24 04:11:45 -06:00
Chad Curtis bcc04c0777 Add GitLab release job with APK download link 2026-02-24 03:54:02 -06:00
Chad Curtis b184de5ae1 Remove unsupported destkeypass from PKCS12 keystore migration 2026-02-24 03:42:36 -06:00
Chad Curtis 0c50d7a09f Migrate keystore JKS->PKCS12 at build time for Gradle compatibility 2026-02-24 03:34:02 -06:00
Chad Curtis 56205eb13b Add keystore debug output to CI 2026-02-24 03:30:34 -06:00
Chad Curtis 018aac2637 Fix sdkmanager license acceptance hanging with yes pipe 2026-02-24 02:36:06 -06:00
Chad Curtis 6512f9d3fd Skip test job on tag pipelines, run build-apk independently with needs: [] 2026-02-24 01:54:40 -06:00
Chad Curtis c8e92644d8 Fix spurious JSONException catch in EOSE handler 2026-02-24 01:49:26 -06:00
Chad Curtis 00a7c38efb Fix generate-icons.sh to support ImageMagick 6 (convert) and 7 (magick) 2026-02-24 01:40:25 -06:00
Chad Curtis 6ef88e1165 Cache node_modules in CI and increase job timeouts to 5 minutes 2026-02-24 01:29:01 -06:00
Chad Curtis 49d6166b99 Rewrite notification service: connect-fetch-disconnect per cycle, limit 5 events, adaptive interval 2026-02-24 01:18:11 -06:00
Chad Curtis ba999beb9c Add release script for calver+sha tagging 2026-02-24 01:06:05 -06:00
Chad Curtis 16de0195c2 Remove dead scripts. 2026-02-24 01:05:23 -06:00
Chad Curtis 0d7e384431 Move engines field above dependencies in package.json 2026-02-24 01:04:58 -06:00
Chad Curtis e3a62acbd3 Pin npm 10.9.4 and Node 22.x engine requirements to prevent lockfile churn 2026-02-24 01:04:15 -06:00
Chad Curtis b02b2a9e56 Rebrand Android app icons to Ditto logo with purple background 2026-02-24 01:03:53 -06:00
Chad Curtis 1af6a45a77 Fix preloader flash and green logo on light/pink themes
Defer body inline style removal until CSS variables are injected by
useApplyTheme, preventing a one-frame flash of unstyled background.

Replace preloader logo <img> with CSS mask technique matching the React
DittoLogo component, so the logo uses the theme's primary color instead
of filter:invert() which turned purple into green.
2026-02-24 00:39:27 -06:00