Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🔗 feat: Enhance Share Functionality, Optimize DataTable & Fix Critical Bugs #5220

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

berry-13
Copy link
Collaborator

@berry-13 berry-13 commented Jan 8, 2025

Summary

Description:

  • 🎯 Objective: Significantly enhance the Share functionality, optimize data handling, and resolve critical bugs

  • 💥 Error Handling Improvements:

    • 🆕 Introduced ShareServiceError class for detailed error management within api/models/Share.js
  • ID Anonymization Optimization:

    • 🔄 Refactored ID anonymization using memoization to enhance performance in api/models/Share.js
  • 🚀 API Enhancements:

    • 📝 Updated getSharedLinks to enable cursor-based pagination and search in api/models/Share.js
    • 🔄 Refined shared link CRUD operations (create, update, delete) in api/models/Share.js
    • 🔗 Aligned API routes with new shared link management and integrated cursor-based pagination in api/server/routes/share.js [1] [2] [3]
  • 🔧 Schema and Client Updates:

    • 🗑️ Removed isVisible and isAnonymous from shareSchema in api/models/schema/shareSchema.js
    • 📱 Updated ShareButton with useGetSharedLinkQuery for retrieving shared link data and added QR code generation in client/src/components/Conversations/ConvoOptions/ShareButton.tsx
  • 🐛 Bug Fixes & Improvements (Closes [Bug]: Incorrect Title when Sharing the Chat & Managing The Shared Links #5282):

    • 🛠️ Fixed a bug causing ShareLink to be written to the DB prematurely; now written only when generateLink is clicked
    • 🆕 Created a standardized DataTable component for handling infinite items (tested with 100,000 elements with no lag)
    • 🔎 Introduced a new button for deleting links directly from the main share dialogue for improved UI/UX
    • 👁️ Improved overall ShareLink logic with intuitive UI/UX, including displaying QR Codes in the Share Link dialog and conversation origins in the Share Link table
    • ⚙️ Addressed some prompt management UI issues unrelated to this PR's main objective
  • 🔄 Known Issues:

    • 🔍 Ongoing adjustments required for search in DataTable
    • 💾 Further improvements needed for DataTable cache logic

Change Type

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Testing

Tested main features (Share, Convo, Messages) with:

  • Desktop
    • Chrome
    • Firefox
  • Mobile
    • Brave
    • Internet Samsung

Test Configuration:

Checklist

  • My code adheres to this project's style guidelines
  • I have performed a self-review of my own code
  • I have commented in any complex areas of my code
  • My changes do not introduce new warnings
  • I have written tests demonstrating that my changes are effective or that my feature works
  • Local unit tests pass with my changes
  • Any changes dependent on mine have been merged and published in downstream modules.

@berry-13 berry-13 changed the title 🔗 feat: Enhance Share Link functionality with QR Code, conditional rendering, and improved pagination 🔗 feat: Enhance Share Functionality, Optimize DataTable & Fix Critical Bugs Jan 12, 2025
@danny-avila
Copy link
Owner

Thanks @berry-13

Please un-draft and mention me when ready!

Also:

This branch has conflicts that must be resolved

@berry-13 berry-13 force-pushed the refactor/share-link branch from 7e28df2 to c255687 Compare January 15, 2025 22:08
@berry-13 berry-13 marked this pull request as ready for review January 15, 2025 22:08
@berry-13
Copy link
Collaborator Author

@danny-avila ready

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Incorrect Title when Sharing the Chat & Managing The Shared Links
2 participants