Commit Graph

101 Commits

Author SHA1 Message Date
Gigi
0803417755 feat: improve highlight URL and text matching
- Use proper URL parsing to normalize URLs (remove www, query params, fragments)
- Add detailed logging for URL comparison to debug matching issues
- Implement two-pass text matching: exact match first, then normalized whitespace
- Handle whitespace variations in highlighted text more flexibly
- Add context to debug logs showing surrounding text

This should make highlights appear more reliably even with URL variations
and whitespace differences between the highlight and the actual content.
2025-10-04 20:32:55 +01:00
Gigi
a602f163fb fix: improve HTML highlight matching with DOM manipulation
- Replace simple string replacement with proper DOM tree walking
- Find text nodes and split them to insert mark elements
- Add extensive debugging to track highlight matching
- Handle text that spans across HTML elements correctly

This should fix the issue where highlights weren't showing up in
article content due to HTML tags breaking up the text.
2025-10-04 20:14:25 +01:00
Gigi
4aa496ec3f fix: improve highlights panel collapse behavior
- Flip chevron icon direction (left when collapsed, right when expanded)
- Match bookmarks sidebar styling for collapsed state
- Remove background/border when collapsed for cleaner look
- Ensure toggle button stays at top of panel
- Add proper hover states for collapsed button

The highlights panel now behaves consistently with the bookmarks sidebar,
with the chevron pointing in the correct direction and proper visual feedback.
2025-10-04 19:59:03 +01:00
Gigi
296600bb0d feat: add inline highlight annotations in content panel
- Create highlightMatching utility to find and apply highlights to text/HTML
- Update ContentPanel to accept highlights and match them to current URL
- Add visual highlighting with yellow background and blue underline
- Show highlight count indicator when content has highlights
- Add hover effects and tooltips showing highlight date
- Support both HTML and markdown content highlighting

Highlighted text now appears underlined in the main content panel when
viewing URLs that have associated NIP-84 highlights.
2025-10-04 19:58:10 +01:00
Gigi
7390104414 feat: add NIP-84 highlights panel with three-pane layout
- Add HighlightsPanel component with collapsible functionality
- Add HighlightItem component to display individual highlights
- Create highlightService to fetch kind 9802 events
- Add Highlight type definitions for NIP-84
- Update Bookmarks to support three-pane layout (bookmarks, content, highlights)
- Add comprehensive CSS styling for highlights panel
- Update README with highlights feature documentation

