From 68a11ea55179fbd49574244c06e2bdd7d7319e06 Mon Sep 17 00:00:00 2001 From: Gabriel Kaszewski Date: Mon, 29 Dec 2025 14:23:19 +0100 Subject: [PATCH] feat: Enhance note dialog layouts, improve text wrapping, and refine component styling. --- .../src/components/editor/editor.tsx | 2 +- k-notes-frontend/src/components/note-card.tsx | 28 ++++++++++--------- k-notes-frontend/src/components/note-form.tsx | 2 +- .../src/components/note-view-dialog.tsx | 7 ++--- k-notes-frontend/src/pages/dashboard.tsx | 2 +- 5 files changed, 20 insertions(+), 21 deletions(-) diff --git a/k-notes-frontend/src/components/editor/editor.tsx b/k-notes-frontend/src/components/editor/editor.tsx index c06c026..a06422c 100644 --- a/k-notes-frontend/src/components/editor/editor.tsx +++ b/k-notes-frontend/src/components/editor/editor.tsx @@ -49,7 +49,7 @@ export function Editor({ value, onChange, placeholder, className }: EditorProps) editorProps: { attributes: { class: cn( - "min-h-[100px] max-h-[400px] overflow-y-auto w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 prose dark:prose-invert max-w-none", + "min-h-[100px] max-h-[400px] overflow-y-auto w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 prose dark:prose-invert max-w-none break-all min-w-0", className ), }, diff --git a/k-notes-frontend/src/components/note-card.tsx b/k-notes-frontend/src/components/note-card.tsx index babc6a3..4f5d609 100644 --- a/k-notes-frontend/src/components/note-card.tsx +++ b/k-notes-frontend/src/components/note-card.tsx @@ -165,21 +165,23 @@ export function NoteCard({ note }: NoteCardProps) { - - + + {t("Edit Note")} - t.name).join(", "), - }} - onSubmit={handleEdit} - submitLabel={t("Update")} - /> +
+ t.name).join(", "), + }} + onSubmit={handleEdit} + submitLabel={t("Update")} + /> +
diff --git a/k-notes-frontend/src/components/note-form.tsx b/k-notes-frontend/src/components/note-form.tsx index db7c03b..2069eea 100644 --- a/k-notes-frontend/src/components/note-form.tsx +++ b/k-notes-frontend/src/components/note-form.tsx @@ -43,7 +43,7 @@ export function NoteForm({ defaultValues, onSubmit, isLoading, submitLabel = "Sa return (
- +
- + {note.title} - {note.is_pinned && ( - - )}
@@ -41,7 +38,7 @@ export function NoteViewDialog({ note, open, onOpenChange, onEdit, onSelectNote
-
+
{note.content}
diff --git a/k-notes-frontend/src/pages/dashboard.tsx b/k-notes-frontend/src/pages/dashboard.tsx index 9c2adb8..70cf712 100644 --- a/k-notes-frontend/src/pages/dashboard.tsx +++ b/k-notes-frontend/src/pages/dashboard.tsx @@ -81,7 +81,7 @@ export default function DashboardPage() { return ( {notesList.map((note: Note) => (