diff --git a/web/src/features/report/report-text.test.ts b/web/src/features/report/report-text.test.ts new file mode 100644 index 00000000..d4146e3d --- /dev/null +++ b/web/src/features/report/report-text.test.ts @@ -0,0 +1,10 @@ +import { describe, expect, it } from 'vitest' +import { REPORT_TEXT_WRAP_CLASS_NAME } from './report-text' + +describe('REPORT_TEXT_WRAP_CLASS_NAME', () => { + it('preserves line breaks and forces long content to wrap', () => { + expect(REPORT_TEXT_WRAP_CLASS_NAME).toContain('whitespace-pre-wrap') + expect(REPORT_TEXT_WRAP_CLASS_NAME).toContain('break-words') + expect(REPORT_TEXT_WRAP_CLASS_NAME).toContain('[overflow-wrap:anywhere]') + }) +}) diff --git a/web/src/features/report/report-text.ts b/web/src/features/report/report-text.ts new file mode 100644 index 00000000..0c9caf77 --- /dev/null +++ b/web/src/features/report/report-text.ts @@ -0,0 +1 @@ +export const REPORT_TEXT_WRAP_CLASS_NAME = 'min-w-0 whitespace-pre-wrap break-words [overflow-wrap:anywhere]' diff --git a/web/src/pages/dashboard/reports.tsx b/web/src/pages/dashboard/reports.tsx index a513307e..a82afa0f 100644 --- a/web/src/pages/dashboard/reports.tsx +++ b/web/src/pages/dashboard/reports.tsx @@ -7,6 +7,7 @@ import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/shared/ui/tabs' import { Button } from '@/shared/ui/button' import { ConfirmDialog } from '@/shared/components/confirm-dialog' import { useDismissSkillReport, useResolveSkillReport, useSkillReports } from '@/features/report/use-skill-reports' +import { REPORT_TEXT_WRAP_CLASS_NAME } from '@/features/report/report-text' import { toast } from '@/shared/lib/toast' import type { ReportDisposition } from '@/api/types' @@ -80,14 +81,14 @@ export function ReportsPage() {
-
{skillLabel}
-
{report.reason}
- {report.details ?
{report.details}
: null} +
{skillLabel}
+
{report.reason}
+ {report.details ?
{report.details}
: null}
{t('reports.reporter')}: {report.reporterId}