From ddc0ba8090f07a997d7ccb215eaf0a8c7aef6169 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Sat, 29 Nov 2025 18:57:21 -0500 Subject: Inline description editing with HTMX view/edit swap The implementation is complete. Here's a summary of the changes: **Omni/Jr/Web.hs:** 1. Added new API routes for `/tasks/:id/description/view` and `/tasks/:i 2. Added `DescriptionViewPartial` and `DescriptionEditPartial` data type 3. Added `ToHtml` instances for both partials with HTMX attributes for v 4. Added handlers: `descriptionViewHandler`, `descriptionEditHandler`, ` 5. Updated the TaskDetailPage render to use the view partial instead of **Omni/Jr/Web/Style.hs:** 1. Added `.description-block` container styles 2. Added `.description-header` flex styles for header with title and edi 3. Added `.edit-link` and `.cancel-link` styles (12px font, blue for edi 4. Added dark mode overrides for the links Task-Id: t-175 --- Omni/Jr/Web/Style.hs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'Omni/Jr/Web/Style.hs') diff --git a/Omni/Jr/Web/Style.hs b/Omni/Jr/Web/Style.hs index 10f7f73..c8bfaa5 100644 --- a/Omni/Jr/Web/Style.hs +++ b/Omni/Jr/Web/Style.hs @@ -395,6 +395,19 @@ cardStyles = do margin (px 0) (px 0) (px 0) (px 0) color "#374151" fontSize (px 13) + ".description-block" ? do + pure () + ".description-header" ? do + display flex + justifyContent spaceBetween + alignItems center + marginBottom (px 8) + (".description-header" |> "h3") ? do + margin (px 0) (px 0) (px 0) (px 0) + ".edit-link" <> ".cancel-link" ? do + fontSize (px 12) + color "#0066cc" + ".cancel-link" ? color "#dc2626" ".diff-block" ? do maxHeight (px 600) overflowY auto @@ -1412,6 +1425,8 @@ darkModeStyles = color "#f3f4f6" ".edit-description" ? borderTopColor "#374151" (".edit-description" |> "summary") ? color "#60a5fa" + ".edit-link" ? color "#60a5fa" + ".cancel-link" ? color "#f87171" ".description-textarea" ? do backgroundColor "#374151" borderColor "#4b5563" -- cgit v1.2.3