The highlights panel mirrors the bookmark sidebar on the right side, showing
all NIP-84 highlights with context, source links, and timestamps. Both panels
are independently collapsible for flexible viewing.
2025-10-04 19:47:45 +01:00
Gigi
f4fbc34bc1 fix: update remaining Markr references to Boris
- Update Login component welcome message
- Update package-lock.json name references
2025-10-03 15:00:13 +02:00
Gigi
0cf7f93482 refactor: split BookmarkItem into separate view components
- Extract CompactView, LargeView, and CardView into separate files
- Keep all files under 210 lines (BookmarkItem: 307→105 lines)
- Improve code organization and maintainability
- Add shared type definitions for view components
- Keep DRY with shared props object
2025-10-03 10:29:17 +02:00
Gigi
796380ea0d fix: move useEffect hook to top level to comply with Rules of Hooks
- Move OG image fetching useEffect to component top level
- Make hook logic conditional instead of hook call itself
- Prevents 'Rendered more hooks than during previous render' error
- Remove duplicate firstUrlClassification declaration
2025-10-03 10:26:40 +02:00
Gigi
3d6403f139 feat: fetch article hero images using free CORS proxy
- Add Open Graph image extraction from article HTML
- Use allorigins.win as free CORS proxy (no auth required)
- Implement HTML parsing to extract og:image meta tags
- Add in-memory caching to avoid repeated fetches
- Async loading with React useEffect for non-YouTube URLs
- 5 second timeout for fetch requests
- Graceful fallback to icon placeholder on errors
2025-10-03 10:24:34 +02:00
Gigi
57c5be9907 feat: add image preview for large view cards
- Extract YouTube video thumbnails from URLs
- Display thumbnail images as background in large preview cards
- Add gradient overlay for better text contrast
- Fallback to icon placeholder for non-YouTube URLs
- Handle multiple YouTube URL formats (watch, youtu.be, shorts)
- Gracefully handle missing images with icon fallback
2025-10-03 10:16:22 +02:00
Gigi
bd3193957c feat: implement large preview view mode
- Add large preview layout with image placeholder area
- Display truncated content (3 lines max) below preview
- Footer with author, timestamp, and action button
- Clickable preview area opens URL in reader
- Clean, minimalistic design with larger spacing
- All views now fully functional: compact, cards, and large
2025-10-03 10:10:17 +02:00
Gigi
64efb103a4 feat: make card view timestamp clickable to open event
- Timestamp in card view now links to event in search portal
- Add hover effect showing link is clickable
- Remove unused getKindIcon import
- All linter and type checks pass
2025-10-03 10:08:56 +02:00
Gigi
bdfb7ca9a6 feat: make entire compact list row clickable to open reader
- Add onClick handler to compact-row div
- Show pointer cursor on rows with URLs
- Add stopPropagation to action button to prevent double-trigger
- Include accessibility attributes (role, tabIndex)
2025-10-03 09:51:34 +02:00
Gigi
288b96d614 refactor: make compact list view even more compact
- Move all elements to a single horizontal line
- Reduce text preview from 100 to 60 characters
- Decrease padding and font sizes
- Fix row height to 28px for consistent spacing
- Improve text truncation with ellipsis
2025-10-03 09:49:07 +02:00
Gigi
99c6a4c23b feat: add view mode switching for bookmarks with compact list view
- Add ViewMode type with options: compact, cards, large
- Add view mode toggle buttons in SidebarHeader
- Implement compact list view rendering in BookmarkItem
- Add CSS styles for compact view with condensed layout
- Cards view remains the default and current style
2025-10-03 09:44:39 +02:00
Gigi
53b54c77e7 feat(reader): open bookmark URLs in reader instead of new window
- Change URL links to buttons that open in reader
- Style URL buttons to look like links (cursor, hover, no button appearance)
- Rename 'content-panel' to 'reader' throughout codebase
- Update all CSS classes: content-panel → reader, content-title → reader-title, etc.
- Change empty state text from 'preview' to 'read' to match reader terminology
- Keep things simple and focused on in-app reading experience
2025-10-03 09:30:28 +02:00
Gigi
857337c748 fix(ui): swap chevron directions for collapse/expand button
- When sidebar is expanded: show chevron RIGHT (to collapse/hide)
- When sidebar is collapsed: show chevron LEFT (to expand/show)
- Update SidebarHeader to use faChevronRight
- Update BookmarkList collapsed state to use faChevronLeft
2025-10-03 02:06:40 +02:00
Gigi
8fe01d5337 feat(ui): replace user text with profile image in sidebar header
- Replace 'Logged in as: [user]' text with profile avatar
- Use applesauce ProfileModel to fetch user's profile picture
- Display profile image in 33px square (same size as IconButton)
- Show fallback user icon when no profile image available
- Style avatar with same border radius and styling as IconButton
- Add tooltip showing user display name on hover
2025-10-03 02:02:15 +02:00
Gigi
55c4fe9d4e refactor(ui): move user info and logout to sidebar header bar
- Create new SidebarHeader component as bar-shaped container
- Combine collapse button, user info, and logout button in one bar
- Position header bar at top of bookmark sidebar with matching width
- Remove fixed top-right positioning for user header
- Style as cohesive bar with background, border, and spacing
- Update all prop passing from App through Bookmarks to BookmarkList
- Remove old UserHeader component
2025-10-03 02:00:54 +02:00
Gigi
8014ee4ddd refactor(ui): reduce IconButton size by 25%
- Change default size from 44px to 33px (25% reduction)
- Update min-width and min-height in CSS to match
- Apply size reduction to toggle-sidebar-btn as well for consistency
2025-10-03 01:58:42 +02:00
Gigi
365b84ba9d refactor(ui): remove duplicate bookmark title and heading
- Remove bookmark title (h3) from bookmark items
- Remove duplicate h4 heading from individual-bookmarks section
- Keep only the single 'X bookmarks in this list:' line with event link
2025-10-03 01:57:51 +02:00
Gigi
e644f07828 refactor(ui): move user info to top-right app header
- Create UserHeader component to display user info and logout button
- Move 'Logged in as: user' from sidebar to app-header in top-right
- Remove user info display from BookmarkList and Bookmarks components
- Simplify bookmarks-header layout (only contains collapse button now)
- Update CSS to display user info and logout button inline with proper spacing
2025-10-03 01:56:16 +02:00
Gigi
448c4dac1c feat(bookmarks): classify URLs by type and adjust action buttons
- Add URL classification system (article, video, youtube, image)
- Classify based on domain (youtube) and file extensions
- Update button text: 'READ NOW' for articles, 'WATCH NOW' for videos, 'VIEW NOW' for images
- Update icons: faBookOpen for articles, faPlay for videos, faEye for images
- Apply classification to both individual URL buttons and main action button
2025-10-03 01:53:49 +02:00
Gigi
85695b5934 feat(ui): improve bookmark list heading with event links
- Replace 'Bookmarks (count)' with 'count bookmarks in this list:'
- Replace 'Individual Bookmarks (count):' with 'count bookmarks in this list:'
- Make 'this list' a clickable link to search.dergigi.com/e/{eventId}
- Add event-link CSS styling with blue color and hover effect
2025-10-03 01:52:07 +02:00
Gigi
ef3ce445f5 refactor(ui): move logout button to top-right of app
- Move logout IconButton from sidebar to App component
- Position logout button fixed at top-right corner
- Remove onLogout prop from Bookmarks and BookmarkList components
- Clean up sidebar header by removing logout button
- Add app-header CSS with fixed positioning and high z-index
2025-10-03 01:51:03 +02:00
Gigi
436bbf2b43 refactor(ui): replace logout button text with icon button
- Replace text logout buttons with IconButton component
- Use faRightFromBracket icon for a cleaner, more minimal interface
- Apply changes to both loading state and normal state
- Maintain consistent styling with ghost variant
2025-10-03 01:48:45 +02:00
Gigi
0c2f528a23 refactor(ui): remove 'Your Bookmarks' heading
- Remove the 'Your Bookmarks (count)' heading from the sidebar
- Keep only the user info and action buttons for a cleaner interface
2025-10-03 01:47:20 +02:00
Gigi
53a6c86d8a feat(ui): add collapse/expand functionality for bookmarks sidebar
- Add toggle button to collapse/expand the bookmarks sidebar completely
- Sidebar collapses to 60px width showing only expand button
- Main content area expands to fill available space when sidebar collapsed
- Smooth transitions when toggling between states
- Use FontAwesome chevron icons for visual feedback
- Preserve all functionality in both collapsed and expanded states
2025-10-03 01:45:42 +02:00
Gigi
0b058440bc refactor(components): improve type safety and simplify IconButton
- Add proper type guards in ContentWithResolvedProfiles to avoid type assertions
- Remove href/link functionality from IconButton component for simplification
- Replace 'as any' with proper type narrowing using type predicates
2025-10-03 01:43:13 +02:00
Gigi
974cecb85f style(ui): use full-width slim chevron toggle; keep IconButton square for actions 2025-10-03 01:02:52 +02:00
Gigi
4fe9fd5470 refactor(ui): use IconButton for kind icon (square, link-capable) 2025-10-03 00:59:45 +02:00
Gigi
a80352d8d3 refactor(ui): use IconButton for all icon-only actions to enforce square sizing 2025-10-03 00:55:51 +02:00
Gigi
6652694304 refactor(ui): extract kind icon mapping to helper and keep BookmarkItem under 210 lines 2025-10-03 00:53:38 +02:00
Gigi
728c269a29 feat(ui): make IconButton square and mobile-tappable (44px min) 2025-10-03 00:50:12 +02:00
Gigi
91c68a9d48 feat(ui): show bookmarked event date top-right; remove event id display 2025-10-03 00:48:48 +02:00
Gigi
f9d381e451 feat(ui): add reusable IconButton component with square styling 2025-10-03 00:47:37 +02:00
Gigi
81a48bd0f6 feat(ui): resolve nprofile/npub mentions to names in content
- Add ResolvedMention component using applesauce ProfileModel
- Update parsed content renderer to use ResolvedMention for mentions
- Mentions now show @name and link to search page
2025-10-03 00:46:11 +02:00
Gigi
386a821c6b feat(ui): make kind icon open event on search.dergigi.com\n\n- Wrap kind icon with link to nevent-encoded event\n- Adds fallback when id is not hex 2025-10-03 00:44:40 +02:00
Gigi
d10e12b8df feat(ui): link author to search.dergigi.com with npub\n\n- Clickable 'by: <author>' opens profile search in new tab\n- Styles for author link 2025-10-03 00:43:19 +02:00
Gigi
c3eb29445e feat(ui): add chevron toggle for URL list (show 3 by default) 2025-10-03 00:40:37 +02:00
Gigi
e0450385ed fix(ui): enforce 210-char truncation for both plain and parsed content\n\n- Show truncated plain text when parsedContent exists and not expanded\n- Render full parsed content only when expanded\n- Keep chevron toggle below content 2025-10-03 00:35:55 +02:00
Gigi
a2620caa29 feat(ui): add 'Read now' button next to each URL in bookmarks\n\n- Display inline book-open icon button per URL\n- Clicking loads readability content in the right panel\n- Added styles for url rows and inline button 2025-10-03 00:32:16 +02:00
Gigi
609e15a738 feat(ui): truncate long bookmark text with expand/collapse chevron\n\n- Show first 210 chars by default\n- Toggle expansion with FontAwesome chevrons\n- Add minimal styles for the toggle 2025-10-03 00:27:31 +02:00
Gigi
fdb8511c87 chore(ui): change 'Author:' label to 'by:' in bookmark cards 2025-10-03 00:26:16 +02:00
Gigi
bdecb1409e refactor(ui): remove copy-to-clipboard buttons from bookmark cards
- Remove copy buttons for event id and author pubkey
- Clean up unused code and imports
2025-10-03 00:22:25 +02:00
Gigi
20f37b94e1 fix(profile): enable reactive profile fetch via address loader lookup relays and improve fallback display\n\n- Configure createAddressLoader with common profile relays (purplepag.es, primal, nostr.band)\n- Avoid sticky 'Loading profile...' label; fallback to short pubkey until profile loads 2025-10-03 00:16:04 +02:00
Gigi
21890f002d chore(lint): fix hooks rule error by separating content resolver component and helpers
- Move shared helpers into src/utils/helpers.ts
- Add ContentWithResolvedProfiles component file to avoid hooks rule violation
- Use strong IconDefinition type in icon map
- Resolve linter warnings and errors
2025-10-03 00:12:40 +02:00
Gigi
5495890204 feat(ui): improve logged-in user profile resolution
- Add debug logging to track profile loading
- Show 'Loading profile...' while profile data is being fetched
- Better handling of profile loading states
- Ensures user sees proper name instead of pubkey when available
2025-10-03 00:04:11 +02:00
Gigi
6d585dcef6 feat(ui): resolve nprofile strings to human-readable names
- Add extractNprofilePubkeys utility to parse nprofile strings from content
- Create ContentWithResolvedProfiles component using applesauce ProfileModel
- Replace nprofile strings with @displayName in bookmark content
- Update BookmarkItem to use resolved content rendering
- Improves readability by showing names instead of long nprofile strings
2025-10-03 00:02:22 +02:00
Gigi
0bae6674ce feat(ui): resolve author names using applesauce ProfileModel
- Import useEventModel and Models from applesauce-react
- Use ProfileModel to fetch author profile data for each bookmark
- Display author name/display_name/nip05 instead of raw pubkey
- Fallback to short pubkey if profile not available
- Improves readability by showing human-readable author names
2025-10-03 00:00:04 +02:00