Commit Graph

257 Commits

Author SHA1 Message Date
Gigi
b4ceaceedc refactor: use main package exports instead of subpath imports
- Import Helpers from 'applesauce-core' instead of 'applesauce-core/helpers'
- Import Blueprints from 'applesauce-factory' instead of 'applesauce-factory/blueprints'
- Use namespace exports as documented in applesauce tutorial
- Fixes Vercel build issue with internal module resolution
- Follows recommended import patterns from applesauce docs
2025-10-07 06:04:07 +01:00
Gigi
744642e2b7 fix: ensure bookmarks are sorted newest first after merging lists
- Re-sort all individual bookmarks after flattening from multiple lists
- Sort by added_at first, then fall back to created_at
- Prevents interleaving of sorted lists from breaking overall order
- Ensures newest bookmarks always appear at the top
2025-10-07 05:25:50 +01:00
Gigi
fd28a6e171 feat: parse and display summary tag for nostr articles
- Extract 'summary' tag from kind:30023 article bookmarks
- Display summary in place of truncated content for articles
- Show summary in all view modes (compact, cards, large)
- Add article-summary CSS class for potential styling
- Follows NIP-23 long-form content specification
2025-10-07 05:12:11 +01:00
Gigi
0124de8318 feat: merge and flatten bookmarks from multiple lists
- Extract all individual bookmarks from all bookmark lists
- Display them in a single flat list (already sorted by date in service)
- Remove wrapper metadata like 'N bookmarks in this list'
- Show all bookmarks together, newest first
- Implements NIP-51 and NIP-B0 bookmark list merging
2025-10-07 05:06:00 +01:00
Gigi
b37aac0a33 fix: hide empty bookmarks without content
- Filter out individual bookmarks that have no content
- Keep articles (kind:30023) and web bookmarks (kind:39701) even if empty
- Prevents display of placeholder items showing only icons and timestamps
2025-10-07 05:02:36 +01:00
Gigi
81ef047a31 chore: remove created date from bookmark list display
- Remove bookmark-meta div showing creation timestamp
- Cleaner UI without redundant date information
2025-10-07 04:59:55 +01:00
Gigi
704033e6cb fix: remove encrypted cyphertext display from bookmark list
- Remove display of top-level bookmark.content and bookmark.parsedContent
- These fields contain encrypted data that shouldn't be shown to users
- Individual bookmarks are already displayed properly within each list
2025-10-07 04:56:42 +01:00
Gigi
d59d27419e feat: update URL path when opening bookmarks from sidebar
- Add URL navigation when selecting bookmarks
- Navigate to /a/:naddr for nostr articles (kind:30023)
- Navigate to /r/:url for external URLs
- Encode article bookmarks to naddr format on selection
2025-10-07 04:55:30 +01:00
Gigi
61e948f6a4 refactor: use icon toggle buttons for highlight visibility settings
- Replace checkboxes with IconButton components matching existing UI pattern
- Use faNetworkWired, faUserGroup, and faUser icons
- Maintain consistent visual style with other settings toggles
2025-10-06 20:55:56 +01:00
Gigi
22323591c9 feat: add default highlight visibility settings
- Add defaultHighlightVisibilityNostrverse/Friends/Mine to UserSettings interface
- Add toggle controls in Settings page under Startup Preferences section
- Apply default visibility settings on app startup in Bookmarks component
- Users can now set which highlight levels (nostrverse/friends/mine) should be visible by default
2025-10-06 20:46:33 +01:00
Gigi
fbb8fbdc20 fix: handle web bookmarks with URLs in d tag and prevent crash
- Extract URL from 'd' tag for kind:39701 web bookmarks
- Add protocol prefix (https://) if missing from web bookmark URLs
- Make classifyUrl handle undefined input gracefully
- Prevent crash when web bookmarks have no content
2025-10-06 20:34:37 +01:00
Gigi
1e7be50e35 refactor: change nostrverse icon from fa-globe to fa-network-wired
- Avoid icon conflict with web bookmarks which use fa-globe
- fa-network-wired better represents the nostr network/nostrverse concept
2025-10-06 20:31:47 +01:00
Gigi
1a7a8367a0 feat: add support for web bookmarks (NIP-B0, kind:39701)
- Update bookmarkService to fetch kind:39701 events
- Add processing logic for web bookmark events in bookmarkProcessing
- Update bookmark deduplication to handle web bookmarks
- Add 'web' type to IndividualBookmark interface
- Implement distinct icon (fa-bookmark + fa-globe) for web bookmarks
- Update CompactView and CardView to display web bookmark icon
- Add web-bookmarks rule documentation
2025-10-06 20:30:53 +01:00
Gigi
b01293aa20 fix: ensure fonts are fully loaded before applying styles
- Convert loadFont to async function that returns a Promise
- Use Font Loading API to wait for fonts to be actually ready
- Add comprehensive logging for font loading stages
- Wait for font loading in useSettings before applying CSS variables
- Update Settings component to handle async font loading
- Prevents FOUT (Flash of Unstyled Text) by ensuring fonts are ready
- Fixes timing issue where custom fonts weren't being applied consistently

This ensures custom fonts are fully loaded and ready before being applied,
eliminating the race condition where content would render with system fonts
before custom fonts were available.
2025-10-06 20:04:11 +01:00
Gigi
d9db10fd70 fix: improve highlight rendering pipeline with comprehensive debugging
- Add extensive logging to track highlight rendering through entire pipeline
- Fix markdown rendering to wait for HTML conversion before displaying
- Prevent fallback to non-highlighted markdown during initial render
- Add debugging to URL filtering to identify matching issues
- Add logging to highlight application to track matching success/failures
- Ensure highlights are always applied when content is ready
- Show mini loading spinner while markdown is being converted

This will help diagnose and fix cases where highlights aren't showing up.
2025-10-06 19:56:20 +01:00
Gigi
872d38c7f3 feat: implement optimistic updates for highlight creation
- Update createHighlight to return the signed NostrEvent
- Add eventToHighlight helper to convert events to Highlight objects
- Immediately add new highlights to UI without fetching from relays
- Remove handleHighlightCreated refresh logic (no longer needed)
- Improves UX with instant feedback when creating highlights
2025-10-06 19:51:14 +01:00
Gigi
06c3c1ff20 feat: enable highlight creation from external URLs
- Update createHighlight service to accept both NostrEvent and URL string as source
- Modify Bookmarks component to support highlighting on /r/* paths
- Add fetchHighlightsForUrl import for refreshing URL-based highlights
- Extract context from reader content (markdown/html) for external URLs
- Automatically use 'r' tag for external URLs via HighlightBlueprint
2025-10-06 19:43:27 +01:00
Gigi
107d6757bd feat: add routing support for external URLs
- Add /r/* route in App.tsx for external URL content
- Create useExternalUrlLoader hook to load external web content
- Add fetchHighlightsForUrl service to fetch highlights by URL using 'r' tag
- Update Bookmarks component to handle both nostr-native (naddr) and external URLs
- Support two URL patterns: /a/naddr... for nostr content, /r/https://... for external URLs
2025-10-06 19:22:18 +01:00
Gigi
7a4cb77aa3 refactor: remove dedicated login page, handle login through main UI 2025-10-05 23:32:52 +01:00
Gigi
9065501043 fix: add protected routes to prevent logout on page refresh 2025-10-05 23:31:30 +01:00
Gigi
c9ace72d4d fix: use undo icon for reset to defaults button 2025-10-05 23:29:33 +01:00
Gigi
7e575ea617 feat: add reset to defaults button in settings 2025-10-05 23:27:43 +01:00
Gigi
c3a2dd5603 feat: load and apply settings upon login 2025-10-05 23:23:59 +01:00
Gigi
a6ea97b731 fix: replace any types with proper NostrEvent types
- Replace any type with NostrEvent | undefined in Bookmarks component
- Replace any type with NostrEvent in useArticleLoader hook
- Remove incorrect bookmark-to-article assignment
- All linter warnings resolved
- Type checks passing
2025-10-05 23:16:05 +01:00
Gigi
2f2e19fdf9 fix: move FAB to Bookmarks component for proper floating
Move HighlightButton outside .pane.main container by rendering it in Bookmarks component. This bypasses the CSS contain property that was preventing position:fixed from working properly. FAB now floats correctly in bottom-right corner.
2025-10-05 23:14:24 +01:00
Gigi
ce99600aa9 fix: move FAB outside reader container for proper viewport-fixed positioning
The CSS contain property on .reader was creating a new containing block that broke position:fixed. Moving FAB outside allows it to float properly.
2025-10-05 23:11:52 +01:00
Gigi
77bcc481b5 fix: revert FAB opacity to 0.4 when no text selected 2025-10-05 23:10:42 +01:00
Gigi
8bb97b3e4e fix: set FAB to 50% transparent when no text selected
Change opacity from 0 to 0.5 for better visibility
2025-10-05 23:10:27 +01:00
Gigi
2bbfa82eec refactor: make FAB fully transparent when no text selected
- Change opacity from 0.4 to 0 when no selection (fully transparent)
- Remove shadow when transparent for cleaner look
- Use pointerEvents: none to prevent interaction when invisible
- Remove disabled attribute, handle interaction via pointer events
- Button smoothly fades in/scales up when text is selected
2025-10-05 23:10:08 +01:00
Gigi
cc68e67726 refactor: change highlight button to FAB style
- Replace floating popup button with persistent FAB in bottom-right corner
- Button always visible but disabled when no text is selected
- Uses user's highlight color from settings
- Visual feedback: scales up and becomes opaque when text is selected
- Follows Google apps design pattern for floating action buttons
2025-10-05 23:09:36 +01:00
Gigi
f3a8cf1c23 fix: highlight button positioning with scroll
Change button from absolute to fixed positioning so it appears at the correct location relative to selected text regardless of scroll position
2025-10-05 23:06:33 +01:00
Gigi
290d9303b5 feat: add simple highlight creation feature
- Create HighlightButton component that appears on text selection
- Add highlightCreationService using EventFactory and HighlightBlueprint
- Integrate highlight button into ContentPanel with text selection detection
- Update Bookmarks to pass required props and refresh highlights after creation
- Publish highlights to NIP-84 relays automatically
- Only show button when user is logged in
2025-10-05 23:03:23 +01:00
Gigi
9252078fb7 refactor: rename 'underlines' to 'highlights' throughout codebase 2025-10-05 22:52:42 +01:00
Gigi
d5ab88082f feat: show author name in highlight cards 2025-10-05 22:50:20 +01:00
Gigi
a8e48ba280 feat: sync highlight level toggles between sidebar and main article text 2025-10-05 22:49:07 +01:00
Gigi
b1f6ac88a6 fix: show highlights immediately when opening panel if already loaded 2025-10-05 22:46:39 +01:00
Gigi
c07797ff7c fix: resolve all linting and type errors 2025-10-05 22:45:57 +01:00
Gigi
41fb51c357 feat: stream highlights progressively as they arrive from relays 2025-10-05 22:42:39 +01:00
Gigi
647cf1caf7 feat: update default highlight colors to orange for friends and purple for nostrverse 2025-10-05 22:34:54 +01:00
Gigi
c407663c2b fix(settings): make startup preference checkboxes checked by default and remove redundant text 2025-10-05 22:26:04 +01:00
Gigi
ba34e51803 fix(bookmarks): ensure both panels start collapsed on initial load regardless of saved settings 2025-10-05 22:24:32 +01:00
Gigi
518c6d9714 feat(settings): set default font size to middle option (18px) 2025-10-05 22:19:51 +01:00
Gigi
5f7aab90a7 feat(settings): align color pickers and labels for better visual layout 2025-10-05 22:18:55 +01:00
Gigi
6d41d95627 feat(highlights): update default colors to yellow, orange, purple 2025-10-05 22:17:39 +01:00
Gigi
9aea1f9a70 feat(settings): enhance preview with longer text and three-level highlights 2025-10-05 22:16:20 +01:00
Gigi
8594b733ef style(settings): remove 'Color' from highlight setting labels 2025-10-05 22:15:35 +01:00
Gigi
be42203944 remove(settings): remove legacy highlight color setting 2025-10-05 22:15:08 +01:00
Gigi
c51c1810c4 feat(settings): set Source Serif 4 as default reading font 2025-10-05 22:14:47 +01:00
Gigi
6bbc5eb1fc docs(settings): clarify that both panels default to collapsed state 2025-10-05 22:14:01 +01:00
Gigi
ff5c974557 style(icons): change user icon to fa-user-circle in sidebar header 2025-10-05 22:13:21 +01:00