fazeel007 commited on
Commit
0e28fdd
·
1 Parent(s): 602fcb0

Make full content scrollable instead of truncated

Browse files

- Replaced truncated content with full scrollable view
- Added max-height (384px) with overflow-y-auto for long content
- Better UX for knowledge base - users can read complete documents
- Maintains clean layout while providing full access to content

client/src/components/knowledge-base/result-card.tsx CHANGED
@@ -370,9 +370,13 @@ export default function ResultCard({
370
  )) || (
371
  <div className="bg-slate-50 dark:bg-slate-900 rounded-lg p-3">
372
  <p className="text-sm text-slate-700 dark:text-slate-300 mb-2">
373
- <strong>Full Content:</strong> {document.content.substring(0, 300)}
374
- {document.content.length > 300 && "..."}
375
  </p>
 
 
 
 
 
376
  </div>
377
  )}
378
  </div>
 
370
  )) || (
371
  <div className="bg-slate-50 dark:bg-slate-900 rounded-lg p-3">
372
  <p className="text-sm text-slate-700 dark:text-slate-300 mb-2">
373
+ <strong>Full Content:</strong>
 
374
  </p>
375
+ <div className="max-h-96 overflow-y-auto bg-white dark:bg-slate-800 border border-slate-200 dark:border-slate-600 rounded-md p-3 mt-2">
376
+ <p className="text-sm text-slate-700 dark:text-slate-300 leading-relaxed whitespace-pre-wrap">
377
+ {document.content}
378
+ </p>
379
+ </div>
380
  </div>
381
  )}
382
  </div>