Commit Graph

24 Commits

Author SHA1 Message Date
Alex Gleason 9e6ed02ce1 Add nsite:// sidebar pinning with auto-launch, favicon, and highlight
Introduces a new sidebar item type for nsites that auto-opens the nsite
preview when clicked, using React Router state to prevent external URLs
from triggering auto-launch.

- Add isNsiteUri/nsiteUriToSubdomain helpers and parseNsiteSubdomain
- Create NsiteSidebarItem with site favicon and link preview title label
- Wire nsite:// dispatch in SidebarNavList, useFeedSettings, SidebarMoreMenu
- NoteMoreMenu pins named nsite events as nsite:// URIs instead of nostr:
- NsiteCard gains a Pin/Unpin button and an autoPlayKey prop that re-opens
  the player each time the sidebar item is clicked
- NsitePlayerContext tracks the active subdomain for sidebar highlighting,
  provided in MainLayout so sidebar and pages share state
- PostDetailContent consumes nsiteAutoPlay router state and clears it
  after consumption so a page refresh doesn't re-trigger auto-play
2026-05-05 12:38:26 -05:00
Alex Gleason 938c9a2f76 Apply title font to all sidebar item types consistently 2026-03-25 20:10:40 -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 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
Lemon f91a37914c fix: prevent iOS Safari auto-zoom on input focus 2026-03-17 19:55:18 +00:00
Alex Gleason 35bc1a0438 Add configurable homepage route and show all items in mobile sidebar
- Add homePage config field (default: 'feed') that determines which
  sidebar item renders at the '/' route
- Any sidebar item can be set as the homepage via Feed settings
- The feed is always accessible at /feed when not configured as home
- Normalize sidebar item IDs: every item follows path === '/' + id
  (feed path changed from '/' to '/feed', emoji-packs renamed to emojis)
- Remove BOTTOM_NAV_ITEMS filter from MobileDrawer so all sidebar
  items are visible on mobile (feed, notifications, search included)
- Mobile bottom nav dynamically reflects the configured homepage icon
- Homepage setting syncs across devices via encrypted settings
- Add emoji-packs -> emojis migration for existing sidebar orders
2026-03-05 15:23:43 -06:00
Chad Curtis fecaa346c7 Scroll 'More...' menu to middle of list on open 2026-03-03 11:46:54 -06:00
Chad Curtis 5e5ef57a00 Stop auto-scroll at list limits, clean up interval on unmount 2026-03-03 11:13:36 -06:00
Chad Curtis b3cad7c796 Add scroll carets to SidebarMoreMenu dropdown lists 2026-03-03 11:04:47 -06:00
Chad Curtis c337e47214 Add 'Add' dropdown to sidebar edit mode for adding new sections 2026-03-03 05:20:54 -06:00
Alex Gleason 98459638db Fix sidebar search input width with min-w-0 instead of spacer div
Remove the invisible spacer div hack (w-8 shrink-0) and restore gap-3
on the search row. The actual fix is min-w-0 on the input, which lets
it shrink below its intrinsic minimum width in the flex container.
2026-03-02 12:18:09 -06:00
Alex Gleason d10d87bcb4 Fix sidebar More menu search input pushing content out of bounds
The search input with flex-1 extended ~32px further right than item
labels below (which have a Plus button consuming that space). Added a
matching w-8 spacer and min-w-0 so the input aligns with item labels
and cannot force the row wider than the dropdown.
2026-03-02 12:15:46 -06:00
Alex Gleason 37b16e4332 Remove bg-muted from sidebar More menu search bar to fix visual clipping
The bg-muted/50 background on the search row extended wider than the
item rows below (which have a Plus button consuming right-side space),
creating a visible purple block and visual misalignment that made
content appear truncated on the left.
2026-03-02 12:13:45 -06:00
Alex Gleason 6c3fb905d9 Open sidebar More menu upward to prevent bottom clipping
The More... trigger sits at the bottom of the sidebar, so the dropdown
was opening downward into very little available space, getting clipped.
Use side="top" so it opens upward where there is ample room, and add
collisionPadding for a safety margin from viewport edges.
2026-03-02 12:12:30 -06:00
Alex Gleason 543eda02ee Fix linter errors: conditional hook, unused vars/imports, and unstable deps 2026-03-02 10:24:32 -06:00
Chad Curtis 64427401e0 Remove inline mode from SidebarMoreMenu, use dropdown on mobile too 2026-03-02 03:35:36 -06:00
Chad Curtis 4786a09928 Add search to More menu, divider only in edit mode, fix overflow with max-height 2026-03-02 03:28:04 -06:00
Chad Curtis c3010a6282 Add sidebar divider support, only available in edit mode 2026-03-02 03:20:26 -06:00
Alex Gleason 5349ed4487 Unify sidebar item registry, removing built-in vs extra-kind distinction
Replace the dual-registry system (BUILTIN_SIDEBAR_ITEMS in useFeedSettings
+ EXTRA_KINDS in extraKinds) with a single SIDEBAR_ITEMS array in
sidebarItems.tsx. Every sidebar-capable item now has a consistent shape:
id, label, path, icon, and optional requiresAuth.

- Delete extraKindIcons.ts; icons now live in the SIDEBAR_ITEMS registry
- Remove BUILTIN_SIDEBAR_ITEMS, isBuiltinItem, getBuiltinItem, EXTRA_KIND_IDS
  from useFeedSettings.ts; validation uses SIDEBAR_ITEM_IDS
- Remove HiddenSidebarItem.builtin field (was never read by consumers)
- Simplify SidebarNavItem.tsx (no more dual icon map lookup)
- All consumers now import sidebarItemIcon from @/lib/sidebarItems
- ExtraKindDef/EXTRA_KINDS unchanged (still used for feed/content settings)
2026-03-01 12:44:02 -06:00
Chad Curtis 50be154dc4 Fix mobile drawer More list overflowing viewport by rendering inline 2026-02-28 03:22:34 -06:00
Chad Curtis da1533bccf Unify sidebar icon/label sources of truth and rename items
- Create extraKindIcons.ts as single source of truth for extra-kind icons
- BUILTIN_ICON_COMPONENTS in SidebarNavItem covers system items only
- sidebarItemIcon() merges both maps; all pages/routes use it
- EXTRA_KINDS is now source of truth for labels and kind numbers in AppRouter, page titles, and onboarding (CONTENT_KINDS derived from EXTRA_KINDS)
- Remove themes from BUILTIN_SIDEBAR_ITEMS (it lives in EXTRA_KINDS)
- Delete dead SIDEBAR_ITEM_ICONS export
- Rename 'Theme' → 'Vibe', 'Colors' → 'Color Moments'
- Articles icon: FileText → BookOpen; Settings icon: Settings → Scroll
- Hide Vibe settings back button on non-mobile (md:hidden)
- Settings and Bookmarks page headers aligned to same structure
- Codex of Configuration opacity 40% → 60%
2026-02-28 03:12:51 -06:00
Alex Gleason 9782d8d2d4 Start improving visibility of sidebar content on busy custom backgrounds 2026-02-27 17:00:17 -06:00
Chad Curtis ea3c488918 fix: always show edit sidebar in more menu, hide divider when no hidden items 2026-02-26 05:46:00 -06:00
Chad Curtis 68f0dd742a Refactor mobile nav with shared sidebar components and improved drawer UX 2026-02-26 03:51:33 -06:00