fix: Small improvements from previous release #26

Merged
rdenadai merged 1 commit from rdenadai/improvements-v0.0.3-small-fixes into main 2025-11-01 13:28:53 +00:00
Owner

Improvements v0.0.3 - Small Fixes

Overview

This PR addresses several UI inconsistencies, fixes notification handling bugs, and optimizes post thread loading performance. These changes build upon the previous v0.0.3 improvements with targeted bug fixes and refinements.

Bug Fixes

Notification System

  • Fixed notification URL parsing by using notif?.record?.subject?.uri instead of notif?.reasonSubject for more reliable navigation
  • Added debug logging for notification reasonSubject tracking
  • Resolved edge cases where notifications with missing subjects would fail to navigate properly

Post Thread Loading

  • Optimized thread loading by constructing post URI directly (at://${handle}/app.bsky.feed.post/${postId}) instead of making an extra API call to getPost first
  • Reduced API calls from 2 to 1 when loading post threads, improving performance and reducing latency

Link Parsing

  • Fixed issue with truncated links in ParsedPost component by properly handling "..." in URLs
  • Improved external link detection by splitting on "..." and using the first part for matching against embed URIs

UI/UX Improvements

Avatar Fallbacks

  • Added consistent fallback UI for missing avatars across all views (PostView, ProfileView, RedirectPostView)
  • Fallback displays as a rounded circle with bg-capivara-stone/20 background
  • Ensures visual consistency when users have no avatar set

Visual Spacing

  • Adjusted margin-bottom in ExternalElement social card preview to only apply when image or loading state is present
  • Prevents unnecessary spacing when no preview is available
  • Improved spacing for loading, error, and empty states in RedirectPostView (added mt-5)

Profile Styling

  • Changed profile banner border-radius from rounded-lg to rounded-t-lg for proper top-only rounding

Event Handling

  • Simplified click handlers by removing .prevent modifier where not needed (@click.stop.prevent@click.stop)
  • Maintained proper event propagation while preventing unwanted behaviors

Code Quality

Error Handling

  • Removed console.error from useSocialCard composable to reduce noise in production
  • Added conditional rendering checks (v-if="post?.value?.post") to prevent errors with missing data
  • Added safe navigation for createdAt timestamp display

Debugging

  • Added strategic console.log statements for tracking notification subjects and post content parsing
  • Helps with troubleshooting notification navigation issues

Technical Changes

Modified Files:

  • ExternalElement.vue - Conditional margin-bottom for preview section
  • NotificationsList.vue - Fixed notification subject URI handling
  • ParsedPost.vue - Improved truncated link parsing
  • useSocialCard.js - Removed error logging
  • PostView.vue - Added avatar fallback
  • ProfileView.vue - Added avatar fallback and fixed banner radius
  • RedirectPostView.vue - Multiple fixes: avatar fallback, optimized loading, improved spacing, safer conditionals

Performance Impact

  • Reduced API calls for post thread loading by 50% (from 2 to 1 request)
  • Improved user experience with faster thread loading times
## Improvements v0.0.3 - Small Fixes ### Overview This PR addresses several UI inconsistencies, fixes notification handling bugs, and optimizes post thread loading performance. These changes build upon the previous v0.0.3 improvements with targeted bug fixes and refinements. ### Bug Fixes **Notification System** - Fixed notification URL parsing by using `notif?.record?.subject?.uri` instead of `notif?.reasonSubject` for more reliable navigation - Added debug logging for notification reasonSubject tracking - Resolved edge cases where notifications with missing subjects would fail to navigate properly **Post Thread Loading** - Optimized thread loading by constructing post URI directly (`at://${handle}/app.bsky.feed.post/${postId}`) instead of making an extra API call to getPost first - Reduced API calls from 2 to 1 when loading post threads, improving performance and reducing latency **Link Parsing** - Fixed issue with truncated links in ParsedPost component by properly handling "..." in URLs - Improved external link detection by splitting on "..." and using the first part for matching against embed URIs ### UI/UX Improvements **Avatar Fallbacks** - Added consistent fallback UI for missing avatars across all views (PostView, ProfileView, RedirectPostView) - Fallback displays as a rounded circle with `bg-capivara-stone/20` background - Ensures visual consistency when users have no avatar set **Visual Spacing** - Adjusted margin-bottom in ExternalElement social card preview to only apply when image or loading state is present - Prevents unnecessary spacing when no preview is available - Improved spacing for loading, error, and empty states in RedirectPostView (added `mt-5`) **Profile Styling** - Changed profile banner border-radius from `rounded-lg` to `rounded-t-lg` for proper top-only rounding **Event Handling** - Simplified click handlers by removing `.prevent` modifier where not needed (`@click.stop.prevent` → `@click.stop`) - Maintained proper event propagation while preventing unwanted behaviors ### Code Quality **Error Handling** - Removed console.error from useSocialCard composable to reduce noise in production - Added conditional rendering checks (`v-if="post?.value?.post"`) to prevent errors with missing data - Added safe navigation for createdAt timestamp display **Debugging** - Added strategic console.log statements for tracking notification subjects and post content parsing - Helps with troubleshooting notification navigation issues ### Technical Changes **Modified Files:** - ExternalElement.vue - Conditional margin-bottom for preview section - NotificationsList.vue - Fixed notification subject URI handling - ParsedPost.vue - Improved truncated link parsing - useSocialCard.js - Removed error logging - PostView.vue - Added avatar fallback - ProfileView.vue - Added avatar fallback and fixed banner radius - RedirectPostView.vue - Multiple fixes: avatar fallback, optimized loading, improved spacing, safer conditionals ### Performance Impact - Reduced API calls for post thread loading by 50% (from 2 to 1 request) - Improved user experience with faster thread loading times
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
rdenadai/web.redecapivara.social!26
No description provided.